import tensorflow as tf



class ACnet(object):  # 这个class即可用于生产global net，也可生成 worker net，因为结构相同
    def __init__(self, scope, globalAC=None, global_step=None):  # scope 用于确定生成什么网络
        # global GLOBALE_STEP
        # self.global_step = GLOBALE_STEP
        if scope == GLOBAL_NET_SCOPE:  # 创建中央大脑
            with tf.variable_scope(scope):
                self.global_step = tf.get_variable("global_step", [], tf.int32,
                                                   initializer=tf.constant_initializer(0, dtype=tf.int32),
                                                   trainable=False)
                self.obs_space = N_S
                self.act_space = N_A
                self.k = 16
                self.g_dim = 256
                self.c = 10
                self.vf_hidden_size = 128  # for value function network
                self.alpha = 0.5  # for build loss
