r/datascienceproject • u/Actual_South_2484 • 29d ago
open source sim where every person is a small q-learner and words drift between tribes (417 concepts, rust)
sharing a project in case the model side is interesting to someone here. it's a civilization sim, and two parts of it are plain enough to describe like a model.
language: every person has a word for each of 417 concepts.
- at birth each word has a 3% chance of a one-letter mutation relative to the copy they inherit from their mother
- on contact with someone else there's a 6% chance to borrow one word that differs from theirs
- a group adopts the majority word among its members
so words drift inside a tribe, spread by contact, and tribes that split apart stop sharing them.
learning: every person is a tabular q-learner with epsilon-greedy choice. the state is a short string key built from what they perceive. a kid inherits a slightly mutated copy of their mother's q-table (about 20% of the values get nudged by up to 0.03).
runs are deterministic, so the same seed and tick count give the same world, and there's a headless runner for seed sweeps.
i haven't measured the drift properly yet. if you know good ways to quantify it, like a distance between tribes' vocabularies over time, i'd love pointers.
you can watch it in the browser: https://thehumanbox.com/?utm_source=reddit&utm_medium=social&utm_campaign=datascienceproject
code (rust, mit): https://github.com/1homsi/thehumanbox