Simulation and other algorithm