An Algorithm for the Simulation of Bounded Rational Agents