Understanding reality through algorithms