More things, better things, awesome

This commit is contained in:
2022-06-18 23:39:42 +02:00
parent dc10504b80
commit c9d9d59535
7 changed files with 214 additions and 4 deletions

View File

@@ -158,6 +158,8 @@ impl Game {
.collect::<Vec<_>>()
};
self.evidence = 1.0;
let mut step = (f64::INFINITY, f64::INFINITY);
let mut iter = 0;
@@ -194,7 +196,7 @@ impl Game {
}
if d.len() == 1 {
self.evidence *= evidence(&d, &margin, &tie, 0);
self.evidence = evidence(&d, &margin, &tie, 0);
d[0].prior = t[0].posterior_win() - t[1].posterior_lose();
d[0].likelihood = approx(d[0].prior, margin[0], tie[0]) / d[0].prior;