simulation.py heavily commented