Method for controlling and/or regulating a technical system, in particular an energy generation installation, in a computer-assisted manner, in which the dynamic behavior of the technical system is respectively characterized for a plurality of times by a state (s) of the technical system and an action (a) carried out on the technical system in this state, a respective action (a) at a respective time resulting in a new state (s) of the technical system at the next time, and an action sequence being one or more actions (a) to be successively carried out on the technical system in a temporal sequence, a measure of quality with respect to an optimization criterion for operating the technical system being able to be calculated for each action sequence on the basis of the states (s1, s2,..., sT) of the technical system which result from carrying out the actions (a) in the action sequence, the measure of quality being higher, the better the optimization criterion is satisfied, in which: a) a simulation model of the technical system is provided and can be used to predict the resulting states (s1, s2,..., sT) of the technical system for respective action sequences; b) an action sequence having the highest possible measure of quality is determined at a respective predefined time (t) from a sequence of successive predefined times using a numerical optimization method, the numerical optimization method using the simulation model to predict the resulting states (s1, s2,..., sT) for action sequences (A i) generated during the numerical optimization method and to then determine the measure of quality of the generated action sequences (A i) using these predicted states (s1, s2,..., sT), wherein the numerical optimization method is particle swarm optimization, the particles of which are assigned to respective action sequences (A i) which are randomly determined when initializing the particle swarm optimization and are iteratively changed during the particle swarm optimization by means of respective speed vectors, the respective speed vectors being determined using a fitness function which corresponds to the measure of quality; c) at least some of the actions (a) in the action sequence determined in step b) are carried out on the technical system. a) a simulation model of the technical system is provided and can be used to predict the resulting states (s1, s2,..., sT) of the technical system for respective action sequences; b) an action sequence having the highest possible measure of quality is determined at a respective predefined time (t) from a sequence of successive predefined times using a numerical optimization method, the numerical optimization method using the simulation model to predict the resulting states (s1, s2,..., sT) for action sequences (A i) generated during the numerical optimization method and to then determine the measure of quality of the generated action sequences (A i) using these predicted states (s1, s2,..., sT), wherein the numerical optimization method is particle swarm optimization, the particles of which are assigned to respective action sequences (A i) which are randomly determined when initializing the particle swarm optimization and are iteratively changed during the particle swarm optimization by means of respective speed vectors, the respective speed vectors being determined using a fitness function which corresponds to the measure of quality; c) at least some of the actions (a) in the action sequence determined in step b) are carried out on the technical system.