Small Brain. Big Clean.
README.md
FruitFly
An embodied fly driven by a FruitFlyBrain. Every frame it writes the world
into the network's sensory neurons and reads a motor command out of named
motor and descending cell types:
| sense | cell types | driven by |
|---|---|---|
| tarsal taste | claw_tpGRN, dorsal_tpGRN | a front foot on a FoodPatch |
| labellar taste | LB* | the extended proboscis on a FoodPatch |
| looming | LPLC2, LC4 | a player's avatar growing fast in view |
| command | cell types |
|---|---|
| walk | leg motor neurons (vnc_motor types ending in MN) |
| turn | DNa01 + DNa02, left minus right |
| proboscis | MN9 |
| flight | DLMn + DVMn wing power-muscle motor neurons |
| jump | a DNp01 burst above escapeHz |
Fields: brain, bodyLength, walkSpeed, turnRate, motorFullHz,
flightFullHz, tasteHz, loomHz, escapeHz, groundY, wander.
Methods: motor(), senses(), readouts(), sensoryNeurons(). Events:
onJump, onFeed.
local fly = entity.spawn("Fly")
fly.component.add("FruitFly", { brain = entity.find("Brain"), bodyLength = 0.6, wander = 0.15 })
On a shared world the entity's owner writes the senses into the brain (a synced call); every peer poses its own copy from its own network.