vibespire.ai / Wild Habits /

how it's made

open the meadow β†—

Vibespire presents

How Wild Habits Is Made

Nothing in this meadow decides to bow. Two creatures wander within two metres of each other, something outside both of them rolls a die, and each is handed a partner. Every gesture you read as intention is an impulse applied to a spring that was already running.

PAIRED

Both figures on this page are one running simulation.

The individual

A personality is a handful of rolls

Nothing here is authored per creature. Everything that makes one inhabitant different from its species-mates comes out of one seeded random number generator, in one function, at spawn.

The body is a roll: a size between 0.8 and 1.25 that scales the whole animal and its jump, and four colours jittered in hue, saturation and lightness from a species base β€” with the lightness deliberately biased darker, because washed-out pastels disappear against a cream world. About one in eighteen comes out rare: a cream body with vivid accents.

The springs are a roll too. Every animated channel in the engine has a frequency, a damping ratio and an initial response, and each individual multiplies its own numbers onto the shared tuning: frequency by 0.85–1.3, damping by 0.85–1.15, dangly looseness by 0.8–1.25, speed by 0.85–1.15. That is the whole of what makes one wisp snappy and its neighbour floaty.

And the temperament is four numbers between zero and one β€” boldness, sociability, playfulness, energy β€” read only by the brain. Sociability and playfulness never roll below 0.25 and 0.2, because a creature that will not talk to anyone is not a character, it is scenery.

boldnesswhether a crab challenges an intruder at its den, and how hard
sociabilitythe chance the matchmaker pairs two neighbours for a bow
playfulnesswhether a pip chases a butterfly, and whether it is eligible for tag
energythe odds of wandering rather than idling when a decision comes due

Two dozen creatures, one seed, and every one of them different in five ways before it has done anything at all.

The brain

A ladder of rolls, and mostly nothing

There is no behaviour tree and no planner. When a creature's current state runs out, one function runs down a fixed ladder and takes the first thing that fires.

Carrying something? Deal with that first β€” a crab takes it home, anything else drops it, because a stranded pebble is a bug that lasts forever. A crab with a den checks its territory: any non-crab within 2.7 metres provokes a claw display with probability 0.3 + boldness Γ— 0.55. Thirst, which climbs at between 0.008 and 0.018 a second and so comes due every minute or two, sends anyone to the pond's edge.

Then the species routines. A crab looks for a loose pebble 55% of the time. A pip rolls playfulness Γ— 0.5 against the nearest butterfly flying below 0.85m within eight metres, and β€” once past a delay rolled at spawn β€” a further 35% chance of raiding a crab's hoard and dropping the loot nine to fourteen metres away.

If nothing fires, it wanders with probability 0.32 + energy Γ— 0.45, and otherwise sits still. Most creatures, most of the time, are doing nothing, and that is the point: a meadow where everybody is always up to something reads as a machine.

The plan beside this labels every creature with the state its brain is actually in. Watch how many of them say idle or wander β€” and how the interesting words arrive in pairs.

The running simulation's own agent.brain.state, plotted by this page. Lines join agents the matchmaker paired.

Hands on

Try it

The same simulation as the plan above, seen from inside. The camera is choosing its own subjects β€” that is a module, not a person, and it is the last section of this article.

time

The actual Agent, Brain, Social and Director, imported by this page. Drag to take the camera; the demo itself lets you click a creature to follow it.

The matchmaker

Pairing lives outside the brains

Two creatures bowing to each other is two brains agreeing on a fact. Left to themselves they would disagree β€” one commits, the other has already wandered off β€” so nothing about pairing is inside a brain at all.

A single object scans the whole meadow five times every four seconds and assigns interactions. It writes both halves at once: a.brain.startGreet(b) and b.brain.startGreet(a), on the same line. Neither creature ever decides to greet anybody.

The order of that scan is a design decision. Dances go first, at 8.5% a scan, because a dance needs a whole troupe free at the same moment and would never win a race against pair-offs; recruits are pulled in even if they are on a social cooldown, since nobody should sit out a dance. Then greetings: two available creatures between 0.4 and 2.4 metres apart, at a chance of average sociability Γ— 0.14, and at most one new greeting per scan so the meadow does not suddenly break into applause. Then tag, at 16%, among the non-crabs with playfulness above 0.35 who are within five and a half metres of each other.

After any interaction ends, a creature is unavailable for ten to twenty-eight seconds. That cooldown is most of what keeps the meadow from turning into a party.

One rule needs no pairing at all. Anyone sprinting β€” above 72% of top speed β€” within 1.35 metres of somebody idle makes them flinch and look up. It costs a loop and it is the single most alive thing in the meadow, because it is the only behaviour that happens to a creature rather than being chosen for it.

Everything the matchmaker does, it also narrates. The ticker under the demo is the same object writing a sentence each time it makes a decision.

The acting

Every gesture is an impulse

The brain's entire output is a direction, a pace, a jump flag and somewhere to look. It never touches a joint, a limb or a pose. Everything you read as body language is a shove given to a spring that was already solving.

A bow is an impulse on the lean channel β€” the same channel that tips a creature into a corner β€” so it dips and rocks back up with exactly the weight the rest of its movement has. A startle is an impulse on the squash-and-stretch channel, the one a landing uses. A dance is nothing but jumps on a shared clock: the troupe is given one centre point, a slot index and a common beat of 0.72 seconds, and each member hops when the beat comes round. They look choreographed because they are counting the same seconds, not because anybody wrote a routine.

This is why an individual's spring rolls matter so much. Two creatures given the same instruction at the same instant produce visibly different performances, because one of them damps at 0.85 of the shared figure and the other at 1.15. The brain cannot express a style; the springs cannot express an intention; between them they manage both.

Nowhere in this project is there a function that poses a creature. There is nowhere to put one.

The economy

Shiny pebbles, and somebody to steal them

The most story-like thing in the meadow is also the smallest: a handful of pebbles, three dens, and two species with opposite opinions about them.

Crabs fetch loose pebbles home. Pips, after a delay of twenty-five to eighty-five seconds from spawn, raid a den, take one, and run it nine to fourteen metres out before dropping it β€” clamped to seventeen metres from the centre, so a stolen pebble never ends up somewhere nobody will find it. And a crab whose territory is being walked through puts on a claw display, at odds set by its own boldness.

None of those three behaviours knows about the others. There is no economy module, no ownership model and no memory of who took what. What there is: a pebble can be free or in a den, a crab likes free ones, a pip likes den ones, and a crab objects to company. The theft, the recovery and the grudge are all in the reader.

The counters under the plan are the whole plot. Nothing in the code calls it a plot.

The camera

A documentary crew with a list of interesting words

A meadow this size has no protagonist, so the camera has to find one every few seconds. It does that with a set of six strings.

The director filters every agent by whether its brain state is one of dance, tag, guard, greet, steal or chaseFly, picks at random from whatever is left, and holds the shot for nine to fifteen seconds. If nothing is lively, it picks from everyone. Each of those six states also carries its own framing distance β€” six metres for a bow, ten for a chase, eight for a dance β€” so the shot is composed for what is in it.

The rig drifts in yaw at 0.045 radians a second the whole time, because a locked-off wide shot of a slow meadow reads as a screensaver. Any drag or scroll hands control straight back to you; twenty-eight seconds of not touching it and the crew quietly takes over again.

The camera is the only part of this project that has taste, and its taste is six words long.

The bill

What this approach costs

Rolling personalities and matchmaking interactions from outside gets a meadow full of characters for very little code. What it cannot get is anybody who means anything.

Nobody remembers anybody. There is no relationship state, no grudge, no preference. The pip that robbed a den three times in a row is not a recidivist; it is a 35% roll that came up three times. Watch long enough and the absence shows.

Interactions are assigned, not agreed. The matchmaker's authority is total: it can put two creatures into a greeting regardless of what either was doing a moment before, and it does. That is exactly why both halves always agree β€” and it means no creature can ever refuse.

The scan is O(nΒ²), five times a second. Greetings compare every pair, tag compares every playful pair, the startle wave compares every runner against everyone. At two dozen creatures that is free. At two hundred it would need a grid, and there isn't one.

Temperament is read, never changed. The four knobs are rolled at spawn and are constants for life. A creature cannot become bolder for having won a standoff, because there is nothing to write to.

The ladder means rare things stay rare in a fixed order. Guarding always outranks thirst, which always outranks pebbles, which always outranks play. It is a priority list wearing the clothes of a decision, and a creature that is thirsty and being robbed will always drink.

The world is a disc twenty metres across with three dens and a pond. Everything interesting happens because the space is small enough to force encounters. Widen it and the meadow would go quiet.

The motion underneath all of it is t3ssel8r's second-order system β€” a value chasing a target through y + k₁ẏ + kβ‚‚ΓΏ = x + k₃ẋ, reparameterised into a frequency, a damping ratio and an initial response β€” and none of the acting in this article would exist without it.

Two dozen dice-rolls, one matchmaker and a camera with six favourite words. Everything that looks like a story about somebody is happening in the space between them.

Open the meadow β†—

Marcin β€” creator of vibespire.ai

About

Hi, I'm Marcin.

I build these experiments whenever something sparks my curiosity β€” a paper, a game, the way grass bends in the wind, the smallest everyday things. Inspiration shows up, and I chase it into a little living world you can open in a browser.

vibespire is where those experiments live. Poke at them, break them, read how they're made β€” and if something sparks an idea for you too, say hello.