Method for controlling rail traffic of a plurality of railway vehicles, comprising: - receiving status data of the rail traffic, wherein the status data describes control statuses of the rail traffic of the plurality of railway vehicles and comprises at least position data of the plurality of railway vehicles; - receiving a control target (KPI 1, KPI 2, KPI N) for controlling the rail traffic of the plurality of railway vehicles; - selecting at least one action selection rule (π 1, π 2, π N) from a plurality of action selection rules (π 1, π 2, π N) based on the control target (KPI 1, KPI 2, KPI N), wherein the action selection rules (π 1, π 2, π N) are designed to determine control actions of the rail traffic on the basis of status data of the rail traffic, wherein when the control actions are executed by means of the railway vehicles, the rail traffic can be transferred into a status which is optimised with respect to a control target (KPI 1, KPI 2, KPI N), wherein each action selection rule (π 1, π 2, π N) is designed for the optimisation with respect to an individual control target (KPI 1, KPI 2, KPI N), and wherein the at least one selected action selection rule (π 1, π 2, π N) is designed for an optimisation with respect to the received control target (KPI 1, KPI 2, KPI N); - executing the at least one selected action selection rule (π 1, π 2, π N) on the received status data and determining control actions; and - providing the control actions for actuating the plurality of railway vehicles, wherein the action selection rules (π 1, π 2, π N) are trained by means of reinforcement learning, the training of the action selection rules (π 1, π 2, π N) comprises a maximisation of reward functions and the reward functions define control targets (KPI 1, KPI 2, KPI N) and/or combined control targets. - receiving status data of the rail traffic, wherein the status data describes control statuses of the rail traffic of the plurality of railway vehicles and comprises at least position data of the plurality of railway vehicles; - receiving a control target (KPI 1, KPI 2, KPI N) for controlling the rail traffic of the plurality of railway vehicles; - selecting at least one action selection rule (π 1, π 2, π N) from a plurality of action selection rules (π 1, π 2, π N) based on the control target (KPI 1, KPI 2, KPI N), wherein the action selection rules (π 1, π 2, π N) are designed to determine control actions of the rail traffic on the basis of status data of the rail traffic, wherein when the control actions are executed by means of the railway vehicles, the rail traffic can be transferred into a status which is optimised with respect to a control target (KPI 1, KPI 2, KPI N), wherein each action selection rule (π 1, π 2, π N) is designed for the optimisation with respect to an individual control target (KPI 1, KPI 2, KPI N), and wherein the at least one selected action selection rule (π 1, π 2, π N) is designed for an optimisation with respect to the received control target (KPI 1, KPI 2, KPI N); - executing the at least one selected action selection rule (π 1, π 2, π N) on the received status data and determining control actions; and - providing the control actions for actuating the plurality of railway vehicles, wherein the action selection rules (π 1, π 2, π N) are trained by means of reinforcement learning, the training of the action selection rules (π 1, π 2, π N) comprises a maximisation of reward functions and the reward functions define control targets (KPI 1, KPI 2, KPI N) and/or combined control targets. wherein the action selection rules (π 1, π 2, π N) are trained by means of reinforcement learning, the training of the action selection rules (π 1, π 2, π N) comprises a maximisation of reward functions and the reward functions define control targets (KPI 1, KPI 2, KPI N) and/or combined control targets.