ec.teambots
Class TeambotsProblem

java.lang.Object
  extended by ec.Problem
      extended by ec.teambots.TeambotsProblem
All Implemented Interfaces:
ec.Prototype, ec.Setup, ec.simple.SimpleProblemForm, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
TeambotsExampleProblem

public abstract class TeambotsProblem
extends ec.Problem
implements ec.simple.SimpleProblemForm

TeambotsProblem.java This is a problem for evolving control systems with ECJ for Teambots for multiple robots. In the simulation there can also be other robots that are not evolved.

Parameters

base.input-file
string
(name of the Teambots configuration file)
base.graphics
bool = true or false (default)
(whether evaluations have graphical display or not (no graphics => greater speed)
base.window-width
int >= 0
(wodth of window for graphical display)
base.window-height
int >= 0
(height of window for graphical display)
base.num-bots
int >= 1
(number of robots to evolve behaviors for)

See Also:
Serialized Form

Field Summary
 boolean graphics
          whether the simulation will have graphics displaying or not
static java.lang.String P_GRAPHICS
          Whether the simulation will be displayed or not
static java.lang.String P_INPUTFILE
          The name of the input file for the simulator
static java.lang.String P_NUMBOTS
          the number of control systems to be evolved
static java.lang.String P_WINDOWHEIGHT
          the height of the window of the simulation
static java.lang.String P_WINDOWWIDTH
          the width of the window of the simulation
 ECSimulationCanvas simulator
          the simulator
protected  java.awt.Frame simulatorFrame
           
 
Fields inherited from class ec.Problem
P_PROBLEM
 
Constructor Summary
TeambotsProblem()
           
 
Method Summary
 void evaluate(ec.EvolutionState state, ec.Individual ind, int threadnum)
          Evaluate the individual.
abstract  EvolvedControlSystem getControlSystem(ec.EvolutionState state, ec.Individual ind, int threadnum, int whichBot)
          Get the control system for the nth robot.
 int getNumberEvolvableRobots()
          how many robots are there to be evolved
 void setup(ec.EvolutionState state, ec.util.Parameter base)
           
 
Methods inherited from class ec.Problem
clone, closeContacts, defaultBase, finishEvaluating, initializeContacts, prepareToEvaluate, reinitializeContacts
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ec.simple.SimpleProblemForm
describe
 

Field Detail

P_WINDOWWIDTH

public static final java.lang.String P_WINDOWWIDTH
the width of the window of the simulation

See Also:
Constant Field Values

P_WINDOWHEIGHT

public static final java.lang.String P_WINDOWHEIGHT
the height of the window of the simulation

See Also:
Constant Field Values

P_NUMBOTS

public static final java.lang.String P_NUMBOTS
the number of control systems to be evolved

See Also:
Constant Field Values

P_INPUTFILE

public static final java.lang.String P_INPUTFILE
The name of the input file for the simulator

See Also:
Constant Field Values

P_GRAPHICS

public static final java.lang.String P_GRAPHICS
Whether the simulation will be displayed or not

See Also:
Constant Field Values

simulator

public ECSimulationCanvas simulator
the simulator


graphics

public boolean graphics
whether the simulation will have graphics displaying or not


simulatorFrame

protected java.awt.Frame simulatorFrame
Constructor Detail

TeambotsProblem

public TeambotsProblem()
Method Detail

getNumberEvolvableRobots

public final int getNumberEvolvableRobots()
how many robots are there to be evolved


setup

public void setup(ec.EvolutionState state,
                  ec.util.Parameter base)
Specified by:
setup in interface ec.Prototype
Specified by:
setup in interface ec.Setup
Overrides:
setup in class ec.Problem

evaluate

public void evaluate(ec.EvolutionState state,
                     ec.Individual ind,
                     int threadnum)
Evaluate the individual.

Specified by:
evaluate in interface ec.simple.SimpleProblemForm

getControlSystem

public abstract EvolvedControlSystem getControlSystem(ec.EvolutionState state,
                                                      ec.Individual ind,
                                                      int threadnum,
                                                      int whichBot)
Get the control system for the nth robot.