physis.core
Interface Environment

All Superinterfaces:
java.util.EventListener, InteractionEventListener, ProliferationEventListener
All Known Implementing Classes:
EnvironmentImpl, PhysisVMTracer

public interface Environment
extends InteractionEventListener, ProliferationEventListener

The environment of an organism is defined by the surrounding physical world - in Physis: the tasks and the other organisms. CRC
1. handling the interactions between the organism and the environment - InteractionEventListener, task
2. handling the placement (killing) when birth of new organism - ProliferationEventListener
3. handling the interactions between organisms (parasitism, )
4. proxy for random number generation


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()
          The container of the tasks.
 void rotateForward(DigitalOrganism digorg)
           
 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 interface physis.core.event.InteractionEventListener
interactionOccured
 
Methods inherited from interface physis.core.event.ProliferationEventListener
proliferationPerformed
 

Method Detail

getTaskLibrary

public TaskLibrary getTaskLibrary()
The container of the tasks.

setLifeSpace

public void setLifeSpace(LifeSpace lifespace_)

getLifeSpace

public LifeSpace getLifeSpace()

getInputData

public int getInputData()
This provides the input from the environment (~food).

rotateForward

public void rotateForward(DigitalOrganism digorg)

copyShouldBeMutated

public boolean copyShouldBeMutated()
Answers the question: Should the current copied instruction be mutated?

divideShouldBeMutated

public boolean divideShouldBeMutated()
Answers the question: Should the current divided codetape be mutated?

shouldBeInserted

public boolean shouldBeInserted()
Answers the question: Should the current divided codetape be inserted extra instructions?

shouldBeDeleted

public boolean shouldBeDeleted()
Answers the question: Should the current divided codetape be deleted one instruction?

getNeighbourRandomly

public DigitalOrganism getNeighbourRandomly(DigitalOrganism digorg)
Returns one organism of the neighbours of the organism specified by the parameter.

getRandom

public java.util.Random getRandom()
The only one random-generator in one Physis-instance should be in the environment. There shouldn't be more than one, otherwise accurate experiment repeat would be impossible.