Package eas.users.students.benediktMueller.qswarm.neural

Examples of eas.users.students.benediktMueller.qswarm.neural.NetViewerBenedikt


  public static void main(String[] args)
  {
    System.out.println("starting");
    CleaningExperiment c = new CleaningExperiment(30, 3000);
    SwarmEvolution evo = new SwarmEvolution(c);
    NetViewerBenedikt netViewer = new NetViewerBenedikt();

   
    SimViewer v = new SimViewer(null, true);
   
    int g = 0;
    while(v.isVisible())
    {
      if(v.evolutionRunning)
      {
        v.setTitle("QuickSwarm [ currently evolving, click in this window to show champion ]");
      }

      while(v.evolutionRunning && v.isVisible())
      {
        System.out.println("generation " + g + " of invisible evolution");
        evo.evolve();
        netViewer.generate(evo.swarms[0].getNet());
        netViewer.repaint();
//        evo.swarms[0].getNet().dump();
        g++;
      }
     
      v.sim.setAgents(evo.swarms[0].getAgents());
View Full Code Here


  {
    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) {
              // TODO Comment.
        }
View Full Code Here

TOP

Related Classes of eas.users.students.benediktMueller.qswarm.neural.NetViewerBenedikt

Copyright © 2018 www.massapicom. 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.