README.md |
AIrium 2
Creature Structure
Each creature is represented as a matrix of blocks in a 2D grid world
There are three kinds of blocks:
- neuron blocks
- action blocks
- sensor blocks
TODO: energy system
Connection
Each block is connected to every other adiacent block
source block output ->>>- * weight ->>>- destination block
- 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.
- If the weight is
0
, then there's no connection
Signals
A signal is a floating point value. Each block stores a signal (initialized at 0 which is a null signal).
Neuron (Processing) Blocks
Their output is the sum of all their input connections' current output.
Action (Input) blocks
They take an input signal and act by doing something, for example:
- they move the body in space
- they eject something
- they change color
- they interact with other structures
- they "eat" a block
- nothing (can be useful to stop signals from passing through)
Sensor (Input) blocks
They give adiacent blocks a signal, for example:
- they communicate how far is the first block in a straight line
- they communicate the amount of blocks in relation to blank spaces in an area
- 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 creature itself, like integrity of adiacent blocks
Traversing the brain graph
for each iteration, the stored signal
of each block is calculated using its input connection.
This new stored signal
is stored in a special variable without overwriting the current stored signal
so that the process can be easily accomplished in multithreading execution environments.
After all the new stored signals
have been calculated, their value is applied to the current stored signal
and the calculation process is repeated. This way, signals can propragate around
World Structure
A creature is a matrix of blocks, each adiacent block is connected. The blocks make up both the body and the mind.
The world is a matrix where each cell is either empty or occupied by something. Every structure occupies only one cell.