When penalties are used and one of the three outcomes above takes place, RL-CSP does not calculate the reward in a usual way as the energy difference between the current state and the new state ′. Instead, to penalise this action as undesirable, the algorithm calculates the reward for getting into a structure with the "mean high energy" , which can be above the energy of ′: