Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,12 @@
let experiments = 10000
var heads = 0
var wakenings = 0
for _ in 1..experiments {
wakenings += 1
match rnd(min: 0, max: 10) {
<5 => heads += 1,
_ => wakenings += 1
}
}
print("Wakenings over \(experiments) experiments: \(wakenings)")
print("Sleeping Beauty should estimate a credence of: \(Float(heads) / Float(wakenings))")