Cyborg Earthworm is a "Snake" automation game. The worm follows the rules of the famous Snake game, and you can program it. Develop a strategy and let the worm follow it without your involvement. The worm can see a small region around its head, and you provide it with possible situations that it can encounter.

  • Solve and optimize 20+ areas, each of which contains a virtually unlimited number of procedurally generated levels.
  • Watch the worm dominate the levels automatically without having to pilot it.
  • Reach the maximum possible length, filling all free space.
  • Use a variety of tools like paint spray for leaving marks in the soil and internal worm memory for tracking things.
  • View media
  • View media
  • View media
  • View media
  • View media
  • View media
Post article RSS Articles

It really annoys me that when I play Snake I can't hit the damn fruits because the snake is going too fast. I also have an obsessive dream to eat so many fruits that my snake fills all available space. Sadly, it would be too tedious to make that dream a reality. Besides, one mistake and you have to start over.

The natural solution for this predicament would be to automate it, and the most intuitive way is to provide the snake with all possible positions that it can encounter, telling it which turn it should take in each case. The computer will be able to use these positions to play the game automatically, so I can just sit back and watch.

turn left when there is food

Ok, that's not a snake, that's a worm, but never mind that. Snakes are too boring anyway.

A couple of things become evident immediately:
1. There are too many positions.
2. You don't want to go and specify every single tile of a large position. That's too much work.

To circumvent that, we will restrict positions to only a small region around the worm's head. Furthermore, we want to tell the computer that we don't care about some tiles.

simplified position

Now the problem is that you can't detect the food if it's far away. It's not a big problem, though, because you will have to decide how to lay out the worm when it's long anyway. So you might as well think about how it will traverse the space searching for food. Will it go in circles or zigzags?

travelling in zigzags

To make this type of strategizing possible, I made two tools.

First, the worm carries around a piece of memory that it can use to make decisions and update in certain situations.

using memory

pattern involving memory

setting memory

Second, the worm can leave marks and react to marks it left in the past.

using markup

a pattern that involves markup

setting markup

There are more tools, but these are the ones that make programming feasible.

I'm running a demo on Steam, feel free to check it out:

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.


Latest tweets from @anton_swifton

RT @zozuar: float i,e,a,l,y;vec3 p,q,d=vec3((FC.xy-.5*r)/r.y,-1);for(d.xz*=rotate2D(t*.2);i++<2e2;e=max(min(++y,-e),y-3.)){i>1eā€¦

Nov 22 2021

Just enough to have a frame drop.

Sep 20 2021

This thread is very illuminating.

Aug 17 2021

RT @benita_brett: A first step @DrLizzieBurns ? šŸ˜€

Feb 24 2021

RT @alisonmartin57: branching topology - intertwining chiral assembly #twisted structure #ribbondiagram Winding filaments #onedirectionā€¦

Jan 17 2021

Imagine all that, AND you didn't get very far in work. That would be hell of a situation.

Dec 19 2020