Skip to content

Commit

Permalink
Correct cutoff criterion
Browse files Browse the repository at this point in the history
  • Loading branch information
ujh committed Nov 17, 2016
1 parent 8e3a407 commit 9e79b44
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bin/benchmark.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,18 @@ def check_for_crashes
end

def done?
return true unless File.exists?(DAT_FILE)
return false unless File.exists?(DAT_FILE)
br = BenchmarkResults.new(DAT_FILE)
# Continue if less than 100 games were played
return false if br.games < 100
# Stop at 1000 games
return true if br.games >= 1000
# Stop if the error is below 3 percent
br.error95 <= 0.03
br.error95 <= 3.0
end

exit if done?

loop do
check_for_crashes
run_benchmark
Expand Down

0 comments on commit 9e79b44

Please sign in to comment.