  An activity fundamental to science is building mathematical models. These
models are used to both predict the results of future experiments and gain
insight into the structure of the system under study. We present an algorithm
that automates the model building process in a scientifically principled way.
The algorithm can take observed trajectories from a wide variety of mechanical
systems and, without any other prior knowledge or tuning of parameters, predict
the future evolution of the system. It does this by applying the principle of
least action and searching for the simplest Lagrangian that describes the
system's behaviour. By generating this Lagrangian in a human interpretable
form, it also provides insight into the working of the system.
