DEV Community

Cover image for I Built a Maze Runner Simulation Where Teenage Sam Altman Survives the Glade December 25, 2025
ilya rahnavard
ilya rahnavard

Posted on

I Built a Maze Runner Simulation Where Teenage Sam Altman Survives the Glade December 25, 2025

What happens when you drop a teenage version of Sam Altman into James Dashner's The Maze Runner universe?

Apparently, you get a surprisingly addictive little personality-driven simulation that combines:

  • Big Five (OCEAN) personality modeling
  • Probabilistic decision making
  • Token-efficient LLM narrative generation
  • Health + relationship tracking
  • Beautiful console output + matplotlib health graphs

And yes — it is as weird and fun as it sounds.

The Concept in One Sentence

A 16-year-old Sam Altman wakes up in the Box.

His survival odds depend (mostly) on how curious, agreeable, and emotionally stable you decide he is.

Why This Even Exists

I wanted to:

  1. Play with OCEAN personality traits as actual gameplay mechanics
  2. Use very light LLM calls for flavor text without burning money
  3. Create something that feels like interactive fan-fiction but runs in ~200 lines
  4. Have an excuse to think about teenage Sam Altman solving mazes (don't ask)

Core Architecture (surprisingly clean for such a silly idea)

Everything is in one gloriously self-contained file right now (MVP life):

@dataclass
class Character:
    name: str
    age: int
    ocean: Dict[str, float]
    health: float = 100.0
    relationships: Dict[str, float] = None

    def make_decision(self, event_type: str) -> str:
        if event_type == "danger":
            return "explore" if random.random() < self.ocean["O"] else "hide"
        # ... etc
Enter fullscreen mode Exit fullscreen mode
def generate_narrative(...):
    try:
        response = openai.ChatCompletion.create(
            model="gpt-3.5-turbo",
            max_tokens=85,
            temperature=0.7,
            ...
        )
    except:
        return "Fallback: Sam did a thing. It was probably fine."
Enter fullscreen mode Exit fullscreen mode

The simulation loop is brutally simple:

while sim.run_day():
    pass
Enter fullscreen mode Exit fullscreen mode

And then it prints a nice table + health plot at the end.

Personality Really Matters (more than you'd expect)

Here's what happens when you run the exact same events with slightly different OCEAN profiles:

Profile variant Openness Agreeableness Result after 6 days Final Health Avg Relationship
"Curious Founder" 0.92 0.75 Explores everything → gets hurt a lot ~72 0.58
"Diplomatic Sam" 0.68 0.94 Befriends almost everyone ~96 0.82
"Cautious Engineer" 0.45 0.62 Hides a lot, survives comfortably 100 0.41

The high-Openness version is dramatically more entertaining (and painful) to watch.

LLM Usage — Extremely Paranoid Edition

I wanted narrative flavor without spending $12 on one funny run.

Solution:

  • Max 85 tokens per generation
  • Temperature 0.7 (chaotic but not insane)
  • Perfect fallback text that still makes sense
  • Only one call per day

Total cost for 50 full runs ≈ $0.04–0.07 (December 2025 pricing)

Console Output Porn (because we all love pretty terminals)

Day  4  |  Sam is offered a chance to run the Maze with the Runners.
   → Decision: explore
   → Outcome:  positive

   Sam sprinted into the twisting corridors, eyes wide with that terrifying mix of terror and fascination only a true puzzle addict could feel.

   Health: 100   |   Relationships: Newt:0.68  Thomas:0.62  Chuck:0.58
Enter fullscreen mode Exit fullscreen mode

Followed by a clean summary table and this little guy at the end:

(matplotlib line chart of health going up and down like teenage mood swings)

How to Run It Right Now

git clone https://github.com/ilyarah/Maze_Runner_Sam_Altman_Sim_MVP.git
cd Maze_Runner_Sam_Altman_Sim_MVP

pip install openai matplotlib

export OPENAI_API_KEY="sk-..."

python simulation/main.py
Enter fullscreen mode Exit fullscreen mode

Takes ~20–40 seconds per run (mostly waiting for OpenAI).

Future Evil Plans (if I don't get bored)

  • Branching events based on current health/relationships
  • Multiple endings (escape / become Keeper / get eaten by Griever)
  • GUI with pygame (because why not)
  • Sensitivity analysis: how much Openness is too much Openness?
  • Replace Sam with other public figures (you know you want to)

Final Thoughts

This was one of those projects that started as a dumb joke and somehow became genuinely interesting to watch unfold.

The combination of fixed personality traits + randomness + tiny LLM injections creates emergent stories that feel surprisingly alive for <300 lines of code.

Sometimes the silliest ideas teach you the most about agency, personality modeling, and how little prompting an LLM actually needs to be entertaining.

Give it a spin.

Change the OCEAN values.

Laugh at teenage Sam getting mauled by a Griever because he was "too curious".

And if you make an even worse version with Elon or Vitalik — please tag me.

Merry Christmas 2025, and may your maze always have an exit. 🌀

Repo: https://github.com/ilyarah/Maze_Runner_Sam_Altman_Sim_MVP

License: MIT

What weird simulation should I build next? 👇

Top comments (0)