physis.core
Interface DigitalOrganism

All Known Implementing Classes:
DigitalOrganismImpl, RemoteDigitalOrganism

public interface DigitalOrganism

A digital organisms are the most important entities in this system. The main aim is to make or let them evolve to smarter and smarter. Smarter means self-replicate and performe computational tasks quickly.
Technically it's a virtual machine plus a codetape. The virtual machine executes the instructions of the codetapes. By the execution of the code it can replicate itself, but this replication process is noisy, so the replication process can yield new codes. This is the main engine of the evolution in this system. Hopefully experiments carried out by Physis will answer the question: Is this enough to create diversity?
CRC
1. It serves as a frame containing the organism's parts: Metabolism, Merit, virtualmachine.


Method Summary
 int getAge()
          Gives the age of the organism.
 int getEffectiveLength()
          Returns the effective length.
 double getFitness()
          Returns the fitness value of the organism.
 Genome getGenome()
          Gives the genetic information of the organism.
 int getGenomeSize()
          Gives the size of the organism's genome.
 int getMerit()
          Retruns the merit.
 Metabolism getMetabolism()
          Gives the Metabolism of the organism.
 DigitalOrganism getNeighbour()
          Returns the organism's neighbour.
 PerformedTasksRegister getPerformedTasks()
          Gives the container of the performed tasks.
 java.lang.Object getPositinInfo()
          Gives the position information.
 PhysisVirtualMachine getVM()
          Returns the organism's internal virtual machine.
 void increaseAge()
          Increments the age by 1.
 boolean isAlive()
          Tells whether the organism is alive or not.
 boolean isFertile()
          Tells whether the organism is fertile (capable to yield a child).
 void kill()
          Kills the organism.
 void recalculateBonus(double bonus_multiplier)
          Recalculates the organism's bonus by multiplying it with the bonus multiplier.
 void recalculateEffectiveLength()
          Recalculates the effective length.
 void recalculateFitness()
          Recalculates the fitness.
 void setFertile(boolean fertility)
          Sets the fertility flag.
 void setNeighbour(DigitalOrganism digorg)
          Sets the organism neighbour.
 void setPositionInfo(java.lang.Object o)
          Sets the position information.
 void update()
          Updates the organism's state by executing one cpu-cycle.
 void update(int cpu_cycles)
          Updates the organism's state by executing given amount of cpu_cycles.
 void vivify(DigitalOrganism neighbour_, GeneticCodeTape codetape, int inherited_length)
          Makes the organism to be alive.
 

Method Detail

vivify

public void vivify(DigitalOrganism neighbour_,
                   GeneticCodeTape codetape,
                   int inherited_length)
Makes the organism to be alive. (Fills the vital parts.) This operation should entirely reset the organism's state.
Parameters:
neighbour_ - The organism to which this is facing.
codetape - The new seed.
inherited_length - The newly born organism inherits the parent's effective length. (This is a trick: the newly born organism should have some reasonable value in order to survive. In the next update after it's born the effective length is recalculated.

kill

public void kill()
Kills the organism. Technically this means only setting a flag to false. The vivifyy method takes the responsibility to bring the organism into a consistent state.

increaseAge

public void increaseAge()
Increments the age by 1. Ususally it should happen after an update.

getAge

public int getAge()
Gives the age of the organism.

isAlive

public boolean isAlive()
Tells whether the organism is alive or not.

isFertile

public boolean isFertile()
Tells whether the organism is fertile (capable to yield a child).

setFertile

public void setFertile(boolean fertility)
Sets the fertility flag.

getGenome

public Genome getGenome()
Gives the genetic information of the organism.

getGenomeSize

public int getGenomeSize()
Gives the size of the organism's genome.

getMetabolism

public Metabolism getMetabolism()
Gives the Metabolism of the organism.

getPerformedTasks

public PerformedTasksRegister getPerformedTasks()
Gives the container of the performed tasks.

update

public void update()
Updates the organism's state by executing one cpu-cycle.

update

public void update(int cpu_cycles)
Updates the organism's state by executing given amount of cpu_cycles.

getVM

public PhysisVirtualMachine getVM()
Returns the organism's internal virtual machine.

getFitness

public double getFitness()
Returns the fitness value of the organism.

recalculateFitness

public void recalculateFitness()
Recalculates the fitness. Should be callled after successfull divede (by the Environment)

recalculateBonus

public void recalculateBonus(double bonus_multiplier)
Recalculates the organism's bonus by multiplying it with the bonus multiplier.

getEffectiveLength

public int getEffectiveLength()
Returns the effective length.

recalculateEffectiveLength

public void recalculateEffectiveLength()
Recalculates the effective length.

getMerit

public int getMerit()
Retruns the merit.

setNeighbour

public void setNeighbour(DigitalOrganism digorg)
Sets the organism neighbour.

getNeighbour

public DigitalOrganism getNeighbour()
Returns the organism's neighbour.

setPositionInfo

public void setPositionInfo(java.lang.Object o)
Sets the position information. The actual type of the info are is determined by the

getPositinInfo

public java.lang.Object getPositinInfo()
Gives the position information.