You are browsing as a guest. Sign up (or log in) to start making projects!

Ship #1 Pending review

EvoLab is an artificial life sim: 90 organisms with 8 heritable traits each
the little dots forage, hunt, breed and mutate on a small plate, and you watch evolution
happen . Click any creature to read its genome and family line,
go back through the last minute to see how a lineage died out, or turn the
food and aggression dials to starve the world or push it toward predators.
Runs in the browser or as a desktop app.

  • 7 devlogs
  • 50h
Try project → See source code →
Open comments for this post

7h 48m 59s logged

#DevLog #7 last one

the UI

the plate used to be the whole window with a cramped row of numbers on
top. now it has a frame and everything else has a home: a header with the
controls grouped, a legend bar naming every colour, and a sidebar with
four panels ecosystem (pop, food, generation, births, deaths, and a bar
splitting grazers / mixed / hunters), trends, recent (an event log), and
selected.

selected is my favourite bit. it draws the creature the way the plate
does, then its family line, then all 8 traits as bars with a tick on each
bar showing the POPULATION average. the bars used to tell you a number;
now they tell you if this thing is fast for its time. clicking also rings
the creatures living family on the plate, so you can watch one line take
the plate over or die out.

the part where i found out the sim was fake

i ran the world headless for 900 seconds and printed the totals. 231
immigrants. the population was parked on the immigration floor, which
means the ecosystem could not feed itself and was being kept alive by a
drip of random strangers.

the fixes: food comes in patches now (with even food, speed was a bad thing
scramble trait everyone hit max speed and then nothing could catch
anything); sprinting costs energy so a chase is an endurance chase; panic
only when the threat is close AND faster; the cost moved off the gene and
onto the chase, because taxing the trait dug a valley no mutant could
climb out of; and meals got small and frequent so the plate reads as
grazed.

thanks for following along

0
0
4
Open comments for this post

6h 22m 33s logged

DevLog #6 making the plate feel eaten

two small changes did a huge amount for how the game feels. food was
sitting around at the cap forever spawn kept up with whatever the
population ate, so the amber dots never actually went away and you never
got the little dopamine hit of watching a thing get consumed. so i flipped
the balance: food now spawns slower than the population eats, and the
cap is lower. now the plate visibly clears in patches and refills, hungry
creatures have to actually travel to find a meal, and when a wave of
births hits it can strip the field in seconds.

the pulse
the satisfying part is the eat pulse. each time a food item disappears an
expanding ring of light blooms out from the spot for a third of a second,
warm amber, fading as it grows. its a tiny thing but it completely changes
the read: you see a creature touch a dot, the dot vanishes and sends out a
little ripple, and you instinctively know that one got it. eating goes
from something youd miss to the most legible event on the plate. i
detect it by diffing the food positions between frames anything that
was there a frame ago and isnt now was eaten - so its pure render, the
simulation doesnt even know the pulse exists.

why it matters
between the movement trails from last time and the eat pulse now, almost
everything youd want to know about the world is visible before you
reason about it. green tails hunting, red tails hunting them, amber
ripples where meals landed. you can sit and watch it like an aquarium and
follow individual creatures by their tail without clicking a single one.

NEXT
next im gonna keep pushing on that rhythm, tune the food economy until
predator-prey cycles show up as clean heartbeat waves in the pop chart,
not noise. and then lineage tracking: click a creature and find every
living descendant of its great-great-grandparent, and watch a family
line either take over the plate or quietly die out.

0
0
7
Open comments for this post

4h 9m 53s logged

DevLog #5 the time machine

you can now rewind the whole plate now. hit R (or the Replay button) and it
flips back into the last sixty seconds, scrubbing through the world a few
frames at a time while a replay bar counts along. watch a predator actually
pounce, or rewind to the exact second a whole lineage went extinct and see
why it died. press R or Esc and it drops you back to live, right where you
left off.

how it works
the world was already a pure simulation, so the time machine is just
snapshots. every quarter second the game copies the entire world, every
organism’s position, genome, energy, plus all the food and keeps only
the last 240 of those frames in a ring, which is about a minute of
history. when you hit R it stops simulating and just plays those frames
back. the copy is light because each organism only needs its traits and
where it is; the “who am i chasing right now” pointers that only matter in
live time get dropped, so a stored frame is tiny

0
0
2
Open comments for this post

10h 3m 26s logged

DevLog #4 click a creature, read its whole life

you can click creatures now. click any of the little things on the plate
and it gets a gold ring around it that follows it around, and a panel
pops up in the corner that tells you everything about it: its id, its
generation, whether it is a hunter or a grazer, how much energy it has,
how old it is, and all eight of its genome traits drawn as little bars.

the genome is finally visible
the game has been carrying around these eight hidden traits since the
first organisms: speed, size, vision, metabolism, fertility, lifespan,
aggression, efficiency
and now you can actually look at them on one
living creature.

I also added a proper legend in the corner that
shows population, average speed, and average aggression all plotted over the
last few minutes. the aggression line is the new one and its great,
because you literally watch it climb as predators start showing up across
the plate

NEXT
next im gonna give you the ability to rewind. keep the last couple minutes of the whole
world in a ring buffer and go back through it, so you can watch a
predator-prey cycle happen or see exactly when a species went extinct

0
0
14
Open comments for this post

4h 9m 33s logged

DevLog #3 predators and the paint*

Predators are in. Aggression is now a spectrum instead of a simple on or
off: every hungry creature makes a little gamble so they hunt weaker neighbours
with probability equal to its aggression, or keep grazing plants. a pure
herbivore never hunts, a full carnivore almost always does, and everything
in between is an opportunist that does a bit of both.

the fun part is the catch. you can only eat prey you can actually outrun
while the prey sprints away, so it is a real speed race. prey evolve to
run faster to escape, predators evolve to keep up, and you can watch both
drift up in the sparklines over time. that is the arms race and it finally
gives the speed trait a reason to exist instead of just taxing your
metabolism.

it took way longer than the food system. my first version was a hard
cutoff and it collapsed the whole population into hyper-carnivores in
under two minutes every single time, no matter how i balanced it. making
aggression a continuum with real costs and gating the catch on outrunning
prey is what finally made it work. there was also a sneaky bug where the
creatures were starving to death on a plate completely covered in food,
because the hunting logic was stomping the food-scan timer - one fixed
line and it became a real ecosystem.

and everything glows now. the old flat dots are gone, replaced by soft
antialiased cells that go green to amber to red as they get dangerous,
so you can literally watch predators appear as the plate changes colour.

0
0
10
Open comments for this post

13h 39m 47s logged

DevLog #2 Food and reproduction

The ecosystem now has a full food loop: creatures sense food chase it,
eat it, and they breed.

food spawns continuously but it is capped, because the world is finite
and the plate should run out when a population gets too big. Creatures
sense food with their vision trait range 30 to 150 px

on the wrapped
world, and they only rescan when they are hungry and their target is
stale, so a starving population cant waste cycles scanning every tick.
Hungry ones steer toward the nearest food and the turn rate drops with
size, so big creatures are clumsy hunters.

The first version had a problem I only noticed after watching it run:
nothing looked like it was happening. Every creature spawned full, so
the first 40 seconds were pure wandering while food just piled up, and
the food was the same green as the creatures, so the eating was
invisible. The fix: the world now starts pre-seeded with food,
creatures spawn partially hungry so the hunting begins at t=0, and the
food is amber so you can actually watch it get eaten.

reproduction
Mating is local: a ready creature only breeds with a ready neighbor
inside a small mating radius, so the gene pool picks up spatial
structure instead of any-two-random mixing. Both parents pay an energy
cost and the baby spawns at their midpoint with a genome that is a
per-trait crossover of the two parents, followed by a gaussian nudge on
each trait with the probability set by the new mutation slider in the
header (0.1% to 20%). The fertility trait controls how fast readiness
builds up, so lazy genomes breed slower, and generations are tracked per
creature with the highest one alive shown in the header.

Finding a partner is a neighbor query, so I added a spatial hash grid:
rebuilt every tick, and a query only touches the cells a circle
overlaps, so it stays cheap no matter how big the population gets.
Predators will run on the same grid. There is also a little sparkline
panel in the bottom right now (population and average speed over time)
the first step toward the real stats milestone.

NEXT
next im gonna make predators! the aggression trait finally gets used so
hunters that chase the slow, and prey that learn to run. and i want to
tune the world until the evolution is obvious in the sparklines, speed
and size drifting on their own!

1
0
20
Open comments for this post

3h 52m 29s logged

DevLog #1 The ecosystem

EvoLab is an interactive artificial-life simulator: virtual organisms
fight for resources, they reproduce, they mutate, and evolve, and the user watches
natural selection happen in real time.

framework

I first scaffolded the project in React + TypeScript + Vite, then decided
to move the whole thing to Python. One language for the whole project,
pygame gives me a full-screen canvas and click/mouse handling for the UI,
and Python keeps the door open for proper numeric tooling when I start
analyzing population statistics

NEXT

next im gonna make the Food system! So creatures can eat them and reproduce and evolve!
aswell as mutations so we get diversity!

0
0
24

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…