Uses randomization and basic arithmetic to calculate pi.