Mathematicians turn Minecraft battles into a pi calculator

Minecraft Monte – Two researchers say they can approximate pi inside Minecraft using a classic darts-style Monte Carlo method—by sending slimes and zoglins to wander, randomly kill each other, and then counting deaths inside an in-game “circle.” In a test run, 619 slimes were k
In Minecraft, everything is made of cubes. Even when the game’s blocky world feels endlessly creative. a perfect circle—smooth. edge-free. without corners—can seem like a stretch. And yet mathematicians Molly Lynch of Hollins University and Michael Weselcouch of Roanoke College have found a way to chase pi (π) inside that square. block-based universe.
Their approach takes a well-worn mathematical idea and disguises it as a game mechanic: throw enough “darts” and pi will emerge from the statistics. They presented multiple methods in a 2024 paper for calculating well-known mathematical constants such as pi in Minecraft. aiming for something different from efficiency—something that could make math feel approachable. especially for young people.
The key is the darts technique, a method formally called the Monte Carlo method. In the thought experiment, you throw darts at a circular board mounted within a square area on a wall. Because a person isn’t perfectly accurate, each dart lands randomly somewhere in the square area. That means the chance a dart lands on the circle equals the fraction of the square’s area covered by the circle.
If the square has side length two meters, its area is four square meters. The circle’s diameter is also two meters. giving it a radius of one meter and an area of π square meters. With darts randomly distributed within the square, the probability of hitting the circle is π⁄4. Count enough darts that land on the board. divide by the total number of darts thrown. and the result approaches π⁄4; multiply by four and you get an approximation of π.
Lynch and Weselcouch translated that logic into Minecraft by building a circle-like structure out of blocks. They approximated a circular arrangement of red blocks with a “radius” of 11 blocks. then surrounded those red blocks with blue blocks. producing a red approximate circle enclosed within a blue square.
To replace the randomness of darts, they relied on creatures. Their first was a Minecraft creature known as a slime. In their paper. they explain that “slimes continue moving when no players are nearby and they change direction at random.” They paired slimes with zoglins. which kill slimes. Together, the two creatures let the researchers generate random events they could track without direct observation.
How do you record the outcome?. They covered the red circle with funnel-shaped blocks called hoppers. Hoppers collect objects that fall directly on top of them. In this setup, every time a slime was killed, it dropped items. Those items were automatically collected by whichever hopper sat beneath the death location—giving a measurable signal for whether the slime died inside the circle.
By dividing the number of slimes killed within the circle—equivalently. the number of items collected by hoppers within the circle—by the total number of creatures killed—equivalently. the number of items collected by all hoppers on the square—Lynch and Weselcouch obtained an approximation of π⁄4. Multiply that ratio by four, and the approximation of pi follows.
In their test run, a total of 619 slimes were killed. Of those, 508 were killed inside the circle. Using those data, they calculated an approximate value:
π ≈ 4 × (508 / 619) = 3.283.
The authors acknowledge plainly that this isn’t a particularly good approximation of pi. Their two proposed fixes are also straightforward: enlarge the area of the square, which enlarges the area of the circle, and increase the number of slimes killed within that total area.
Enlarging the circle improves accuracy because a larger blocky shape can better approximate a true circle. And the Monte Carlo method itself becomes more accurate with more random events—so in Minecraft terms, it means sending more slimes and zoglins into the arena.
Still, they admit this route to pi will never be truly efficient. Efficiency isn’t the aim. Lynch and Weselcouch want to inspire people—particularly young people—with mathematics. And a Minecraft battle between slimes and zoglins. as these results suggest. can turn a famously abstract constant into something you can literally watch emerge from the chaos of play.
This article originally appeared in Spektrum der Wissenschaft and was reproduced with permission. It was translated from the original German version with the assistance of artificial intelligence and reviewed by our editors.
Minecraft pi Monte Carlo method Lynch Weselcouch slimes zoglins hoppers mathematics education computational methods Spektrum der Wissenschaft
Minecraft is basically education now I guess.
So they just make slimes fight and then the deaths equal pi?? That seems… backwards. Like I get the Monte Carlo thing but why would killing mobs give math.
Wait I thought pi was 3.14 not 619 something. The article says 619 slimes were in a test run (probably a typo?) and now people are gonna think that’s the answer. Also isn’t Minecraft made of cubes so how is there a “perfect circle” lol
This is cool but also sounds like they’re just guessing randomly and calling it science. Like Monte Carlo is just randomness right? If you throw enough “darts” (or have slimes go rogue) you’ll eventually get close to pi, sure, but that doesn’t mean the game is actually proving anything. Also why slimes and zoglins… seems kinda chaotic for teaching kids math.