From 20788292a4de750a80117f814be2d2158e203ba8 Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 20 Mar 2018 21:51:58 +0100 Subject: [PATCH] Able to eval --- eval.py | 2 ++ network.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/eval.py b/eval.py index 1d02a4b..5859e22 100644 --- a/eval.py +++ b/eval.py @@ -15,6 +15,8 @@ class Eval: @staticmethod def make_pubeval_move(board, sym, roll): legal_moves = Board.calculate_legal_states(board, sym, roll) + # print("Board:", board) + # print("Length:",len(board)) moves_and_scores = [ ( board, pubeval.eval(False, Board.board_features_to_pubeval(board, sym))) for board diff --git a/network.py b/network.py index 069826a..7e441af 100644 --- a/network.py +++ b/network.py @@ -280,7 +280,7 @@ class Network: board = Board.initial_state while Board.outcome(board) is None: roll = (random.randrange(1,7), random.randrange(1,7)) - board = (self.p1.make_move(board, self.p1.get_sym(), roll))[0] + board = (self.p1.make_move(Board.map_to_tesauro(board), self.p1.get_sym(), roll))[0] roll = (random.randrange(1,7), random.randrange(1,7)) board = Board.flip(Eval.make_random_move(Board.flip(board), 1, roll)) sys.stderr.write("\t outcome {}".format(Board.outcome(board)[1]))