FIRST PRINCIPLES TO MARS
โ† โ†’ or click to navigate
๐Ÿ”ด

FIRST PRINCIPLES TO MARS

An Oregon Trail for Mars.

Real physics. Real weather. Real decisions. Real consequences.

The Rappter Playbook โ€” From Brainstem to Mars Colony

The Problem

A Mars colony can't call home.

Earth is 4-24 minutes away by radio. By the time Houston hears the alarm, the crew is already dead or saved. The colony must survive autonomously.

Can an AI governor keep a colony alive without human intervention?
That's the question. That's the scoreboard.

The Game Loop

Choose mission โ†’ Real Mars seeds start โ†’ AI runs colony โ†’
Tasks arrive โ†’ You decide โ†’ Consequences cascade โ†’
Colony lives or dies โ†’ Post-mortem โ†’ Repeat

8
Missions
299
Tests
29
Modules
0
Dependencies

Real Mars Weather

Every session starts with today's actual Mars conditions.

Temperature, dust opacity, solar irradiance, wind, season โ€” all from NASA data models (Viking, Curiosity, Perseverance, MCD v6.1).

Play tomorrow and it's different. Infinitely replayable.

Mars is currently in Autumn Equinox season. Dust ฯ„ varies 0.3-0.9 depending on the sol.

Data Sloshing

Output of Frame N โ†’ Input of Frame N+1

state, delta = tick(state)
echo = {frame: N, delta, events, visual, inertia}
echo_history.append(echo)
# Frame N+1 reads all of frames 0..N
# Context accumulates. The colony gets smarter.

One tick is dumb. A thousand ticks with accumulated context is intelligent.

The Nervous System

๐Ÿง  Cortex

Sol tick. Expensive. Production, consumption, events, AI decisions. Runs every 0.5-5s.

๐Ÿซ€ Brainstem

Echo frame. Structured delta. Inertia signal. CRI computation. "I can feel my heartbeat."

โšก Spinal Cord

Reflex arcs. Pre-computed IF/THEN rules. Fire between sols. Move muscles, not just flash lights.

๐Ÿƒ Patrol

Runs at ~20Hz. Reads standing orders. Applies continuous visual + behavioral effects. Never sleeps.

The Echo Frame

{
  frame: 47,
  utc: "2026-03-31T22:00:00Z",
  delta: {o2: -0.3, h2o: -1.2, food: -4500, power: +12},
  events: [{type: "dust_storm", severity: 0.6}],
  inertia: {o2_velocity: -0.15, trend: "decelerating"},
  reflexes_fired: [{id: "o2_trajectory", intensity: 0.7}],
  cri: 38, cri_grade: "ELEVATED",
  visual: {dust_storm: true, night: false}
}

Every heartbeat produces this. Tasks, visuals, and reflexes all read the echo โ€” not raw state.

Inertia โ€” The Derivative

Not just WHERE things are.
HOW they're CHANGING.

Oโ‚‚ at 15 days = a snapshot.
Oโ‚‚ was 20 days, now 15, dropping at 5/sol = a trajectory.

The body doesn't wait until the hand is burned.
It fires when the temperature is rising.

10 Reflex Arcs

Colony Risk Index

A VIX for Mars.

10 variables. Range 0-100. Computed by LisPy VM every sol.
Higher CRI = higher probability of failures.

0-15 LOWColony nominal
16-30 MODERATEWatch trajectories
31-50 ELEVATEDReflexes active
51-70 HIGHCascading risk
71-100 CRITICALSurvival mode

Papers Please: Mission Control

The AI runs the colony. You handle the exceptions.

Tasks emerge from echo data โ€” the autonomous system tried to handle it, couldn't, and is escalating to you. Countdown timer. Approve, deny, or let the AI default (usually the worse option).

Decide

Oโ‚‚ reroute, water crisis, pressure leak, ISRU catalyst, solar tracking, radiation dosimetry

Override

Guide robots through physical procedures with light delay. Stuck bolts, panel cleaning, antenna alignment, airlock seals

Rescue

Robot tipped over โ€” dispatch another robot. Wrong approach = both stuck. Slow and diagnostic wins.

Manual Override

Robot can't unscrew a bolt. You send commands with light delay.

๐Ÿงด APPLY PENETRANT  โ†’ "Soaking..."        [3s delay]
โณ WAIT 30s          โ†’ "Wicked into threads" [3s delay]
๐Ÿ”ฅ HEAT CYCLE        โ†’ "Thermal expansion"   [3s delay]
๐Ÿ”ง EXTRACT CCW       โ†’ "Bolt extracted!"     [3s delay]

๐Ÿ”ง EXTRACT CW  โ† TRAP: wrong direction, threads stripped
๐Ÿ’ช FORCE        โ† TRAP: bolt head shears off

The correct path is always: slow, diagnostic-first, methodical.
That's real remote ops. The skill IS the game.

The Feedback Loop

The colony's reactions become input to its next thought.

Frame N โ†’ echo โ†’ reflex arcs fire โ†’ logged with UTC
Frame N+1 โ†’ echo includes reflexes_fired[]
โ†’ "ISRU was auto-boosted but Oโ‚‚ still dropping"
โ†’ "Reflexes aren't enough. Escalate to player."
โ†’ Task generated.

The organism tried to handle it. It couldn't. Now it needs mission control.

3D Digital Twin

The 3D scene IS the sim. Not decoration.

Every Death Is a Lesson

The post-mortem traces the full causal chain:

What Happened

Decision chain ยท Unintended consequences ยท Ambient hazards ยท Reflex history

Colony State

Individual crew HP/morale/rad ยท System degradation ยท Final CRI ยท Resource reserves

What Would Help

Specific, actionable analysis ยท Autonomy grade (F โ†’ MARS-READY)

Understand WHY โ†’ Write better LisPy governor โ†’ Try again โ†’ Beat the scoreboard

For Educators

Zero dependencies. Runs in any browser. Works offline. Open source.

๐Ÿš€

PLAY IT NOW

kody-w.github.io/mars-barn-opus

Pick a mission. Configure your crew. Survive โ€” or learn why you didn't.

๐Ÿ“œ
๐Ÿ’ป

Python 3.9+ stdlib only. 299 tests. The code is the argument.

1 / 17