Architecture

The GameEngine is a fixed time simulator that produces consecutive snapshots of the state of the game. The GameEngine is decoupled from the graphics. It has a method GameEngine.give_state_queue() to create and return a multiprocessing.Queue in which it puts the state snapshots as they are produced. The built-in graphics GameDisplayProcess is a separate Process that displays these states as “frames” of the game. The GameEngine, therefore, can be used “headless” if for any reason (training reiforcement learning, sampling results, etc.) games can/should be run in batch. For the analysis-oriented users, grabbing a Queue from the game engine with GameEngine.give_state_queue() is the preferred way to get all the info you could possibly want from the simulation in order to do analyses to any desired level of detail.