|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--physis.core.EnvironmentImpl
The default implementation for the Environment
| Field Summary | |
private double |
copy_mutation_rate
|
private static java.lang.String |
COPY_MUTATION_RATE
|
private double |
delete_rate
|
private static java.lang.String |
DELETE_RATE
|
private double |
divide_mutation_rate
|
private static java.lang.String |
DIVIDE_MUTATION_RATE
|
private int |
input_data_higher_bound
|
private static java.lang.String |
INPUT_DATA_HIGHER_BOUND
|
private double |
insert_rate
|
private static java.lang.String |
INSERT_RATE
|
private LifeSpace |
lifespace
|
private Nurse |
nurse
|
private static java.lang.String |
RANDOM_SEED
|
private java.util.Random |
rnd
|
private static java.lang.String |
TASK_FILE
|
private TaskLibrary |
tasklibrary
|
| Constructor Summary | |
EnvironmentImpl()
The constructor is private because it's a singleton. |
|
| Method Summary | |
boolean |
copyShouldBeMutated()
Answers the question: Should the current copied instruction be mutated? |
boolean |
divideShouldBeMutated()
Answers the question: Should the current divided codetape be mutated? |
int |
getInputData()
This provides the input from the environment (~food). |
LifeSpace |
getLifeSpace()
|
DigitalOrganism |
getNeighbourRandomly(DigitalOrganism digorg)
Returns one organism of the neighbours of the organism specified by the parameter. |
java.util.Random |
getRandom()
The only one random-generator in one Physis-instance should be in the environment. |
TaskLibrary |
getTaskLibrary()
Returns the tasklibrary. |
void |
interactionOccured(InteractionEvent ie)
Performed when an organism interacts with its environment. |
void |
proliferationPerformed(ProliferationEvent pe)
When a digital organism divides the new organism must be placed somewhere in the lifespace and the old organism's effective length should be recalculated. |
void |
rotateForward(DigitalOrganism digorg)
Rotates the organism's facing forward. |
void |
setLifeSpace(LifeSpace lifespace_)
|
boolean |
shouldBeDeleted()
Answers the question: Should the current divided codetape be deleted one instruction? |
boolean |
shouldBeInserted()
Answers the question: Should the current divided codetape be inserted extra instructions? |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private static java.lang.String RANDOM_SEED
private static java.lang.String TASK_FILE
private static java.lang.String COPY_MUTATION_RATE
private static java.lang.String DIVIDE_MUTATION_RATE
private static java.lang.String INSERT_RATE
private static java.lang.String DELETE_RATE
private static java.lang.String INPUT_DATA_HIGHER_BOUND
private java.util.Random rnd
private Nurse nurse
private TaskLibrary tasklibrary
private LifeSpace lifespace
private double copy_mutation_rate
private double divide_mutation_rate
private double insert_rate
private double delete_rate
private int input_data_higher_bound
| Constructor Detail |
public EnvironmentImpl()
| Method Detail |
public TaskLibrary getTaskLibrary()
getTaskLibrary in interface Environmentpublic void setLifeSpace(LifeSpace lifespace_)
setLifeSpace in interface Environmentpublic LifeSpace getLifeSpace()
getLifeSpace in interface Environmentpublic void interactionOccured(InteractionEvent ie)
InteractionEventListenerinteractionOccured in interface InteractionEventListenerpublic void proliferationPerformed(ProliferationEvent pe)
ProliferationEventListenerproliferationPerformed in interface ProliferationEventListenerpublic int getInputData()
getInputData in interface Environmentpublic void rotateForward(DigitalOrganism digorg)
rotateForward in interface Environmentpublic boolean copyShouldBeMutated()
copyShouldBeMutated in interface Environmentpublic boolean divideShouldBeMutated()
divideShouldBeMutated in interface Environmentpublic boolean shouldBeInserted()
shouldBeInserted in interface Environmentpublic boolean shouldBeDeleted()
shouldBeDeleted in interface Environmentpublic DigitalOrganism getNeighbourRandomly(DigitalOrganism digorg)
EnvironmentgetNeighbourRandomly in interface Environmentpublic java.util.Random getRandom()
EnvironmentgetRandom in interface Environment
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||