|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Evolver
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:
Evolvable
evolvables and their generation frequencies
(in ticks of the clock);GenerationListener
s -- after each tick, any
evolver which has undergone a new generation will be passed to this listener;
start
, pause
,
resume
, stop
)next
)Theological.seedMembers()
methods (this is really just a convenience
method).
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
VisualizableListener
s on an Visualizable
objects (such as
Population
s or Environment
s).
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 |
---|
void addEvolvable(Evolvable evolvable)
evolvable
- an Evolvable
object, typically a Taxon
.void addEvolvable(Evolvable evolvable, int ticks)
ticks
ticks of the clock.
evolvable
- an Evolvable
object, typically a Taxon
.ticks
- the number of ticks of the clock per generation.boolean addListener(GenerationListener listener)
listener
-
void cleanup()
EvolutionaryApplet
is employed as the
user-interface, this method is called ny the Applet.stop()
method.
ClockWatcher getClockWatcher()
java.util.Set<Evolvable> getEvolvableKeys()
Evolvable
objects.void init()
EvolutionaryApplet
is employed as the
user-interface, this method is called by the Applet.start()
method.
boolean next() throws EvolutionException
EvolutionException
void removeEvolvable(Evolvable evolvable)
evolvable
- void seedEvolvables()
Theological.seedMembers()
on each one.
void setClockWatcher(ClockWatcher clockWatcher)
clockWatcher
- the clockWatcher to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |