Statechart-based actor runtime simulates 1 million foraging and fighting ants in-process

sull · x · 2026-11-22

After a year of work, @dhamidi shared an actor runtime built exclusively on statecharts (inspired by xstate). The demo simulates 1 million foraging and fighting ants, each an actor backed by a statechart. It runs in-process with modest resource use, so fine-grained entities like individual websocket connections can each get an actor — useful for large-scale simulation and agent workloads. It works on servers and in browsers today, with mobile/native planned, and uses XML as a data format that allows inline HTML for self-documenting charts.

Original post →

More from coding & agent

coding & agent channel →