mcts1.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:ml-five 作者: splendor-kill 项目源码 文件源码
def unpack_state(self, s, shape):
        a = np.fromstring(s, dtype=np.uint8)
        a = np.unpackbits(a)
        a = a.reshape(shape[0], -1)
        a = a[:, :shape[1]]
        b = np.zeros_like(a[0], np.int)
        b[a[0] == 1] = Board.STONE_BLACK
        b[a[1] == 1] = Board.STONE_WHITE
        b[a[2] == 1] = Board.STONE_EMPTY
        return b
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号