directly above the for loopadd the following two highlighted lines these lines initialize tensorflow session which in turn manages the resources needed to run operations on the gpu the second line initializes all the variables in your computation graphfor exampleinitializing weights to before updating them additionallyyou will nest the for loop within the with statementso indent the entire for loop by four spaces/ataribot/bot_ _q_network py trainer tf train gradientdescentoptimizer(learning_rate=learning_rateupdate_model trainer minimize(errorwith tf session(as sessionsession run(tf global_variables_initializer()for episode in range( num_episodes )obs_t env reset(before the line reading obs_tp rewarddone_ env step(action)insert the following lines to compute the action this code evaluates the corresponding placeholder and replaces the action with random action with some probability