Sha256: 1cd69b33e479c66393b7db756577fa3329be239e456c217f57b08c4e7d6c721a

Contents?: true

Size: 630 Bytes

Versions: 2

Compression:

Stored size: 630 Bytes

Contents

require_relative '../lib/rubykon'
require_relative '../lib/benchmark/avg'

Benchmark.avg do |benchmark|
  game_state_9 = Rubykon::GameState.new Rubykon::Game.new(9)
  game_state_13 = Rubykon::GameState.new Rubykon::Game.new(13)
  game_state_19 = Rubykon::GameState.new Rubykon::Game.new(19)
  mcts = MCTS::MCTS.new

  benchmark.config warmup: 180, time: 120

  benchmark.report "9x9 10_000 iterations" do
    mcts.start game_state_9, 10_000
  end

  benchmark.report "13x13 2_000 iterations" do
    mcts.start game_state_13, 2_000
  end

  benchmark.report "19x19 1_000 iterations" do
    mcts.start game_state_19, 1_000
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rubykon-0.3.1 benchmark/mcts_avg.rb
rubykon-0.3.0 benchmark/mcts_avg.rb