wodka.ga.racer
Class AbstractRacer
java.lang.Object
wodka.ga.racer.AbstractRacer
- All Implemented Interfaces:
- wwan.commons.param.Configurable, wwan.commons.param.Informative, Racer, RaceRunnerErrorHandler, RaceRunnerListener, java.io.Serializable, StreamPersistable
- Direct Known Subclasses:
- AbstractMCRacer, AbstractPoligonBuilderRacer, EasySodaRacer
- public abstract class AbstractRacer
- extends java.lang.Object
- implements Racer, RaceRunnerListener, RaceRunnerErrorHandler
Abstract superclass for racers running in the virtual machine as
the GeneticAlgorithm.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
racerListener
protected RacerListener racerListener
runningRaces
protected java.util.Collection runningRaces
handler
protected ExceptionHandler handler
AbstractRacer
public AbstractRacer()
checkParameterList
public void checkParameterList(wwan.commons.param.ListParam lp)
throws wwan.commons.param.ParamException
- Specified by:
checkParameterList
in interface wwan.commons.param.Configurable
- Throws:
wwan.commons.param.ParamException
addModel
public void addModel(Model m,
int id,
GeneticAlgorithm genAlgo,
int timeout)
- Specified by:
addModel
in interface Racer
setRacerListener
public void setRacerListener(RacerListener rl)
- Specified by:
setRacerListener
in interface Racer
finishedRunning
public void finishedRunning(int fitness,
int id)
- Specified by:
finishedRunning
in interface RaceRunnerListener
createRaceRunner
public abstract RaceRunner createRaceRunner()
finishedAdding
public void finishedAdding()
- Specified by:
finishedAdding
in interface Racer
toString
public java.lang.String toString()
setExceptionHandler
public void setExceptionHandler(ExceptionHandler handler)
- Specified by:
setExceptionHandler
in interface Racer
reset
public void reset()
- Specified by:
reset
in interface Racer
stop
public void stop()
getParameterDescription
public wwan.commons.param.ListParamDesc getParameterDescription()
- Specified by:
getParameterDescription
in interface wwan.commons.param.Configurable
setFieldsFromParameterList
public void setFieldsFromParameterList(wwan.commons.param.ListParam lp)
- Specified by:
setFieldsFromParameterList
in interface wwan.commons.param.Configurable
setParameterListFromFields
public void setParameterListFromFields(wwan.commons.param.ListParam lp)
- Specified by:
setParameterListFromFields
in interface wwan.commons.param.Configurable
fromStream
public void fromStream(java.io.DataInputStream s,
int version)
throws java.io.IOException
- Specified by:
fromStream
in interface StreamPersistable
- Throws:
java.io.IOException
getVersion
public int getVersion()
- Specified by:
getVersion
in interface StreamPersistable
toStream
public void toStream(java.io.DataOutputStream s)
throws java.io.IOException
- Specified by:
toStream
in interface StreamPersistable
- Throws:
java.io.IOException
setTerrainXml
public void setTerrainXml(java.lang.String terrainXml)
throws WodkaException
- Specified by:
setTerrainXml
in interface Racer
- Throws:
WodkaException
handleThrowable
public void handleThrowable(java.lang.Throwable t)
- Specified by:
handleThrowable
in interface RaceRunnerErrorHandler