From ac924f655bb891a01f95706d0ab056c7d4b1f38d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoffer=20M=C3=BCller=20Madsen?= Date: Mon, 12 Mar 2018 00:09:33 +0100 Subject: [PATCH] remove pubeval binary and change expected binary location --- bot.py | 4 ++-- pubeval/pubeval.c | 2 +- pubeval_bin | Bin 8748 -> 0 bytes 3 files changed, 3 insertions(+), 3 deletions(-) delete mode 100755 pubeval_bin 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 f25b5ec035ddfd1a0945a0fdbd8d0691f74d1c3a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8748 zcmeHNdsr0L6~7CMj|dqx^$`;ZQuXsyRFX&)cV>NTI!1g0qDDtpSQl9lfmPIC78iu= zE=n4smNY)%qrOAc7^CdmF=|C)nxLX-e0+^TU361XTlH&<^qiSlSkUzQ`d`1Vd%o|^ zz31F>e&^hC@10rh<*R@F@T4^%nqWd~L4*(n%Ek~vibw>s2ze0-4@D3rj`)pXx?%DJ zlr|?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