# Path: util/tools.py
# def batch_flatten(ndarry):
#     return ndarry.reshape(ndarry.shape[0], -1)
# 
# Path: util/gentensor.py
# def gentensor(selfpos, emypos):
#     '''
#     selfpos, emypos: ndarray [9,10,16]
#     return:
#         selfmove, emymove, selfprot, selfprot: ndarray [9,10,16]
#     '''
#     fen = tensor2fen(selfpos, emypos)
#     move = genmove.gen(fen)
#     fen = fen + '\t' + move.replace('\n','\t')
#     selfpos, emypos, selfmove, emymove, selfprot, emyprot = fen2tensor(fen)
#     return [selfmove, emymove, selfprot, emyprot]


import tensorflow as tf
from util.tools import batch_flatten
from util.gentensor import gentensor
from config import config
#!/usr/bin/python3
#-*-coding:utf-8-*-
#$File: value_dataset.py
#$Date: Fri May 27 12:03:31 2016
#$Author: Like Ma <milkpku[at]gmail[dot]com>




class Reactor(object):
    def __init__(self, policy_model, load_path):
        self.player = policy_model
        self.sess = tf.Session()

# Path: util/tools.py
# def batch_flatten(ndarry):
#     return ndarry.reshape(ndarry.shape[0], -1)
# 
# Path: util/gentensor.py
# def gentensor(selfpos, emypos):
#     '''
#     selfpos, emypos: ndarray [9,10,16]
#     return:
#         selfmove, emymove, selfprot, selfprot: ndarray [9,10,16]
#     '''
#     fen = tensor2fen(selfpos, emypos)
#     move = genmove.gen(fen)
#     fen = fen + '\t' + move.replace('\n','\t')
#     selfpos, emypos, selfmove, emymove, selfprot, emyprot = fen2tensor(fen)
#     return [selfmove, emymove, selfprot, emyprot]


# Path: rl_train/value_dataset.py
import tensorflow as tf
from util.tools import batch_flatten
from util.gentensor import gentensor
from config import config

#!/usr/bin/python3
#-*-coding:utf-8-*-
#$File: value_dataset.py
#$Date: Fri May 27 12:03:31 2016
#$Author: Like Ma <milkpku[at]gmail[dot]com>




class Reactor(object):
    def __init__(self, policy_model, load_path):
        self.player = policy_model
        self.sess = tf.Session()

        saver = tf.train.Saver()