public static void main(String[] args)
{
System.out.println("starting");
sim = new Simulation(30);
IndiEvolution evo = new IndiEvolution(sim, 3000);
NetViewerBenedikt netViewer = new NetViewerBenedikt();
SimViewer v = new SimViewer(sim, true);
int g = 0;
while(v.isVisible())
{
if(v.evolutionRunning)
{
v.setTitle("QuickSwarmAL [ currently evolving without display ]");
}
while(v.evolutionRunning && v.isVisible())
{
evo.evolve(null);
if(g%10000==0) netViewer.generate(evo.agents[0].net);
if(g%10000==0) netViewer.repaint();
g++;
}
@SuppressWarnings("unused")
int i = 0;
if(!v.evolutionRunning)
{
v.setTitle("QuickSwarmAL [ graphical display ]");
}
while(!(v.evolutionRunning) && v.isVisible())
{
long s = System.currentTimeMillis();
evo.evolve(null);
if(g%10000==0) netViewer.generate(evo.agents[0].net);
if(g%10000==0) netViewer.repaint();
g++;
v.repaint();
while(System.currentTimeMillis()-s < 100) {