change input format for whr to use 0/1 to represent first/second player win instead of B/W
parent
3fd39e0a8c
commit
c1c33a3596
|
@ -37,9 +37,9 @@ function genName() {
|
|||
getline
|
||||
|
||||
if ($8 == "0") {
|
||||
C = "W"
|
||||
C = "1"
|
||||
} else {
|
||||
C = "B"
|
||||
C = "0"
|
||||
}
|
||||
print ai1 "-" $3 " " ai2 "-" $6 " " C
|
||||
}
|
||||
|
|
|
@ -9,7 +9,13 @@ require 'whole_history_rating'
|
|||
# Handicap should generally be less than 500 elo
|
||||
ARGF.each do |line|
|
||||
tokens = line.split(' ')
|
||||
@whr.create_game(tokens[0], tokens[1], tokens[2], 0, 0)
|
||||
winner =
|
||||
if (tokens[2] == "0")
|
||||
"B"
|
||||
else
|
||||
"W"
|
||||
end
|
||||
@whr.create_game(tokens[0], tokens[1], winner, 0, 0)
|
||||
end
|
||||
|
||||
# Iterate the WHR algorithm towards convergence with more players/games, more iterations are needed.
|
||||
|
|
Loading…
Reference in New Issue