|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--tjhGene
A tree structure of genes, each with a simple type (RED/GREEN) and a neuron. When a creature is born, a tree of tjhCell's is created that mirrors this tree representation of genes.
| Field Summary | |
protected static int |
GREEN
fixed enum type value for a green cell (root cell is drawn in pink but always behaves like a green) |
protected boolean |
has_parent
does this gene have a parent? |
protected static int |
MAX_SUBNODES
the maximum number of allowed daughter cells per cell |
tjhNeuron |
neuron
the neuron associated with the cell |
protected static float |
P_MENTAL_MUTATION
the probability of a mental mutation |
protected static float |
P_PHYSICAL_MUTATION
the probability of a physical mutation |
protected tjhGene |
parent
a reference to the gene's parent if it has one |
protected static int |
RED
fixed enum type value for a red cell |
java.util.Vector |
subnodes
list of the subnodes of this gene |
int |
type
the type of the cell (RED/GREEN) |
| Constructor Summary | |
tjhGene()
default constructor |
|
| Method Summary | |
void |
Copy(tjhGene other)
gene replication routine |
void |
InitSimple()
simple initialization from scratch, creates a creature with a red arm and a green arm |
protected boolean |
MentalMutationCalledFor()
decides whether a mental mutation should happen this time |
protected int |
NumBelow(int type_requested)
counts the total number of cells below this point of the type specified (recurses) |
protected boolean |
PhysicalMutationCalledFor()
decides whether a physical mutation should happen this time |
protected int |
TotalNum(int type_requested)
counts the total number of the specified type of cell in the creature (calls NumBelow) |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
protected static final int GREEN
protected static final int RED
protected static final float P_PHYSICAL_MUTATION
protected static final float P_MENTAL_MUTATION
protected static final int MAX_SUBNODES
public int type
public tjhNeuron neuron
protected boolean has_parent
protected tjhGene parent
public java.util.Vector subnodes
| Constructor Detail |
public tjhGene()
| Method Detail |
public void InitSimple()
public void Copy(tjhGene other)
protected boolean PhysicalMutationCalledFor()
protected boolean MentalMutationCalledFor()
protected int TotalNum(int type_requested)
protected int NumBelow(int type_requested)
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||