class_docstr: Code to visualize an agent's behaviour.
class_docstr_tok: ["Code","to","visualize","an","agent","'s","behaviour","."]
code: def visualize(self):
      if self.step % self.render_rate == 0:
          self.screen.fill((0, 0, 0))
          for plotter in self.plotters:
              self.screen = (
                  self.screen.copy()
              )  # To avoid locked Surfaces issue.
              self.screen.blit(plotter.draw(), (plotter.x, plotter.y))
          self.save_frame()
      self.step += 1
  
file_path: dopamine/dopamine/utils/agent_visualizer.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import subprocess
  import gin
  import numpy
  from PIL import Image
  import pygame
label_desc: Use image node_id 2 for calling the AgentVisualizer obj's underlying member method code with example usage: obj.visualize() without return types