diff --git a/bot.py b/bot.py index 0f1b32a..a2ac368 100644 --- a/bot.py +++ b/bot.py @@ -53,11 +53,11 @@ class Bot: legal_moves = Board.calculate_legal_states(board, sym, roll) moves_and_scores = [] for board in legal_moves: - call_argument = ["./pubeval_bin"] + call_argument = ["./pubeval/pubeval"] for x in Board.board_features_to_pubeval(board, sym): call_argument.append(str(x)) 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 ] best_move_pair = moves_and_scores[np.array(scores).argmax()] return best_move_pair diff --git a/pubeval/pubeval.c b/pubeval/pubeval.c index 31d254a..62dfa65 100644 --- a/pubeval/pubeval.c +++ b/pubeval/pubeval.c @@ -139,7 +139,7 @@ int main(int argc, char**argv) { test[i-1] = (int) strtol(argv[i], &ptr, 10); } - printf("%f", pubeval(0, test)); + printf("%f\n", pubeval(0, test)); return 0; } diff --git a/pubeval_bin b/pubeval_bin deleted file mode 100755 index f25b5ec..0000000 Binary files a/pubeval_bin and /dev/null differ