For sizes Nh = 1, 2, 4, 8, 16, 32, 64, we train 10 agents in both environments, applying the learning rule from Equation 3, with η = 0.01. Note that agents during learning have no other explicit goal other than adjusting the correlations of the system to a random sample extracted from the probability distribution in Fig. 1. In Supplementary Videos S1 and S2 we can observe an example of the behaviour of agents with N = 64 after training. In Fig. S2C,D we can see the distribution of correlations of an agent with Nh = 64 (the result is similar for all agents and sizes) and Fig. S2E,F shows the error between the distribution in Fig. S2C,D and Fig. 1 for this agent. In Fig. S2C,D we can observe how agents after learning display a correlation structure consistent with the correlation distribution c(r) ∝ 1/rη of the lattice Ising model at criticality.