Simulation and algorithms