Examples of IndiEvolution


Examples of eas.users.students.benediktMueller.qswarm.evolution.IndiEvolution

  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) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.