First of all, this question also relates to physics but goes beyond it, into the phylosophical field.
After dealing with physics engines in computer engineering, an idea of something similar crossed my mind.
When thinking about every physical process in nature where events trigger new scenarios of matter and energy in different states, one might think that an "engine" of some kind must have had to calculate all aspects of the initial states to actually produce results in the universe.
An example of this would be throwing a glass against a wall. Given all kinds of variables (speed, air-related variables, materials variables, wall variables, etc), something or someone must tell the glass into how many pieces it should be broken and at which speed and angle each piece has to rebound. This way, something in the universe must be constantly calculating all data (seen as "inputs" of the system) to produce the inmediate future state of the universe. The rules are somehow written and this engine would apply them fore every aspect and in every corner of the universe.
I know that the concept of formulas and variables are a human post-construction that comes after observing the universe, but it can be said that some these rules where there before and independently of human thought (this might be another topic).
Having said this, is there a school of thought that deals with this concern? is it even a surrealistic topic?