Implantable system for stimulating a human heart or an animal heart, comprising a processor, a memory unit, a stimulation unit (1130, 1150), and a first detection unit (1120, 1140) for detecting a cardiac rhythm disturbance of a cardiac region, characterized in that the memory unit includes a computer-readable program, which prompts the processor to carry out the following steps when the program is being executed on the processor: a) detecting by way of the first detection unit (1120. 1140) whether a cardiac rhythm disturbance is present in a cardiac region of a heart of a human patient or an animal patient; b) when a cardiac rhythm disturbance is present, selecting a stimulation strategy based on a selection criterion, the selection criterion including a measurement variable or a variable calculated from the measurement variable, the measurement variable being selected from the group consisting of a physiological measurement variable of the patient, a pathophysiological measurement variable of the patient, and a non-physiological measurement variable indicating a state of the patient; c) stimulating the cardiac region in which the cardiac rhythm disturbance was detected by way of the stimulation unit (1120, 1140), using the selected stimulation strategy, wherein the stimulation strategy is an atrial anti-tachycardia stimulation or a cardioversion by atrial treatment; d) detecting a an efficiency of the conducted stimulation with regard to - a time duration required to treat a detected cardiac rhythm disturbance successfully using the selected stimultaion strategy, - an energy required for the stimulation, and/or - a time that elapses from a termination of the cardiac rhythm disturbance until a recurrence of the cardiac rhythm disturbance; e) comparing the efficiency to a predefinable efficiency criterion; and f) if the predefinable efficiency criterion was not achieved, optimizing the stimulation strategy so as to achieve greater efficiency during a subsequent stimulation using an optimized stimulation strategy, the optimization comprising a change in the stimulation strategy with respect to at least one parameter, which is selected from the group consisting of a form of the treatment, a number of the treatments, a combination of different treatments, a frequency of the treatments, and a point in time of the treatment. a) detecting by way of the first detection unit (1120. 1140) whether a cardiac rhythm disturbance is present in a cardiac region of a heart of a human patient or an animal patient; b) when a cardiac rhythm disturbance is present, selecting a stimulation strategy based on a selection criterion, the selection criterion including a measurement variable or a variable calculated from the measurement variable, the measurement variable being selected from the group consisting of a physiological measurement variable of the patient, a pathophysiological measurement variable of the patient, and a non-physiological measurement variable indicating a state of the patient; c) stimulating the cardiac region in which the cardiac rhythm disturbance was detected by way of the stimulation unit (1120, 1140), using the selected stimulation strategy, wherein the stimulation strategy is an atrial anti-tachycardia stimulation or a cardioversion by atrial treatment; d) detecting a an efficiency of the conducted stimulation with regard to - a time duration required to treat a detected cardiac rhythm disturbance successfully using the selected stimultaion strategy, - an energy required for the stimulation, and/or - a time that elapses from a termination of the cardiac rhythm disturbance until a recurrence of the cardiac rhythm disturbance; - a time duration required to treat a detected cardiac rhythm disturbance successfully using the selected stimultaion strategy, - an energy required for the stimulation, and/or - a time that elapses from a termination of the cardiac rhythm disturbance until a recurrence of the cardiac rhythm disturbance; e) comparing the efficiency to a predefinable efficiency criterion; and f) if the predefinable efficiency criterion was not achieved, optimizing the stimulation strategy so as to achieve greater efficiency during a subsequent stimulation using an optimized stimulation strategy, the optimization comprising a change in the stimulation strategy with respect to at least one parameter, which is selected from the group consisting of a form of the treatment, a number of the treatments, a combination of different treatments, a frequency of the treatments, and a point in time of the treatment.