Collabs
NetLogo ports
Classics from the NetLogo Models Library, rewritten in MathPets.
Uri Wilensky's NetLogo Models Library taught a generation to think in agents and patches. These are MathPets versions of its best-known models.
Each one keeps the original's rules and parameters where it can, so you can compare the two side by side.
Source NetLogo Models Library
Models 34
34 models in this collection.
Biology & ecologyWolf Sheep Predation
Can wolves and sheep coexist, or does one always wipe out the other?Sheep and wolves wander a 51 × 51 torus, eat, breed and starve. With regrowing grass both species persist for thousands of ticks; without it, one of them is gone within a few hundred.
Biology & ecologyFlocking
How far does each bird need to see for flocks to form?Craig Reynolds' boids, as NetLogo implements them. Each bird turns away from its nearest neighbour if it's too close; otherwise it turns toward its neighbours' average heading and toward their centre.
Cellular automataFire
At what density does the fire cross the forest?Trees are planted at random, the trees in the left column are lit, and fire spreads to adjacent trees each tick. At 60% density it reaches the right edge in about half of runs.
Cellular automataLife
What does a random soup of live cells settle into, and how long does it take?Conway's Game of Life on a 97 × 97 torus, started from a random 35% fill. Activity burns out over several hundred to a few thousand ticks, leaving still lifes, blinkers and gliders.
Biology & ecologyAnts
How much do the chemical trails speed up the colony's foraging?Ants leave a central nest one per tick to search for three food piles. Ants carrying food home lay a chemical that searching ants follow, and the nearest pile is empty after about 200 ticks.
Biology & ecologyDaisyworld
How much do the daisies cool the planet when the sun gets brighter?Black and white daisies colonise bare ground and die at random. Black ones warm the planet and white ones cool it, so under a brighter sun whites spread and keep it cooler than bare ground.
NetworksDiffusion on a Directed Network
Where does all the value end up when every link is one-way?Node 0 starts with 100 units, and each tick every node passes diffusion-rate percent of its value along its outgoing links. The links form a tree pointing away from node 0, so it all ends in the leaves.
Social dynamicsEthnocentrism (alternative visualisation)
Which helping strategy does best while the population booms and crashes?People in four colour groups inherit whether to help their own group and whether to help the others. At the defaults they fill the 1,200-person cap, then usually crash and die out within 1,200 ticks.
Biology & ecologyFireflies
How far must a firefly see for the whole field to flash together?Fireflies wander with 20-tick clocks and flash when the clock wraps. Seeing a flash late in its cycle moves a firefly's clock ahead, and after about 800 to 2,600 ticks most of them flash together.
Chaos & fractalsFractal Tree
How much of the board does the tree cover, and which setting controls that most?One walker paints a trunk up from the bottom of the board, then splits into two walkers turned ±branch-angle with shorter segments, and so on. At the defaults the tree has 64 tips after 46 ticks.
NetworksGiant Component
How many random links does it take before most people are in one connected cluster?Random links pile up between people on a ring while a flood spreads from one person along them. Once the mean degree passes 1, a flood can reach most of the graph.
Physics & patternsLattice Gas
Why does the burst follow the grid lines in thin gas but spread as a ring in thick gas?The HPP lattice gas. Particles move in four directions and head-on pairs turn 90°. A packed disc spreads mainly along the grid lines in thin gas and as a round ring in thick gas.
Cellular automataLife Pet-Based
What starting density leaves the most cells alive once the soup settles down?Conway's Game of Life with one pet per cell instead of patch states, on a 41 × 41 torus. The rule is the same as in the patch version; only the representation changes.
Chaos & fractalsMandelbrot & Julia Sets
What happens to a Julia set when its c moves outside the Mandelbrot set?Each patch is a point of the complex plane iterating z → z² + c, one step per tick. Points past |z| = 2 are colored by how fast they escaped; what remains at max-iterations is the Mandelbrot or Julia set.
Cellular automataMaze
How do runners with no map and no memory still find the exit?A scent spreads from the exit through open corridors, weakening by a fixed factor per cell, and runners step toward the strongest neighboring scent. In the Labyrinth they reach the exit around tick 220.
Physics & patternsPercolation
At what porosity does the water first reach the bottom?Water enters the open pores along the top of a random rock and wets every pore connected to them. It rarely reaches the bottom at porosity 55 and almost always does at 62.
NetworksPreferential Attachment
When newcomers favor the popular, how far ahead can one node get?Nodes join one per tick and link to links-per-node existing nodes, picked with probability proportional to degree. At the defaults (80 nodes, 2 links each) the biggest hub ends with about 20 links.
Social dynamicsPrisoner's Dilemma
Can a single defector destroy a world of cooperators?Each patch plays the prisoner's dilemma with its 8 neighbors and copies the best scorer nearby. At the default temptation a lone defector's symmetric pattern shifts until cooperation dies out at tick 2,302.
Social dynamicsRebellion
How many citizens rebel at a given legitimacy, and how much do the cops hold them back?Citizens go active when their grievance outweighs their estimated risk of arrest by a threshold, and cops jail the actives they can see. Activity settles at a level that legitimacy mostly sets.
Social dynamicsRumor Mill
How readily can spreaders give up before the rumor stops reaching most of the crowd?People wander a torus. Each spreader tells one nearby ignorant person and may lose interest once someone informed is close by. How far the rumor gets depends almost entirely on stifler-chance.
Physics & patternsSandpile
How full does the pile get before losses at the edges balance the grains being added?Grains land on the center patch every tick. Any patch holding 4 or more passes one to each of its 4 neighbors, and grains pushed off the edge are lost, so the pile fills until the losses match the drip.
Social dynamicsSchelling Segregation
How weak can the preference for same-color neighbors be and still sort the board?Households with fewer than similarity-threshold percent same-color neighbors move to a random empty patch. At the default 35%, a random mix sorts into single-color clumps within about 15 ticks.
Biology & ecologySlime
What decides whether the molds gather into a few big clusters or stay in a scattered web?Molds wander, drop chemical, and turn toward the richest of the three patches ahead. The chemical spreads and evaporates, and the molds gather into dense clusters joined by fainter streams.
NetworksSmall World
How few random shortcuts does it take to halve the time a message needs to reach everyone?A message spreads one hop per tick through a ring of people linked to their nearest neighbors. Rewiring 10% of the links cuts the time to reach everyone from 16 ticks to about 9.
Social dynamicsSugarscape
Which traders starve, and how unequal do the survivors become?Traders with random vision and metabolism jump to the richest free sugar patch they can see, eat it, and starve if their store hits zero. Survivors' stores grow without limit.
NetworksTeam Assembly
How long until every pair in a rotating cohort has worked together?Each tick one fixed cohort (every team-size-th person) is active, and each member links to someone in it. The network stays split into team-size groups that fill in until nearly every pair is linked.
Biology & ecologyTermites
How long do wandering termites take to gather scattered chips into a few piles?400 termites wander a board strewn with wood chips. Each picks up a chip it bumps into and drops it beside the next chip it finds, and the chips slowly collect into fewer, bigger piles.
Social dynamicsTraffic
How many cars does it take to jam a ring road with no bottleneck?Cars on a one-lane ring follow the Nagel–Schreckenberg rules. They speed up, never outrun the gap ahead, and sometimes brake at random. With more than about 10 cars, stop-and-go jams form.
Social dynamicsTraffic Grid
How many cars can the grid take before it locks up?Eastbound and southbound cars move one cell per tick on a grid of one-way streets and stop at red lights that all switch together. Queues build on red and clear on green.
NetworksVirus on a Network
How dense must the contact network be before an outbreak reaches most of the population?A virus spreads over random contacts. Each tick a susceptible person with an infected contact is infected at virus-spread-chance percent, and infected people recover for good at recovery-chance percent.
Social dynamicsVoting
Does a small initial lead decide which colour ends up holding the map?Every patch takes the majority colour of its eight neighbours, keeping its own on a tie, and votes at random at the noise rate. Without noise the map freezes into blocs; with it, one colour usually wins.
Physics & patternsWaves
What pattern do the ripples make once they bounce off the edges and cross the outgoing ones?Each patch accelerates toward the average height of its 4 neighbors while the center patch is moved up and down in a sine wave. Rings spread, reflect off the edges and interfere.
Social dynamicsWealth Distribution
When does a small bias toward the richer trader split people into rich and poor?Everyone earns a wage and pays a living cost each tick; nearby people trade 1 unit at a time, with the odds tilted toward the richer. At the defaults, a net income of 1 a tick keeps everyone middle class.
Cellular automataWolfram Automaton
Which rules turn a single live cell into a regular, a nested or an irregular pattern?An elementary cellular automaton drawn one generation per row, from one live cell at the top. rule picks any of the 256 rules (30 by default), and an occasional flipped cell colors the cone below it.
