Behavior Editor Implementation


The Behavior editor is a LARGE part of the game. Its what helps us in later stages decide what our microbes and multicellular organisms act and think. I would very much be up to the task of starting some work on prototyping and implementation, but I came to realise that the AI is going to need to be reworked before we start doing that.

Could we make the AI modular? And if so, would having proper speciation and generation make this easier? Or perhaps finding some way to germeate the players cell throughout the enviroment?


Interesting. It’s cool you’ve got a passion to work on this, that is great.

What do you imagine the behaviour editor actually doing? Is it just programming the ai for members of your species that aren’t you? (Because you control yourself). Does it have some effect on the CPA system? I guess this would be in the much talked about but not actually started predation formula. I guess also if we had sub-patches / associations then those might be programmable too.


Ive always had the vision of a node based system of sorts, with panels to help you move between different areas of behaviors. I imagine it would program members of your species, and later help you create mannerisms and other such things that help control your own cell too. And of course, since your rewiring how your species functions it would be obvious to have it cost MP.

I can imagine it having a very large impact on the CPA system. Say overtime you move your population from a herbivorous species to a carnivorous species, eventually the compound distribution and populations would fluctuate to keep up with a new predator on the scene. And a predation formula? I thought that was accounted for in the CPA system?

Im thinking atm we can start changing the AI so that it runs off of certain blocks of code? It might not work, but we haven’t even talked about this much to my knowledge so hey, a stab in the dark is still a stab.


I was thinking we could have a simplified neural net with preset logic gates (which you could also accomplish with a neural network). So you would have inputs, such as compound direction and predators, and you would be able to change the “weight” of the connections and the action potential of each link. The outputs would then be rotation (with a negative value being clockwise and a positive counter-clockwise) and thrust (WASD keys for the player). Later you would add additional outputs such as toxin release. This net would be auto generated by the computer for the player depending on the organelles, but the player would be able to modify it. Similar would be for the AI species, with the net being originally preset based on the organelles, but it could be changed for more aggressive or passive behavior. For those of you who will say that neural networks are inefficient, keep in mind that we aren’t “evolving” and “training” it in the sense that most companies use ANNs. We start with an already working one, and any change will still be considered a viable neural network that wouldn’t result in the cell spinning in a circle. Finally, neural networks are sooo fast compared to any other AI we could build since it’s basically just adding/subtracting integers and then comparing them to a threshold.

I actually have a fairly extensive knowledge of neural networks, so ask me if you need help. Good luck!


Sounds good! What your proposing is eerily similar to my thought process, but basically listen to what TheCreator said. I mightn eed your help in the future if you have the time.


How does this relate to the ai of the other microbes? Surely what we’re really saying is that the player should be able to program the ai for their species but we want to program an evolving ai for all the other species as well. Would it not make sense to merge the two systems. So have something, like the neural net, control all the ai microbes and have the players species have one and let the player play around with it?

So basically every species might have the same network with different weights and the weights are either set but auto-evo or by the player?

Also what the exact inputs would be needs some thought. For example each input must be a number between 0 and 1 so what if there are 4 microbes on the screen in different directions from different species? How is all that turned into numbers?

Cool problem. Hope you enjoy working on it Montanaspud!


I feel that if we have the species generated by auto-evo, auto-evo should very much cover their neural networks. Also, I would think that the neural networks would be very similar, but different depending on organelle count and such. So a photosynthesizing cell would have priorities based more on finding CO2 and light-spots than a free-moving cell, which might focus on finding glucose and oxygen in the environment, and avoiding other cells.

The problem with weights could also depend on the organelle count, and if we could determine this, the fitness of that organism. Do the inputs have to be somewhere between 0 and 1? Or could the inputs vary a bit more?

Ill start prototyping this as soon as I can.


All microbes will have a different neural net that will change itself depending on the physiology of the microbe. The only difference is that the player will be able to edit his auto-generated (so you could immediately play after adding a toxin vacuole and not fearing that other members of your species wouldn’t use it) neural network. So I don’t really see “two systems” as you called them.

Each player will have different neural networks. The weights and thresholds would change over time, but so would the topology. You would get extra inputs (when you evolve signal agents and stuff) and outputs (such as flagellum and toxin ejection).

The inputs would likely not be between 0 and 1; neither would be the firing thresholds and the outputs. We could obviously have a node that fires only one or zero, but a lot of the time we would love to have a logistic function, so you would output a higher number if the input was higher (for things like movement).

The species would have to decide which species was more of a threat/more of a food source. We’ll be using logic gates and simple operations (which can all be formed using nodes, we just use this as an abstraction), so we could have a Max node with two inputs. The first input would be species1 (1 if present or 0 if not) multiplied by distance and weight of connection (say 3), while the second would be species2 (1 or 0) multiplied by distance and weight of the connection (say 5), so if this species1 and species2 are both the same distance away, the Max node will only relay the information for the second species (larger value) and the species will move accordingly.

Say both species 1 and species2 are predators, we wouldn’t want to go away from species2 only to run in the opposite direction and hit species1. In this case, we would not use a Max node, and would blend both inputs to instead move in a direction that gets us as far away as possible from both. I have a prototype of this lying somewhere…

Does this make sense? I’ll try to draw up the neural networks for all the species we have so far, so it is easier to implement (and then we could actually move onto evolving/modifying them).


It makes total sense. Though the AI will have to be reworked somewhat, for each species. A prototype would be nice to start out with. I can get on that myself.

Its also worth noting that the behavior editor, at least in the later stages, not only functions as a way to make the AI of your species, but also as a “tech tree” of sorts(not an actual tree but you get the idea), with you overtime evolving your species together. Signal Agents and Bonding agents, as well as class structures, reproduction, all of these things ARE covered by the editor.

How would we make it so that the species naturally bond together using the editor?


Cool well you know I love prototypes. Go nuts!

Here’s the old ai thread if you need any inspiration.


Also, if it helps, there’s this thread from the older forums (which unfortunately has all the pictures missing):