class_docstr: A random agent using spring-like forces for its action evolution.
class_docstr_tok: ["A","random","agent","using","spring-like","forces","for","its","action","evolution","."]
code: def __init__(self, action_spec):
      self.action_spec = action_spec
      print("Starting random spring agent. Action spec:", action_spec)
  
      self.omega = np.array(
          [
              0.1,  # look left-right
              0.1,  # look up-down
              0.1,  # strafe left-right
              0.1,  # forward-backward
              0.0,  # fire
              0.0,  # jumping
              0.0,  # crouching
          ]
      )
  
      self.velocity_scaling = np.array([2.5, 2.5, 0.01, 0.01, 1, 1, 1])
  
      self.indices = {
          a["name"]: i for i, a in enumerate(self.action_spec)
      }
      self.mins = np.array([a["min"] for a in self.action_spec])
      self.maxs = np.array([a["max"] for a in self.action_spec])
      self.reset()
  
      self.rewards = 0
  
file_path: lab/python/random_agent.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import argparse
  import random
  import numpy
  import six
  import deepmind_lab
label_desc: Use image node_id 1 to create a new SpringAgent object from inherited base classes: object with example: obj = SpringAgent(action_spec)