This commit is contained in:
Enrico Fasoli 2015-09-30 18:06:16 +02:00
parent f5b0af6d12
commit 7e6f3c8f1b

View File

@ -2,7 +2,8 @@
## Creature Structure ## Creature Structure
Each creature is represented as a matrix of blocks in a 2D grid world Each creature is represented as a matrix of blocks in a 2D grid, but all creatures and
structures only occupy one block in the world matrix.
There are three kinds of blocks: There are three kinds of blocks:
- neuron blocks - neuron blocks
@ -13,13 +14,14 @@ TODO: energy system
### Connection ### Connection
Each block is connected to every other adiacent block - Each block is connected to every other adiacent block (diagonals too), so each block has 9 connection weights.
`source block output ->>>- * weight ->>>- destination block` `source block output ->>>- * weight ->>>- destination block`
- A connection has a weight, which is a floating point number. - A connection has a weight, which is a floating point number.
- The connection outputs its source block's current stored signal multiplied by the weight. - The connection outputs its source block's current stored signal multiplied by the weight.
- If the weight is `0`, then there's no connection - If the weight is `0`, then there's no connection
- the weight is a floating point number between -1 and 1 included.
### Signals ### Signals
@ -42,13 +44,25 @@ They take an input signal and act by doing something, for example:
### Sensor (Input) blocks ### Sensor (Input) blocks
They give adiacent blocks a signal, for example: They give adiacent blocks a signal.
- they communicate how far is the first block in a straight line Some examples:
- they communicate the amount of blocks in relation to blank spaces in an area
- they communicate how far is the first structure in a straight line
- they communicate the amount of structures in relation to blank spaces in an area (popularity in an area)
- they communicate the color/type/activity of the first block in a straight line - they communicate the color/type/activity of the first block in a straight line
- they communicate information about the presence of a particular kind of block in a direction - they communicate information about the presence of a particular kind of structure in a direction
- they communicate information about the creature itself, like integrity of adiacent blocks - they communicate information about the structure itself, like integrity of adiacent blocks
Generated signals are floating point numbers ranging from -1 to 1 included.
### Combined (Input+Output) blocks
They act as Sensor blocks and Action blocks at the same time.
Examples:
- a "mouth" block that can communicate wether food is available to eat and can receive eat commands at the same time
### Traversing the brain graph ### Traversing the brain graph