A method for optimization of the stimulation pattern of a set of implanted electrodes in excitable tissue of a patient is disclosed, wherein it comprises the steps of: (a) choosing a first group of a certain number of from said set of implanted electrodes, (b) stimulating the excitable tissue electrically by said first group of electrodes, (c) registering information provided by the patient, (d) assigning each electrode of said first group of electrodes a value related to said information, wherein these steps are repeated for one or more further groups of said certain number of electrodes chosen from said set of implanted electrodes, wherein each electrode may be included in one or several groups, wherein the total assigned value for each electrode is calculated, and wherein electrodes having a total assigned value exceeding a predetermined value or a predetermined number of the electrodes having the highest total assigned value are chosen to be included in said stimulation pattern, as well as a method for treatment or alleviation of a disease or condition by use of a set of electrodes whose stimulation pattern has been optimized with said method, and a system for optimization of the stimulation pattern.