The ongoing saga of snail mating decisions

I’ve written about snail breeding here before, at length. However, since I now want snail behavior to go through the brain I had to rework the trigger that led to two snails mating and producing offspring. A few different things had to be prototyped to make this work, especially because in a snail’s mind there is no real way of distinguishing food from another snail without learning from experience and some basic instincts to guide the way.

When I started, snails tried to mate with lettuce leaves. Technically possible, but they should learn that this is a little…ineffective.

Then, the snails just kept overshooting each other when trying to approach. Approaching inanimate objects is easy - they don’t move. However, one snail kept targeting the other snail’s current position, and vice versa, and they ended up in the wrong spot. The solution (for now) was to have each snail target the other snail’s target position. This is kind of dumb, because of course the Snail A can’t read minds and see where Snail B is going, so I’ll have to find a non-hacky better way of doing it by basically seeing if the two snails will cross paths on their way to one another and meet each other in the middle instead.

Anyway, then the snails did reach each other but started biting each other as if the other snail was a food item. This resulted in one snail becoming deathly afraid of the other one and trying to run away (and sometimes biting back). Basically the two snails grew to despise each other and want nothing more than to go in opposite directions.

Then they stopped eating.

Then I created scent signatures for other snails and items. Right now this basically just shows an object’s highest macro or fertility rate. This is placeholder, but now snails can “smell” other fertile objects nearby. In the future they’ll also be able to get hungry for certain macros and favor food items which smell more like the thing they’re hungry for.

I also made a sex drive and food drive, so a snail might try to bite an object instead of mating with it if it smells like carbs and its food drive is higher than its sex drive. This can also be used for the snail’s decision about which object it wants to approach (so, we can use this to apply higher weights to certain inputs).

Then I realized there was no good way to test this efficiently without making it easy to move snails around within the jar (without having to go and change positions in the db each time). This way I could place snails next to the objects I wanted them to interact with or detect easier.

And then…then…well, this happened:

(Obviously I need to have them get tired and/or have their sex drive go down after they mate)

The eggs don’t hatch until tomorrow…and I’m both curious and terrified of what will happen then, because I do not yet have a minimum maturity rate for snail breeding.

comments powered by Disqus