Ejemplo n.º 1
0
    def test_bot():
        import gomill
        import rank

        logging.basicConfig(format='%(asctime)s %(levelname)s: %(message)s',
                            level=logging.DEBUG)

        # substitute with your own
        caffe_net = caffe.Net('golast19.prototxt', 'golast.trained', 0)

        player = DistWrappingMaxPlayer(DetlefDistBot(caffe_net))

        class GameState:
            pass
        s = GameState()
        s.board = gomill.boards.Board(19)
        s.ko_point = None
        s.move_history = []

        print player.genmove(s, 'b').move
Ejemplo n.º 2
0
    def test_bot():
        import gomill
        import rank

        logging.basicConfig(format='%(asctime)s %(levelname)s: %(message)s',
                            level=logging.DEBUG)

        # substitute with your own
        caffe_net = caffe.Net('golast19.prototxt', 'golast.trained', 0)

        player = DistWrappingMaxPlayer(DetlefDistBot(caffe_net))

        class GameState:
            pass

        s = GameState()
        s.board = gomill.boards.Board(19)
        s.ko_point = None
        s.move_history = []

        print player.genmove(s, 'b').move
Ejemplo n.º 3
0
    def test_bot():
        import gomill

        logging.basicConfig(format='%(asctime)s %(levelname)s: %(message)s',
                            level=logging.DEBUG)

        DCL_PATH = '/home/jm/prj/DeepCL/'
        deepcl_io = bot_deepcl.DeepCL_IO(os.path.join(DCL_PATH, 'build/predict'), options={
            'weightsfile': os.path.join(DCL_PATH, "build/weights.dat"),
            'outputformat': 'binary',
                })

        player = DistWrappingMaxPlayer(DeepCLDistBot(deepcl_io))

        class State:
            pass
        s = State()

        b = gomill.boards.Board(19)
        s.board = b
        s.ko_point = None
        logging.debug("bot: %s"% repr(player.genmove(s, 'w').move))