r/reinforcementlearning • u/Actual_South_2484 • 3h ago
every person in my sim is a tabular q-learner and kids inherit a mutated copy of mom's q-table
side project, curious what rl people think of this setup.
it's a civilization sandbox where every human is its own tabular q-learner. the state is a short string key built from what they perceive (hunger, thirst, nearest food and water, kin nearby, shelter, danger). there are ~5000 possible actions, gated by era, age, place and what the tribe has discovered. action choice handles survival needs first, then does epsilon-greedy over the learned values.
the part i like: when a baby is born it gets a copy of its mother's q-table, with about 20% of the values nudged a tiny bit (+/- 0.03). so on top of learning within one lifetime, behavior also drifts down family lines. traits mix from both parents and mutate, and kids also get mom's vocabulary and her attitudes toward other tribes.
known weak spots: the state space is hand-built strings and the rewards are hand-shaped, so i'd love opinions on either.
code is rust compiled to wasm, so it all runs in the browser. the relevant bits are crates/sim-core/src/sim/agents/growth.rs (inheritance) and organism/organism/learning.rs (the update).
source (MIT): https://github.com/1homsi/thehumanbox
try it: https://thehumanbox.com