Fermat's Wager
Jump to navigation
Jump to search
Showing my working for this proposal. --Kevan (talk) 16:48, 11 August 2020 (UTC)
Code
$wins = array(0,0,0,0,0,0,0); for ($i=0; $i<1000000; $i++) { $scores = array(2,2,1,0,0,0,0); while (max($scores)<3) { $scores[rand(0,6)]++; } $wins[array_search(max($scores),$scores)]++; } print_r($wins);
Output
Array ( [0] => 408544 [1] => 409071 [2] => 93189 [3] => 22226 [4] => 22446 [5] => 22190 [6] => 22334 )