com.rubecula.darwin.evolution
Interface Evolver

All Superinterfaces:
Clocked
All Known Subinterfaces:
Evolution
All Known Implementing Classes:
Evolution_, Evolution_Calendar, Evolution_Standard, Evolution_Timed, Evolver_

public interface Evolver
extends Clocked

This interface defines the concept of an Evolver. The Evolver interface is a super-interface of Evolution and deals with the fundamentals of stepping through an evolvable system, generation by generation. The properties of an Evolver are as follows:

Note that in general, there will be two modes of updating the user interface, during evolution. The generation listeners fire at the completion of each generation. If you also want to visualize updates at more points during the completion of a generation, then you should also set up VisualizableListeners on an Visualizable objects (such as Populations or Environments).

Author:
Robin Hillyard

Method Summary
 void addEvolvable(Evolvable evolvable)
          Add an evolvable object which undergoes a new generation once every tick of the clock.
 void addEvolvable(Evolvable evolvable, int ticks)
          Add an evolvable object which undergoes a new generation once every ticks ticks of the clock.
 boolean addListener(GenerationListener listener)
          Add a listener to the evolution process.
 void cleanup()
          Method which is called before all user-interface components get destroyed.
 ClockWatcher getClockWatcher()
           
 java.util.Set<Evolvable> getEvolvableKeys()
           
 void init()
          Method which is called after all user-interface issues have been dealt with.
 boolean next()
          Increment the clock by one tick, firing new generations as appropriate.
 void removeEvolvable(Evolvable evolvable)
           
 void seedEvolvables()
          Seed the currently registered evolvables by calling Theological.seedMembers() on each one.
 void setClockWatcher(ClockWatcher clockWatcher)
           
 
Methods inherited from interface com.rubecula.darwin.foundation.Clocked
getClock
 

Method Detail

addEvolvable

void addEvolvable(Evolvable evolvable)
Add an evolvable object which undergoes a new generation once every tick of the clock.

Parameters:
evolvable - an Evolvable object, typically a Taxon.

addEvolvable

void addEvolvable(Evolvable evolvable,
                  int ticks)
Add an evolvable object which undergoes a new generation once every ticks ticks of the clock.

Parameters:
evolvable - an Evolvable object, typically a Taxon.
ticks - the number of ticks of the clock per generation.

addListener

boolean addListener(GenerationListener listener)
Add a listener to the evolution process.

Parameters:
listener -
Returns:
true if the listener was added

cleanup

void cleanup()
Method which is called before all user-interface components get destroyed. When an EvolutionaryApplet is employed as the user-interface, this method is called ny the Applet.stop() method.


getClockWatcher

ClockWatcher getClockWatcher()
Returns:
the clockWatcher

getEvolvableKeys

java.util.Set<Evolvable> getEvolvableKeys()
Returns:
the set of Evolvable objects.

init

void init()
Method which is called after all user-interface issues have been dealt with. When an EvolutionaryApplet is employed as the user-interface, this method is called by the Applet.start() method.


next

boolean next()
             throws EvolutionException
Increment the clock by one tick, firing new generations as appropriate.

Returns:
true if there is more evolution to do.
Throws:
EvolutionException

removeEvolvable

void removeEvolvable(Evolvable evolvable)
Parameters:
evolvable -

seedEvolvables

void seedEvolvables()
Seed the currently registered evolvables by calling Theological.seedMembers() on each one.


setClockWatcher

void setClockWatcher(ClockWatcher clockWatcher)
Parameters:
clockWatcher - the clockWatcher to set


Copyright © 2010 Rubecula Software, LLC. All Rights Reserved.