Hacker News new | ask | show | jobs
by lurquer 2753 days ago
It was a cell growth simulation. Morphogenesis. The goal was to start with a single cell and see if I could make it divide and grow into something neat. The constraint was that all the cells were identical, and 'knew' only a limited amount of things about their environment: how many neighbors were touching them, and the levels of an arbitrary number of 'chemicals' that would diffuse from one cell to the other.

I made the scripting language as an easier way to program the 'rules' in the cell class. Dozens of little rules such as "if chemcial_0 is between 0.879 and .936 the increase chemical_1 by a smidgen," or "if chemical_23 equals 1.738 then undergo mitosis."

The little shorthand syntax was far easier to read than the mess of conditionals in C++.

It was pretty neat. Used Box2d for the physics part.

Got up to making a worm kinda thing with legs. But then gave up.

Trying to make identical cells differentiate into asymmetrical patterns is something that always intrigued me. Got interested after reading this: http://www.mvla.net/view/19352.pdf

How's that for a long-winded answer...