Skip to content
semakersPublic

About

A simulated amoeba whose Cartesian theatre, an LLM-written narrative of its own state, steers it towards homeostasis. ODE physics, jev reflexes, DeepSeek narration.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

16 Commits

Folders and files

Repository files navigation

Proteus

A simulated Amoeba proteus whose Cartesian theatre, a running narrative it writes about its own state, nudges its reflexes towards homeostasis.

Proteus in the 3D viewer: the amoeba, its gauges and the theatre's narrative

Live demo: https://proteus.nairda-back.com

The amoeba runs on a server and everyone who opens the page watches the same one. The viewer and the narrative are in Spanish. It only runs while someone is watching, and every live minute spends calls to two AI APIs, so the demo also has a daily cap. Once it is used up, the viewer shows recorded runs.

The idea

Three old ideas, put to work together:

  • Oparin: life as a chemical system that keeps itself far from equilibrium by feeding on its environment.
  • Homeostasis: the organism measures its internal milieu (energy, temperature, integrity) and acts to bring it back into range.
  • The Cartesian theatre: "consciousness" as a story about one's own state. Here it is literal: a language model writes that story, and the reflex reads it.

How it works

Layer What it does Built with
Body a membrane and two pseudopods that pull through a viscous medium ODE through flutter_scene_ode_core
World water with heat waves, rocks, and food that appears and rots pure Dart
Fast reflex every 0.25 s picks one of: move forward, turn, back up, stay still or eat jev, TypeSafe's "System One" model
Loaded die the action is sampled from jev's probabilities instead of always taking the top one Dart
Slow theatre every 10 decisions writes a paragraph about the amoeba's state, which the reflex then reads DeepSeek

In the experiments, physics and thinking run in lockstep, so a run is repeatable from its seed. Live, the theatre writes in parallel so the amoeba never freezes while it waits.

What we found

Comparisons over 15 seeds of 180 s each, with placebo controls and exact paired Wilcoxon tests (tool/comparar.dart). A placebo feeds the amoeba real narratives, but taken from other runs.

  • No brain beats another on homeostasis. The reflex without any AI is still the best on average, and no difference is significant.
  • A false narrative destabilises. With its own true story, the amoeba behaves more coherently and changes mood less than with someone else's story. This replicated in three variants, with p between 0.001 and 0.03.
  • A true narrative adds no stability compared with having none.
  • The story is enough as a self-representation. When jev cannot see the internal numbers and only knows the amoeba through its story, it does as well as when it sees them, and behaves more consistently.
  • The loaded die is where the natural look comes from. Most of the lifelike variety in behaviour comes from sampling the action, not from the narrative.

The author's reading: the story tilts the probabilities towards an instinctive coherence, and the die adds variation within that coherence. The author calls it "natural non-determinism": an artificial instinct, coherent without reasoning.

Run it

You need Dart 3.11 or newer and a single-precision libode for your machine. Build it with tool/build_vendored_host.sh from the flutter_scene_ode repository and put it at native/libode.so.

export ODE_LIBRARY_PATH=$PWD/native/libode.so
dart test                                                  # physics, world, physiology
dart run bin/proteus.dart --cerebro reflejo --semilla 3    # no AI, no keys
dart run bin/proteus.dart --semilla 3 --segundos 120       # teatro-m, with jev and DeepSeek
dart run tool/comparar.dart --semillas 1-15 --segundos 180 \
    --cerebros reflejo,jev-m,teatro-m,placebo-m \
    --pares teatro-m:jev-m,teatro-m:placebo-m

The AI brains need TYPESAFE_API_KEY and DEEPSEEK_API_KEY. They are read from the environment or from a dotenv file: .env in the current directory, or the file named by PROTEUS_ENV_FILE. They are never committed.

Each run writes corridas/<brain>-s<seed>-<date>/grabacion.json, which the viewer can replay.

The code, its comments, the command-line flags, the viewer and the amoeba's narrative are all in Spanish.

The viewer and the demo

The 3D viewer lives in proteus_visor, built with Flutter web and flutter_scene.

bin/en_vivo.dart serves the viewer and streams the simulation to it over a WebSocket as it happens. The API keys never leave the server.

dart run bin/en_vivo.dart                        # private: the viewer picks what to run
dart run bin/en_vivo.dart --publico \
    --minutos-diarios 60 --segundos-corrida 180  # the open demo

In public mode nobody picks anything. While at least one person is watching, the server chains teatro-m runs with random seeds until the daily budget of live minutes runs out. It listens on 127.0.0.1 only, and reaches the internet through a Cloudflare tunnel.

License

BSD 3-Clause. See LICENSE.

About

A simulated amoeba whose Cartesian theatre, an LLM-written narrative of its own state, steers it towards homeostasis. ODE physics, jev reflexes, DeepSeek narration.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages