$ 0 0 Physicists have devised an algorithm that provides a mathematical framework for how learning works in lattices called mechanical neural networks.