I would just save the genome and random seed that was used to evaluate the individual, and then start up a MASON GUI instance to replay the simulation with visualization.


On Thu, Jun 5, 2014 at 12:19 PM, Sadat Chowdhury <[log in to unmask]> wrote:

My simulations run in headless mode (or batch mode) by a class that extends the sim.engine.SimState base class. The simulation involves running an evolutionary system across several "generations". Typically, I can evolve around 300/400 generations within 20-30 mins this way.

The same simulation, if run using a 2D visualizer (sim.display.GUIState) will take a much longer run-time. In fact, a single generation would take at least 20 minutes (a "generation" is composed of several thousand simulations of some scenario with some number of agents). So it's practically impossible to visualize the entire experiment -- it would take several days. Actually, neither do I want to. Rather, I would like to  visualize a particular simulation every 100 generations or so.

One way of achieving this is to simply close the visualizer window (Java applet window that shows the simulation) momentarily, and then the simulation runs faster. However, it comes nowhere close to the speed of running that same simulation completely headless. This makes sense, because the "view" is still registered in the MVC plumbing and as the "model" is changing, the "controller" is still making update calls to the "view" -- regardless whether the "view" is active or not. If the window is closed, there is no rendering, so it runs slightly faster.

What I really want is a true detachment of the view from the model/controller for a certain number of configurable steps. Is it possible? I've been looking at the MASON source code, and it is fairly involved, but I don't see an easy way to accomplish this.

Maybe I am approaching this in the wrong way -- perhaps I should think of alternatives such as serializing during key moments and then somehow replaying them. Any help would be greatly appreciated.



Ph.D student in Computer Science
George Mason University