Welcome to the Creatures Wiki! Log in and join the community.

C3/DS SVRules

From Creatures Wiki
Jump to navigation Jump to search

Creature brains use a neuronal processing system, called "State Value Rules", commonly shortened to SVRules.

These were fairly simple in Creatures 1 and Creatures 2, essentially designed to let you perform simple manipulations upon Creature variables (ie, biochemistry and brain values), with the possibility of adding conditions based upon these variables.

In Creatures Evolution Engine games such as Creatures 3, each neuron and dendrite is a fully functional register machine. That means that you have several registers (places where you can store something) and one special working register. The most important commands on a register machine are LOAD, which loads a value into the working register and STORE, which stores a value from it into one of the other registers.

Operations like ADD always use the value of the working register. Look at the following example, which adds the value from register 1 to the one of register 0 and stores the new value in register 2:

  • LOAD 0
  • ADD 1
  • STORE 2

The SVRules system adds some extensions to the usual register machine, like access to the Creature's chemical system or to its reception.

Take your favourite genetic editor and take a look into one of the Brain Lobe or Brain Tract genes to get a full (?) list of supported operations.

A good place to learn more about the brain is The Creatures Developer Resource

A note from the programmer[edit]

This SVRule system was designed to deal with an interesting problem: How could I specify arbitrary behaviours for my neurons in a way that evolution could freely change, without it generating endless syntax errors in the process? For instance, imagine that a mutation were to occur in a line of conventional C++ code, such as "for (i=0; i<num; i++)". Almost every possible mutation would render the code unreadable (e.g. "fxr (i-0; ibnum; i4+)") and the chances of a useful (or even viable) mutation would be extremely low. At worst the whole simulation would crash. To solve this problem I designed the SVRule system in such a way that EVERY statement you can write in it is legal and meaningful, even if it is not biologically useful. If a token was originally the operand for a command, for example, and the command later mutated to one that didn't require operands, the token would now be interpreted instead as a new command or a variable. The details of this aren't very important, but I guess it's an interesting example of the ways in which biology differs from computer programming. Biology tends to have this sort of robustness built into the design. Digitalgod 12:39, 4 Apr 2005 (EDT)


List of State Variable Rules (Genetics Kit)
store in
load from
if =
if <>
if >
if <
if >=
if <=
if zero
if non-zero
if positive
if negative
if non-negative
if non-positive
subtract from
multiply by
divide by
divide into
minimum with
maximum with
set tend rate
tend to
load negation of
load abs of
get distance to
flip around
no operation
register as spare
bound in [0,1]
bound in [-1,1]
add and store in
tend to, store in
Nominal Threshold
Leakage State
Rest State
Input Gain Hi Lo
Signal Noise
Winner Takes All
ShortTerm Relax Rate
LongTerm Relax Rate
store abs in
stop if zero
stop if nonzero
if zero goto
if nonzero goto
div by, add to neuron input
mult by, add to neuron input
goto line
stop if <
stop if >
stop if <=
stop if >=
Reward Threshold
Reward Rate
Use Reward With
Punish Threshold
Punish Rate
Use Punish With
Preserve Neuron SV
Restore Neuron SV
Preserve Spare Neuron Var
Restore Spare Neuron Var
if negative goto
if positive goto

External links[edit]