import tensorflow as tf


        h_conv3_flat = tf.reshape(h_conv3, [-1, 1600], 'h_conv3_flat')
        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，之后进行游戏
    def process_game(self,s_t):
        #通过CNN运算得到Q值向量
        read_out_t = self.sess.run(self.readout,feed_dict={self.s:[s_t]})[0]
        a_t =np.zeros([self.ACTIONS])
        action_index =0
        if self.time % self.FRAME_PER_ACTION == 0:
            if random.random()<= self.epsilon:   #随机选择动作
                print("-----------随机选择动作--------------")
