An algorithm-based introduction to the evolution of physical systems