summaryrefslogtreecommitdiff
path: root/bindings/ruby/test2_selfplay.rb
diff options
context:
space:
mode:
Diffstat (limited to 'bindings/ruby/test2_selfplay.rb')
-rw-r--r--bindings/ruby/test2_selfplay.rb13
1 files changed, 12 insertions, 1 deletions
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]])