state one_hot(state n_obsqtarget reward discount_factor np max( (state )delete the line that updates [state,actionand replace it with the following lines this code takes the output of the current model and updates only the value in this output that corresponds to the current action taken as resultq-values for the other actions don' incur loss/ataribot/bot_ _ls py state one_hot(state n_obsqtarget reward discount_factor np max( (state )label (statelabel[action( learning_rate_ label[actionlearning_rate \qtarget labels append(labelepisode_reward +reward right after state state add periodic update to the model this trains your model every time steps/ataribot/bot_ _ls py