gitwtfhub

wtf is scriptsbots?

karpathy/scriptsbots — explained in plain English

Analysis updated 2026-08-15 · repo last pushed 2012-01-02

183C++Audience · generalComplexity · 3/5DormantSetup · moderate

TL;DR

A virtual petri dish where digital creatures hunt, eat, reproduce, and evolve on their own. Watch natural selection and survival strategies emerge in real time without anyone programming them.

Mindmap

mindmap
  root((repo))
    What it does
      Virtual creatures evolve
      Predator-prey simulation
      Behaviors emerge naturally
    Tech stack
      C++
      OpenGL
      Real-time visuals
    Use cases
      Watch evolution unfold
      Teach natural selection
      Explore artificial life
    Audience
      Hobbyists and tinkerers
      Students and educators
      AI-curious founders
    Setup
      Linux and Windows guides
      Needs developer tools
      Experiment on your own

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Run the simulation and watch creatures evolve survival strategies over thousands of generations.

REASON 2

Use it as a visual classroom demo to show how natural selection works.

REASON 3

Experiment with mutation rates and starting conditions to see how different ecosystems emerge.

What's in the stack?

C++OpenGL

How it stacks up

karpathy/scriptsbotssunjaycy/goldeneye-recomppeng-zhihui/grblhost
Stars183183187
LanguageC++C++C++
Last pushed2012-01-022021-05-26
MaintenanceDormantDormant
Setup difficultymoderatemoderatemoderate
Complexity3/53/53/5
Audiencegeneralgeneralvibe coder

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires C++ build tools and OpenGL setup, README provides step-by-step instructions for Linux and Windows.

No license is specified in the repository, so default copyright restrictions apply and you should contact the author before using or distributing the code.

Wtf does this do

ScriptBots is a digital petri dish where virtual creatures live, hunt, eat, and evolve entirely on their own. Created by Andrej Karpathy, it's a simulation of predator-prey dynamics, imagine watching a tiny ecosystem unfold on your screen where little bots wander around, some hunting others, some fleeing, all competing to survive and pass their traits to the next generation. At a high level, the simulation runs an evolutionary process. The bots have basic behaviors driven by internal "brains" that can mutate over generations. Bots that are better at finding food or avoiding predators live longer and reproduce, passing their characteristics to offspring. Bots that fail die off. Over time, you can watch survival strategies emerge and shift as the population adapts, all without anyone programming those strategies directly. This would appeal to anyone curious about evolution, artificial life, or how complex behaviors can arise from simple rules. A hobbyist might run it just to see what kinds of creatures emerge over thousands of generations. A student or educator could use it as a visual demonstration of natural selection. A founder or PM interested in AI might find it a tangible way to grasp how evolutionary pressure shapes behavior, the same underlying concepts that appear in some optimization techniques. The project is written in C++ and uses OpenGL for its visuals, meaning you see the ecosystem play out in real time on screen. Building it requires a few developer tools, and the README provides step-by-step instructions for Linux and Windows. It doesn't go into much detail beyond setup and controls, so you're largely on your own to experiment once it's running. That hands-off approach fits the spirit of the project: set it up, press play, and see what nature comes up with.

Yoink these prompts

Prompt 1
Help me set up and build ScriptBots on Linux, I have C++ and OpenGL installed, walk me through the build steps from the README.
Prompt 2
I cloned ScriptBots and it's running. Explain what the on-screen controls do and how I can tweak the simulation parameters to get more interesting evolution.
Prompt 3
I want to understand how the bots' internal brains mutate over generations in ScriptBots. Walk me through the code so I can modify the mutation logic.
Prompt 4
I'm a teacher and want to use ScriptBots to demo natural selection. Help me write a short script of talking points to narrate what students are seeing on screen.
Prompt 5
ScriptBots is running too fast to follow. Help me find where in the C++ code I can slow down the simulation tick rate so I can observe individual bot behavior.

Frequently asked questions

wtf is scriptsbots?

A virtual petri dish where digital creatures hunt, eat, reproduce, and evolve on their own. Watch natural selection and survival strategies emerge in real time without anyone programming them.

What language is scriptsbots written in?

Mainly C++. The stack also includes C++, OpenGL.

Is scriptsbots actively maintained?

Dormant — no commits in 2+ years (last push 2012-01-02).

What license does scriptsbots use?

No license is specified in the repository, so default copyright restrictions apply and you should contact the author before using or distributing the code.

How hard is scriptsbots to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is scriptsbots for?

Mainly general.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.