A system for optimization of the stimulation pattern of a set of implanted electrodes in excitable tissue of a patient and for treatment or alleviation of disease or disorder, wherein said system comprises - a set of electrodes configured to be implanted in excitable tissue of a patient, - a stimulation device S connected to said set of electrodes configured to stimulate said excitable tissue via said set of electrodes and to activate all electrodes of said set at the same time while increasing the stimulation strength, wherein the stimulation strength is an amplitude in voltage or in current, wherein the stimulation strength is increased in order to establish thresholds for therapeutic and for adverse stimulation effects, and - a first computer program P1, executed by a computer configured to receive information, communicated by the patient, on the stimulation effects, wherein the first computer program is in communication with the stimulation device and is configured a) to choose a group of electrodes from the set of electrodes connected to the stimulation device, b) to instruct the stimulation device to stimulate the tissue through the electrodes of said group, c) to transform the information on the stimulation effects communicated by the patient to a value which is assigned to all the electrodes of the group, c') to repeat procedure steps corresponding to a) - c) for one or more different groups of electrodes from the set of electrodes until each electrode, as part of different groups of electrodes, has been used for stimulation at least three times, d) to calculate a total assigned value for each electrode, e) to choose electrodes having a total assigned value exceeding a predetermined value to be included in the final stimulation pattern, and f) to provide the final stimulation pattern to the stimulation device S. - a set of electrodes configured to be implanted in excitable tissue of a patient, - a stimulation device S connected to said set of electrodes configured to stimulate said excitable tissue via said set of electrodes and to activate all electrodes of said set at the same time while increasing the stimulation strength, wherein the stimulation strength is an amplitude in voltage or in current, wherein the stimulation strength is increased in order to establish thresholds for therapeutic and for adverse stimulation effects, and - a first computer program P1, executed by a computer configured to receive information, communicated by the patient, on the stimulation effects, wherein the first computer program is in communication with the stimulation device and is configured a) to choose a group of electrodes from the set of electrodes connected to the stimulation device, b) to instruct the stimulation device to stimulate the tissue through the electrodes of said group, c) to transform the information on the stimulation effects communicated by the patient to a value which is assigned to all the electrodes of the group, c') to repeat procedure steps corresponding to a) - c) for one or more different groups of electrodes from the set of electrodes until each electrode, as part of different groups of electrodes, has been used for stimulation at least three times, d) to calculate a total assigned value for each electrode, e) to choose electrodes having a total assigned value exceeding a predetermined value to be included in the final stimulation pattern, and f) to provide the final stimulation pattern to the stimulation device S. a) to choose a group of electrodes from the set of electrodes connected to the stimulation device, b) to instruct the stimulation device to stimulate the tissue through the electrodes of said group, c) to transform the information on the stimulation effects communicated by the patient to a value which is assigned to all the electrodes of the group, c') to repeat procedure steps corresponding to a) - c) for one or more different groups of electrodes from the set of electrodes until each electrode, as part of different groups of electrodes, has been used for stimulation at least three times, d) to calculate a total assigned value for each electrode, e) to choose electrodes having a total assigned value exceeding a predetermined value to be included in the final stimulation pattern, and f) to provide the final stimulation pattern to the stimulation device S.