physis.core
Class Merit
java.lang.Object
|
+--physis.core.Merit
- public class Merit
- extends java.lang.Object
It's the merit of the digital organism. It's earned by counting the executed or copied instructions and multiplied this number with the bonuses.
CRC
1. Storing the organism's merit value.
2. Calculating the fitness value with as a function of gestation time.
|
Constructor Summary |
Merit()
|
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
bonusmultiplier
private double bonusmultiplier
effectivelength
private int effectivelength
Merit
public Merit()
calculateFitness
public double calculateFitness(int gestation_time)
- Fitness is calculated by the merit divided by the gestation time.
getMeritValue
public int getMeritValue()
- Merit equals the effective length multipled by the bonuses.
setEffectiveLength
public void setEffectiveLength(int effective_length)
- Sets the effective length. After updates it should be updated and when proliferating.
getEffectiveLength
public int getEffectiveLength()
setBonusMultiplier
public void setBonusMultiplier(double bonus_multiplier)
- Sets the bonus multiplier.
multiplyBonus
public void multiplyBonus(double bonus_multiplier)
- Multiplies bonus multiplier. It should happen only after task completition.
getBonusMultiplier
public double getBonusMultiplier()