remove pubeval binary and change expected binary location

This commit is contained in:
Christoffer Müller Madsen 2018-03-12 00:09:33 +01:00
parent 5e937d68b4
commit ac924f655b
3 changed files with 3 additions and 3 deletions

4
bot.py
View File

@ -53,11 +53,11 @@ class Bot:
legal_moves = Board.calculate_legal_states(board, sym, roll) legal_moves = Board.calculate_legal_states(board, sym, roll)
moves_and_scores = [] moves_and_scores = []
for board in legal_moves: for board in legal_moves:
call_argument = ["./pubeval_bin"] call_argument = ["./pubeval/pubeval"]
for x in Board.board_features_to_pubeval(board, sym): for x in Board.board_features_to_pubeval(board, sym):
call_argument.append(str(x)) call_argument.append(str(x))
data = subprocess.check_output(call_argument) data = subprocess.check_output(call_argument)
moves_and_scores.append([board,str(data).split("'")[1]]) moves_and_scores.append([board, float(bytes.decode(data))])
scores = [ x[1] for x in moves_and_scores ] scores = [ x[1] for x in moves_and_scores ]
best_move_pair = moves_and_scores[np.array(scores).argmax()] best_move_pair = moves_and_scores[np.array(scores).argmax()]
return best_move_pair return best_move_pair

View File

@ -139,7 +139,7 @@ int main(int argc, char**argv) {
test[i-1] = (int) strtol(argv[i], &ptr, 10); test[i-1] = (int) strtol(argv[i], &ptr, 10);
} }
printf("%f", pubeval(0, test)); printf("%f\n", pubeval(0, test));
return 0; return 0;
} }

Binary file not shown.