org.neat4j.core.distribute
Class ExperimentServer

java.lang.Object
  extended by org.neat4j.core.distribute.ExperimentServer
All Implemented Interfaces:
AIController

public class ExperimentServer
extends java.lang.Object
implements AIController


Constructor Summary
ExperimentServer()
           
 
Method Summary
 Experiment createExperiment()
          Gets the next experiment from the queue, if there are none left for the epoch, it will wait until the next epoch starts.
 void createServer()
          Creates the server socket so incoming connections can be accepted
 void finishedExperiment(Experiment e)
          When an agent finishes an experiment, experiment stats are updated.
 FitnessFunction function()
          Makes the relevant fitness function available
 void initialise(AIConfig config)
          Intialises the server environment
static void main(java.lang.String[] args)
           
 void returnFailedExperimentToPool(Experiment e)
          If a remote Experiment Agent fails to complete an experiment, it must be put back on the queue to be re-assigned
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExperimentServer

public ExperimentServer()
Method Detail

createServer

public void createServer()
Creates the server socket so incoming connections can be accepted


createExperiment

public Experiment createExperiment()
Gets the next experiment from the queue, if there are none left for the epoch, it will wait until the next epoch starts.

Returns:
Experiment

returnFailedExperimentToPool

public void returnFailedExperimentToPool(Experiment e)
If a remote Experiment Agent fails to complete an experiment, it must be put back on the queue to be re-assigned

Parameters:
e - - failed experiment

finishedExperiment

public void finishedExperiment(Experiment e)
                        throws ExperimentNotRunException
When an agent finishes an experiment, experiment stats are updated. If all experiments for an epcoh are complete an evolution cycle is initiated.

Parameters:
e -
Throws:
ExperimentNotRunException

initialise

public void initialise(AIConfig config)
                throws InitialisationFailedException
Intialises the server environment

Specified by:
initialise in interface AIController
Throws:
InitialisationFailedException - if environment creation fails

function

public FitnessFunction function()
Makes the relevant fitness function available

Returns:

main

public static void main(java.lang.String[] args)