class_docstr: An implementation of the DQN agent.
class_docstr_tok: ["An","implementation","of","the","DQN","agent","."]
docstr: Records an observation and update state.
  
  Extracts a frame from the observation vector and overwrites the oldest
  frame in the state buffer.
  
  Args:
    observation: numpy array, an observation from the environment.
docstr_tok: ["Records","an","observation","and","update","state",".","Extracts","a","frame","from","the","observation","vector","and","overwrites","the","oldest","frame","in","the","state","buffer",".","Args",":","observation",":","numpy","array",",","an","observation","from","the","environment","."]
code: def _record_observation(self, observation):
      """Records an observation and update state.
  
      Extracts a frame from the observation vector and overwrites the oldest
      frame in the state buffer.
  
      Args:
        observation: numpy array, an observation from the environment.
      """
      # Set current observation. We do the reshaping to handle environments
      # without frame stacking.
      self._observation = np.reshape(
          observation, self.observation_shape
      )
      # Swap out the oldest frame with the current frame.
      self.state = np.roll(self.state, -1, axis=-1)
      self.state[0, ..., -1] = self._observation
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import os
  import random
  from absl import logging
  from dopamine.discrete_domains import atari_lib
  from dopamine.replay_memory import circular_replay_buffer
  import gin.tf
  import numpy
  import tensorflow
label_desc: Use image node_id 13 for calling the DQNAgent obj's underlying member method code with example usage: obj._record_observation(observation) without return types