Tag: Physical Creatures

  • Growing from a Single Cube

    Until now, the simulated creatures arrived fully formed – the genome described a body and the engine assembled it at full size. But thats not the organic experience I’m after.

    So there is now a second kind of creature. It starts as one small cube, and grows.

    The genome describes development, not shape

    One starting cube, a few kinds of part (I call them roles), and rules. There are only four operations:

    1. extend – a part gets longer. Parts are born small and grow to their adult size.
    2. divide – a part that’s long enough splits in two across its length, like a cell. Both halves keep growing. A few rounds gives a segmented body, a tail or a trunk.
    3. bud – a part sprouts a different part from its surface: a leg from a body segment, a branch from a trunk.
    4. detach – a part lets go. That’s reproduction, and gets its own post.
    5. convert – a part transforms into another part

    The grey crawler is three rules

    • back divides into back – until there are four segments
    • back buds a leg, mirrored left and right – one pair per segment
    • back buds a tail – on the last segment
    "edges": [
      { "from": "back", "to": "back", "op": "divide" },
      { "from": "back", "to": "leg",  "op": "bud", "bilateral": true },
      { "from": "back", "to": "tail", "op": "bud" }
    ]

    (trimmed – the real rules also carry when to fire, which way to point and how the joint moves)

    The legs on neighbouring segments are half a cycle out of step, because the rule says each generation is 180° out of phase with its parent. So the alternating gait is laid down by the growth rule, not set leg by leg. The motors stay off until it has finished growing.

    Let the same body keep dividing and you get this:

    Centipede – 7 rules, 43 parts.

    Rules are local

    No part knows what the whole creature looks like. A rule fires when that part reaches its end condition, – right size and in the right generation, and has the materials.

    A branch sprouts two smaller copies of itself, until they are too small to fork. 4 rules.
    Pine – 6 rules.

    The nice consequence is that the same genome grows a different body in different conditions – a plant in shade stays stunted next to its well-lit twin.

    Contact inhibition

    Before growing, a part checks whether it would run into something. If so, it doesn’t. (Real cells do this, same name.) It stops bodies pushing parts through each other, which in a physics engine is free energy.

    It also bit me: two leg rules on one segment pointing nearly the same way, and the second pair is quietly refused. Four legs means two segments. That cost me – and several language models – a fair few two-legged cats.

    Its totally not reliable though..

    There’s a video of everything that grows so far on Patreon. If there’s something you’d like to see grow, tell me.

    Cheers!