ec.teambots
Class TeambotsExampleProblem

java.lang.Object
  |
  +--ec.Problem
        |
        +--ec.teambots.TeambotsProblem
              |
              +--ec.teambots.TeambotsExampleProblem
All Implemented Interfaces:
java.lang.Cloneable, Prototype, java.io.Serializable, Setup, SimpleProblemForm

public abstract class TeambotsExampleProblem
extends TeambotsProblem

This class demonstrates how to create an evolved control system from an individual such that one can use ECJ to evolve ControlSystems for Teambots. For this demonstration, lets assume that the representation of the individual is a boolean-vector one, and that the individuals have rules of 6 genes length each. Its functionality will be encoded as follows: the first 4 genes in a rule will encode the condition for firing (if there are any obstacles in the 4 quadrants) at a distance less than 1 meter. The last 2 genes will codify the action to be taken by the robot (I have no idea what you can encode with 2 boolean values, but this is just an example....)

See Also:
Serialized Form

Fields inherited from class ec.teambots.TeambotsProblem
graphics, P_GRAPHICS, P_INPUTFILE, P_NUMBOTS, P_WINDOWHEIGHT, P_WINDOWWIDTH, simulator, simulatorFrame
 
Fields inherited from class ec.Problem
P_PROBLEM
 
Constructor Summary
TeambotsExampleProblem()
           
 
Method Summary
 EvolvedControlSystem getControlSystem(EvolutionState state, Individual ind, int threadnum)
          This function is the conversion of an individual from ECJ to a ControlSystem for TeamBots.
 
Methods inherited from class ec.teambots.TeambotsProblem
evaluate, getControlSystem, getNumberEvolvableRobots, setup
 
Methods inherited from class ec.Problem
defaultBase, protoClone, protoCloneSimple
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ec.simple.SimpleProblemForm
describe
 

Constructor Detail

TeambotsExampleProblem

public TeambotsExampleProblem()
Method Detail

getControlSystem

public EvolvedControlSystem getControlSystem(EvolutionState state,
                                             Individual ind,
                                             int threadnum)
This function is the conversion of an individual from ECJ to a ControlSystem for TeamBots.