class MCTS::Playout
Attributes
game_state[R]
Public Class Methods
new(game_state)
click to toggle source
# File lib/mcts/playout.rb, line 6 def initialize(game_state) @game_state = game_state.dup end
Public Instance Methods
play()
click to toggle source
# File lib/mcts/playout.rb, line 10 def play my_color = @game_state.last_turn_color playout @game_state.won?(my_color) end
playout()
click to toggle source
# File lib/mcts/playout.rb, line 16 def playout until @game_state.finished? @game_state.set_move @game_state.generate_move end end