From d2b078ad15fcadb5de8ef25b8f19bde613f59a41 Mon Sep 17 00:00:00 2001 From: Martin DeMello Date: Sat, 9 Feb 2019 18:11:01 -0800 Subject: add support for board configuration --- bindings/ruby/test2_selfplay.rb | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'bindings/ruby/test2_selfplay.rb') diff --git a/bindings/ruby/test2_selfplay.rb b/bindings/ruby/test2_selfplay.rb index 33d08ce..253345e 100644 --- a/bindings/ruby/test2_selfplay.rb +++ b/bindings/ruby/test2_selfplay.rb @@ -1,7 +1,18 @@ require_relative 'quackle_runner' +# Allow a board file to be passed in on the command line +if ARGV[0] + b = IO.read(ARGV[0]) + board = Quackle::BoardUtils::read_board_params( + b, doublespaced: true, piped: true) +else + # use the default empty board + board = nil +end + runner = Quackle::AIRunner.new( - lexicon: 'twl06', alphabet: 'english', datadir: '../../data', random_seed: 42) + lexicon: 'csw15', alphabet: 'english', board: board, + datadir: '../../data', random_seed: 42) runner.init_game([["Compy1", :speedy], ["Compy2", :speedy]]) -- cgit v1.2.3