Number of rolls:

Value for Pi:

Add Entry dice image dice image

This is a variation of Buffon's experiment except pi will be calculated from the rolling of dice rather than throwing a needle on a wooden floor. US civil war prisoners would replicate Buffon's experiment by throwing a match on a lined piece of paper and counting the number of times the match crossed a line.

In this case, pi is calculated from the rolling of two dice. When graphed, the results of throwing the dice are similar to a Poisson distribution. The results are stored on Ethereum's blockchain as events; the blockchain is immutable so once an event is recorded, it is there for the life of the blockchain. As the number of rolls increases, the calculation of pi should become more accurate.

The purpose of this exercise is to demonstrate how a public blockchain can be used to conduct an experiment with multiple participants providing results. More details wll be added to the site as additional functions are added.

If you are familiar with Ethereum, you can send die rolls through your own node using your own wallet. The contract address is 0x16FA8DF7F16f9E41B7C5522Cc12a22053A2a776F. The code and ABI can be found here. Each dice roll creates an event. Eventually, we can use event filters to calculate pi from a single wallet and compare that with the overall pi. The events can also be used to calculate pi from different dice rolls combinations.