1. A method comprising: with one or more processors, selecting a predefined set of electrode combinations, wherein each electrode combination includes one or more anode electrodes, one or more cathode electrodes, or both one or more anode electrodes and one or more cathode electrodes, a relative arrangement of the one or more anodes and the one or more cathodes defining an electrode pattern of the electrode combination; and with the one or more processors, automatically controlling a medical device to deliver, in a predetermined order, electrical stimulation to a patient via each electrode combination of the predefined set of electrode combinations, each pair of adjacent electrode combinations in the predetermined order including at least one same anode electrode or cathode electrode, wherein the electrode combinations in the predetermined order define a predetermined sequence of electrode patterns.