Close Menu
    Trending
    • US missiles hit Iran as path towards de-escalation uncertain
    • UN rights chief Turk wins second term despite US and Israeli opposition | United Nations News
    • LeBron’s decision might force Jalen Brunson to do the unthinkable
    • 8 Unique Side Hustle Ideas for Summer 2026 and Beyond
    • NHTSA considers new car door safety rules after fatal Tesla crashes
    • PlayStation Network outage resolved after thousands of gamers unable to play
    • Market Talk – July 24, 2026
    • Joe Biden Gives Up, Declines to Seek Further Review of Appeals Court Ruling on Release of Audiotapes with Ghostwriter
    Benjamin Franklin Institute
    Saturday, July 25
    • Home
    • Politics
    • Business
    • Science
    • Technology
    • Arts & Entertainment
    • International
    Benjamin Franklin Institute
    Home»Science»How mathematicians use Minecraft to calculate pi
    Science

    How mathematicians use Minecraft to calculate pi

    Team_Benjamin Franklin InstituteBy Team_Benjamin Franklin InstituteMay 26, 2026No Comments6 Mins Read
    Share Facebook Twitter Pinterest Copy Link LinkedIn Tumblr Email VKontakte Telegram
    Share
    Facebook Twitter Pinterest Email Copy Link


    The blockbuster game Minecraft depicts a world created by cubes: everything is made of discrete building blocks. It may therefore seem particularly unsuitable for calculating pi (π), the mathematical constant that equals the ratio of a circle’s circumference to its diameter. To determine the infinitely many, never-repeating decimal places of this irrational number, one must use the shape of a perfect circle that has no corners or edges.

    Yet mathematicians Molly Lynch of Hollins University and Michael Weselcouch of Roanoke College have found a way to determine the mathematical constant’s value of 3.14159… as accurately as possible within the Minecraft world.

    If you—like me—are only vaguely familiar with Minecraft, here’s a brief explanation: in this “sandbox” game, you can move relatively freely through the blocky world and build various structures, such as buildings or circuits, from cube-shaped elements. To do this, you have to gather resources and process those raw resources into new materials and items.


    On supporting science journalism

    If you’re enjoying this article, consider supporting our award-winning journalism by subscribing. By purchasing a subscription you are helping to ensure the future of impactful stories about the discoveries and ideas shaping our world today.


    The many freedoms offered by Minecraft’s gameplay allow players to be creative. Past players have demonstrated that Minecraft is Turing complete, meaning that any computer program can be implemented within the game. Users have even managed to program a playable version of Minecraft within the game itself!

    Knowing this, it’s no longer too surprising that the mathematical constant pi can also be calculated in Minecraft. If any computer program can be implemented in the game, then so can one that outputs the value of pi. Translating an algorithm into the game world is usually extremely complex, however. It requires translating all the instructions a computer follows on an electrical level—clear the register and insert a new value, process values from registers x and y using a logical AND operation, and so on—into a Minecraft action. A simple algorithm can quickly escalate into thousands of different in-game instructions.

    Lynch and Weselcouch wanted to avoid that. Their goal was to make mathematics appealing to young people, and they thought Minecraft was a perfect vehicle with which to do so. In a 2024 paper they presented several methods for calculating well-known mathematical constants such as pi in the popular video game—all done without too much effort.

    Throwing Darts at a Board

    The two researchers first needed a method for calculating pi that could be easily implemented in Minecraft. They opted for the well-studied darts technique.

    Imagine you play darts about as well as I do—which is to say, very badly. In this thought experiment, you’re throwing darts at a circular board mounted to a square area of wall. You’ll definitely hit somewhere within the square area of wall but not necessarily the circular dartboard. Because you’re not particularly skilled at throwing darts, it’s pure chance whether the dart lands on the circular board or on the wall outside of it; in other words, it’s equally likely to hit anywhere within the total area of the square. If you throw enough darts, you can approximate the value of pi.

    Why is this the case? Let’s assume the square has a side length of two meters and covers an area of four square meters. That would make the diameter of the circle two meters as well, giving the circle a radius of one meter and thus an area of π square meters. Therefore, if the darts are randomly distributed within the square, there is a probability of π⁄4 that they will land within the circle. By counting the darts within the circle and dividing by the total number of darts thrown, the result should be close to π⁄4. Multiply that result by four, and you have an approximation of pi.

    Lynch and Weselcouch implemented precisely this clever technique for approximating pi in Minecraft in 2024. They first approximated a circular structure within the game using red blocks with a “radius” of 11 blocks. They then surrounded the red blocks with blue blocks, resulting in a red approximate circle enclosed within a blue square.

    Next they generated random events in the game that functioned similarly to the darts hitting the target in the darts example. To do this, the pair used a Minecraft creature known as a slime. Unlike other creatures in the game, “slimes continue moving when no players are nearby and they change direction at random,” Lynch and Weselcouch explain in their paper. They paired the slimes with a second type of creature, called zoglins, which kill slimes.

    With these two creatures, Lynch and Weselcouch were able to generate random events that could be tracked in-game without direct observation. By covering the red circle with funnel-shaped blocks called hoppers, which automatically collect objects that fall directly on top of them, the researchers created a way to get a signal for each slime’s death: every time a slime was killed, it dropped items that were collected by a hopper. By dividing the number of slimes killed within the circle (or the number of items collected by hoppers within the circle) by the total number of creatures killed (or the number of items collected by all hoppers on the square), one can obtain an approximation of π⁄4.

    The two researchers tested their method in the game. During their test run, a total of 619 slimes were killed, 508 of which were killed inside the circle. These data allowed them to obtain the following approximate value for pi:

    π ≈ 4 × (508 / 619) = 3.283

    By the authors own admission, this isn’t a particularly good approximation of pi. They provide two ways to improve their method: enlarging the area of the square, and thus the area of the circle, and increasing the number of slimes killed within that total area. Enlarging the circle improves accuracy by better approximating a true circle. And the darts technique—which is formally called the Monte Carlo method—becomes more accurate when more random events are generated. In the Minecraft case, that means sending even more slimes and zoglins into battle.

    This method of calculating pi will never be truly efficient, as Lynch and Weselcouch themselves admit. But efficiency is not their goal: it’s to inspire people, particularly young people, with mathematics. A Minecraft battle between slimes and zoglins is probably far better suited to that than a highly optimized algorithm.

    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.



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email Telegram Copy Link

    Related Posts

    Science

    NHTSA considers new car door safety rules after fatal Tesla crashes

    July 24, 2026
    Science

    Fungus made fashion—researchers turn living organisms into textiles

    July 24, 2026
    Science

    How a 99-year-old mathematician unraveled a century-old braid mystery

    July 24, 2026
    Science

    Is it possible to regain a sense of smell? These scientists are working on it

    July 24, 2026
    Science

    Why don’t insects live in the ocean?

    July 24, 2026
    Science

    Why environmental groups are suing over SpaceX’s land swap deal

    July 24, 2026
    Editors Picks

    Tech Life – Too young to scroll?

    July 7, 2026

    Tracking Trump’s Tariffs: Rates for China, the E.U. and More

    July 28, 2025

    Raiders’ Maxx Crosby opens up for first time since trade drama, hints at future plans

    March 12, 2026

    The Quiet Rise Of Capital Controls In America

    April 14, 2026

    Union sign 17-year-old homegrown D Neil Pierre

    February 4, 2025
    About Us
    About Us

    Welcome to Benjamin Franklin Institute, your premier destination for insightful, engaging, and diverse Political News and Opinions.

    The Benjamin Franklin Institute supports free speech, the U.S. Constitution and political candidates and organizations that promote and protect both of these important features of the American Experiment.

    We are passionate about delivering high-quality, accurate, and engaging content that resonates with our readers. Sign up for our text alerts and email newsletter to stay informed.

    Latest Posts

    US missiles hit Iran as path towards de-escalation uncertain

    July 25, 2026

    UN rights chief Turk wins second term despite US and Israeli opposition | United Nations News

    July 25, 2026

    LeBron’s decision might force Jalen Brunson to do the unthinkable

    July 25, 2026

    Subscribe for Updates

    Stay informed by signing up for our free news alerts.

    Paid for by the Benjamin Franklin Institute. Not authorized by any candidate or candidate’s committee.
    • Privacy Policy
    • About us
    • Contact us

    Type above and press Enter to search. Press Esc to cancel.