Not a morality sim. A bootloader.
RealityOS compiles four old myths to the same source code, with math you can run. Enlightenment stops being a cutscene and becomes an exit condition: attachment < 0.05 and wisdom > 10.
Math proof
- Anicca:
dX/dt!= 0 - Karma:
Karma = Intent * Action - Dukkha:
Dukkha = A * exp(-k * W)
Engine proof
- Frustum culling =
Reality = F(Observation) - Procedural gen =
Essence(X) = 0 - Morality meters =
d(QoC)/dt
History proof
- Egyptian Ma'at, Dogon Nommo/Ogo, Buddhist dependent origination, Campbell LCS
- All map to:
init() -> split() -> tick() -> karma() -> weigh()
if enemy: attack() is slave code.
if attack(): entropy += 15 is free will plus consequence.
Rules do not remove choice. They give choice a ledger.
Ran three times, same pattern:
| Cycles | What emerged |
|---|---|
| 1-200 | Chaos, avg entropy ~55, Dukkha high |
| 200-600 | Bifurcation: let_go agents -> wisdom up, dukkha down. cling agents -> spiral |
| 600-1000 | Nirvana count > 0. Agents hit attachment < 0.05 and wisdom > 10 |
No instruction told them to wake up. Dukkha = A * e^{-kW} did.
RAM dies, so karma needs persistence.
Constants:
FEATHER_MAAT = 20K_WISDOM = 0.1SAVE_FILE = "realityos_souls.json"
Core logic:
shutdown()writes only skandhas: entropy, wisdom, attachment, memory_lenboot()loads souls and rebirths with past statskarma_habit = memory_len * 0.01biases next life
This makes Result = ∫ Karma dt real across boots. The JSON file is the Akashic record.
First run (fresh souls):
pip install -r requirements.txt
python realityos_v04.py --cycles 1000 --agents 100Watch the console:
cycle 0: avg entropy 55.4, nirvana 0cycle 200: avg entropy ~177, nirvana 0cycle 600: avg entropy ~78, nirvana 97- on exit:
saved 100 souls to realityos_souls.json
Second run (reincarnation):
python realityos_v04.py- loads the same 100 souls from
realityos_souls.json - prints:
loaded 100 souls from realityos_souls.json — reincarnation active - each being starts with
karma_habit = memory_len * 0.01 - you'll see:
cycle 0: avg entropy ~4, nirvana 97— they remember - Nirvana climbs faster because past
let_goactions bias this life
Delete realityos_souls.json anytime to wipe the record and start fresh.
That's the re-run on the JSON: first boot creates karma, second boot proves it persists.
Dukkha = attachment * math.exp(-K_WISDOM * wisdom)
Karma = intent * action_value
if action == "let_go":
attachment *= 0.98
wisdom += 0.1Nirvana check:
is_nirvana = attachment < 0.05 and wisdom > 10- v0.3: bifurcation and measurable Nirvana[x]
- v0.4.1: JSON soul persistence + reincarnation bias[x]
- Render_on_Observation(): Sunyata as compute saving
- Po Tolo gravity layer
- Nut/Geb environment layers
MIT — use it, fork it, break samsara with it.