Skip to content

Commit

Permalink
Test global frequency
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Van Geffen committed Dec 17, 2024
1 parent 5a5ba94 commit 0218ceb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/game/aggregation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,11 @@ mod tests {
if !(action_ev_weighted_sum.is_nan() && player_ev.is_nan()) {
assert!((action_ev_weighted_sum - player_ev).abs() < 1e-3);
}

// Check that the global frequency is between 0 and 1
if !row.global_frequency.is_nan() {
assert!(row.global_frequency >= 0.0 && row.global_frequency <= 1.0);
}
}

fn check_tree(tree: &AggActionTree, config: &TreeConfig) {
Expand Down

0 comments on commit 0218ceb

Please sign in to comment.