Skip to content

Commit

Permalink
Don't pass in 0 as it will mess up the comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
ujh committed Nov 18, 2016
1 parent cffa8c8 commit 24a9933
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/engine/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ impl Engine {

fn search<F>(&mut self, game: &Game, stop: F) where F: Fn(usize, usize, usize) -> bool {
self.send_new_state_to_workers(game);
let initial_playouts = self.root.playouts();
let initial_playouts = self.root.playouts() + 1; // Never pass in 0 below
loop {
let (playouts_best, playouts_second_best) = self.root.best2_playouts();
let done = {
Expand Down

0 comments on commit 24a9933

Please sign in to comment.