From fed695e76d70b296cb6085b651b0f29ab66e7a1a Mon Sep 17 00:00:00 2001 From: melvin Date: Wed, 29 Jan 2014 17:26:19 +0800 Subject: [PATCH] add comments about input format --- exp/whr.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/exp/whr.rb b/exp/whr.rb index cf885c68cb..2fdc59bcf9 100755 --- a/exp/whr.rb +++ b/exp/whr.rb @@ -1,5 +1,9 @@ #!/usr/bin/env ruby +# read from stdin lines in the following format: +# # +# # where is 0 if player0 wins and 1 if player1 wins + require 'whole_history_rating' # w = 0 for static ratings aka bayeselo @@ -12,7 +16,7 @@ ARGF.each do |line| winner = if (tokens[2] == "0") "B" - else + else (tokens[2] == "1") "W" end @whr.create_game(tokens[0], tokens[1], winner, 0, 0)