import tensorflow as tf

        h_fc1 = tf.nn.relu(tf.add(tf.matmul(h_conv3_flat, W_fc1), b_fc1, 'h_fc1'))

        readout = tf.add(tf.matmul(h_fc1, W_fc2), b_fc2, 'h_fc2')

        return s, readout, h_fc1

    def creat_optimizer(self,readout):
        action = tf.placeholder(tf.float32,[None,self.ACTIONS])
        y = tf.placeholder(tf.float32,[None])
        readout_action = tf.reduce_sum(tf.multiply(readout,action),reduction_indices=1)
        cost =tf.reduce_mean(tf.square(y-readout_action))
        train_step = tf.train.AdamOptimizer(1e-6).minimize(cost)
        return train_step,y,action
    #输入一个初始状态s_t，时间为t，之后进行游戏
