The first embodiment of the network consists of the Mountain Car environment23. This environment is a classical testbed in reinforcement learning depicting an under-powered car that must drive up a steep hill (Fig. 3B). Since gravity is stronger than the car’s engine, the vehicle must learn to gain potential energy by driving to one hill before the car is able to make it to the goal at the top of the opposite hill (see Methods). The neural network receives the speed of the system as an input and controls the force of the car’s engine as an output. The second embodiment consists of a double pendulum or ‘Acrobot’24, which has to coordinate the movements of two connected links to lift its weight (Fig. 3C, see Methods). The neural network receives the speed of the first pendulum and controls the torque applied on the joint between the two pendulums.