Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -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))")
|
||||
Loading…
Add table
Add a link
Reference in a new issue