building up the simulator and agent bit by bit