Home Creators Posts Import Register Favorites Logout

Downloads

Content

The evolutionary algorithm in The Bibites 0.6 and earlier is an old, archaic thing I cobbled together almost ten years ago, when I had no idea what I was doing, and have been trying to make work ever since (which I've barely managed lol).

Over time, we identified many issues and kirks that limited what evolution could do. And, as we all know: the larger the space evolution can explore, the more chances it has to find something to surprise us with.

So, over the years, I kept thinking about what kind of model could take things further. Eventually, I landed on what I decided to call the BIOME genetic algorithm:

Biologically-Inspired Open-ended Modular Evolution

The core idea is to make the Bibite’s systems more independent and evolvable. Rather than relying on one fixed list of genes and one fixed set of brain inputs and outputs, a Bibite is described by a network that can grow, shrink, and reorganize over evolutionary time.

A Bibite’s BIOME network is made of Nodes, Connections, and Modules. Together, these describe its structure, systems, and behaviour.

Its brain is part of this network. Its genes are part of this network. Its stomach is part of this network. And so on.

Of course, BIOME does not magically let evolution invent completely arbitrary game systems from nothing: the available kinds of modules are still implemented by the game. But evolution is free to change how many instances of those modules exist, how they connect, and how their parameters and structure evolve.

Modules

Modules contain input and/or output Nodes, along with the system that processes their values. A module can influence the Bibite directly, produce values through its output Nodes, or do both.

For example, a Bibite may have Clock Modules, similar to the internal clock in previous versions, which allow it to sense time. A Bibite could evolve several clocks with different frequencies and purposes.

The same principles applies to all systems. The Reproduction module, taking care of producing copies of the bibite, could be de-evolved entirely, which would probably be a terrible evolutionary strategy, but that is evolution’s problem to figure out!

Some more advanced modules, such as the planned vision rework, will also be able to contain internal sub-networks for more complex processing.

Nodes and Connections

Nodes are the common language of the whole system. They hold runtime values, and can act as inputs, outputs, or hidden processing nodes.

A node’s output is calculated from its incoming stimulation, its activation function, and a default activation value. The properties of that activation function are themselves evolvable genes.

This means Nodes now cover roles that used to be separated between genes and neurons. For example, colour-related values can be Nodes too, which means they can potentially change during a Bibite’s lifetime. (Yes! Chameleon Bibites!)

To keep this from becoming complete chaos, Nodes also carry genes called an Association Vector. This places them in an abstract relational space that influences how likely they are to form connections with one another.

The first component, X, acts roughly like a layer or direction within the network. The other components describe relational similarity. Connections are more likely to form between Nodes that are close in this association space and that follow the network’s preferred direction. But unlikely does not mean impossible!

You can think of this as helping different kinds of signals naturally organize themselves: relatively stable genetic values can influence slower hormonal signals, which can influence fast-changing behavioural and neural signals.

But Association Vectors can mutate and drift, or less-likely connections can still occur. Over many generations, this can let lineages discover new capabilities.

For example, a colour-related Node might be initialized as a "genetic" node, but could gradually drift to hormonal or behavioural parts of the network, eventually allowing a lineage to evolve colour-shifting behaviour.

Connections are otherwise familiar: they link one Node to another and have an evolvable strength. They also carry their own mutation-related genes, including the chance for a connection to split and introduce a new Node, or, in some cases, an inline module.

How Mutation has changed

In BIOME, Modules, Nodes, and Connections each carry their own functional and mutation-related genes.

This lets evolution change not only a structure’s behaviour, but also how readily that particular structure changes in future generations. Some parts of a Bibite can become highly stable, while others remain flexible and exploratory.

Structural changes are now part of the system too. Nodes and Modules can be removed, hidden Nodes can duplicate, Connections can gain redundancy, and a Connection can split to create a new Node or inline module.

These processes are controlled by genes such as Expressivity:

Below 0, Expressivity can lead to deletion.

Above 1, it can lead to redundancy or duplication.

Between 0 and 1, it currently does not control whether the structure is present.

The long-term plan is for values between 0 and 1 to represent the chance that an element is expressed in the Bibite’s phenotype at birth. A module with an Expressivity of 0.1, for example, would have only a 10% chance of being expressed, while still remaining in the genotype. This could allow dormant or “junk DNA”-like structures to persist until evolution finds a use for them.

That phenotype-expression system is planned for the next future alpha; it is not implemented yet.

For now, the Genotype panel lets you inspect the genes of individual Nodes, Connections, and Modules.

There is also a Runtime panel. At the moment, it is still largely derived from the Genotype panel, but it shows runtime values rather than genetic values. Eventually, I want to build something closer to the old brain panel, although displaying modules in there is going to be a fun challenge.

Performances

Ah, and yes, also: I told myself. I'm already rewriting the whole genetic algorithm powering the simulation, why not rewrite it in a new framework? Performance with the bibites is pretty bad, and simulations always profit from being more efficient. Evolution is also sometimes a slow process, so being able to run the simulation faster, and larger environments with more bibites would help tremendously. So we implemented it using a ECS framework in Unity DOTS, which also has the bonus of being multithreaded by default!And the results speak for themselves :

With those kinds of numbers, 10k+ bibites and 50k pellets, my framerate would drop to 1 fps, and sim/real would be at most X0.1This is almost a 25X improvement in performance!This factor will be a bit lower for most machines, but still it's very impressive, and we still have a lot of leeway to improve things a bit further. Just the fact that this is a development build, with better error reporting and memory tracking, is diminishing performance by ~10-20% compared to a production build.Very Exciting!

But... What's missing?

Alas, a lot. This is mostly an alpha to test the performance difference across different machines and find bugs or problems with the core of the new BIOME framework. As such, most of the UX/UI you're used to in 0.6 has not yet been ported to work with this new framework:

No Saving/Loading of both Simulations and Bibites

No Bibites Library

No Data Tracking (apart from info panel)

No Species Tracking

No Towers (like phero tower, color selector, etc.)

No Bibites or Pellets Placement

Lots of user interactions lost, like turning bibites (But moving and yeeting things around still possible)

No sprites based on genes (They don't have genes anymore, so that would be a bit complex to implement for this first alpha, and we're planning to move to full animated procedural sprites in the near future, so f this), but hey! Legacy Bibite Sprites!

In the same way many functionnal systems have not been implemented ad-hoc, or at all:

No collision damage

No colors (see procedural sprites), but also yay, lecacy sprites

No diet gene (we're planning something about that)

No Grabbing

No Eggs, all live births

No Pheromones (we're planning to completely rework the pheromone system to allow far more possible pheromone types with varying properties)

Many Simulation Settings not yet implemented (but many yes, have fun figuring out which ones!)

Most systems behaving slightly differently compared to 0.6

Lots of previous neuron activation functions are not implemented anymore (mostly the non-linear ones, which will take the form of modules)

Linux has some problems with pretty much all shaders

But.... We have a test of procedural pellets shaders in... so... you know... that's nice.

So what's next?

For next alpha we have a few priorities:

Fix the 2139021 bugs you're all going to find

Implement Saving/Loading of simulations and bibites

Implement some missing systems, like grabbing, collision damages, etc.

Add a lot more module types

Implement the full Expressivity system (so that modules/nodes/connections present in a bibite's genotype don't necessarily show up in their actual body )

Implement missing simulation settings, and remove the deprecated ones from the Dynamic Settings and Scenario Editor panels

Can't wait for the future!

As always, you can have access to the new BIOME alpha branch on Steam by following these instructions with the password "BIOMEisawesome"

Files

Comments

IceGame

Very excited for the future!

Blake Mullins

One small step for bibites, one giant leap for bibitekind.

Erick Gago

Can't wait to try this once I get back from vacation 😄

Dragonly44

Finally I get to deep fry my Computer even more