

Prompt
Copy the prompt and paste it into a new session in Claude Science. By default, Claude asks with a permission card before it runs code or installs packages.Prompt
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Ask for 30% same-color neighbors, end up with about 75%: the textbook computer version of Thomas Schelling’s 1971 idea.


In 1971 the economist Thomas Schelling showed, with chips on a checkerboard, that a city can segregate sharply even when nobody asks for more than an even mix. Recreate the textbook computer version, which segregates at even milder demands. Fill a 50 × 50 grid at random with 1,125 blue and 1,125 orange households, leaving 250 cells empty. A household is content if at least 30 % of its occupied neighboring cells (the 8 around it, fewer at the edges) hold its own color. With 8 occupied neighbors, that means at least 3 of its own color, so it accepts 5 of the other. Each discontent household moves to a random empty cell; repeat until everyone is content. Show the grid before and after and measure the average share of like-colored neighbors: it starts near 50 %. Where does it end? How many points is that above the random board, and how many above the 30 % they asked for?
Then replace the 30 % by 10 %, 20 %, up to 70 % and plot what households get against what they ask for. Judge each result against the random board's 50 %, not against the demand: 10 % and 20 % stay within 10 points of it, the largest jump (about 18 points) is from 20 % to 30 %, and separation is nearly total from 60 %. Allow 500 rounds. Title each figure with what it shows. Give changes between thresholds in percentage points rather than in words like "half" or "triple". Explain each step as you would to an undergraduate.
Was this page helpful?