class_docstr: A high level game controller class.
  
  The class allows interacting with DMLab environment using high level actions,
  such as look at specific direction, move to specific coordinates etc.
class_docstr_tok: ["A","high","level","game","controller","class",".","The","class","allows","interacting","with","DMLab","environment","using","high","level","actions",",","such","as","look","at","specific","direction",",","move","to","specific","coordinates","etc","."]
docstr: Stops the player as soon as possible.
docstr_tok: ["Stops","the","player","as","soon","as","possible","."]
code: def stop(self, max_steps=2000):
      """Stops the player as soon as possible."""
      start_orientation = self.orientation[1]
      for _ in six.moves.range(max_steps):
          speed = np.linalg.norm(self.velocity[:2])
          if speed < _VELOCITY_TOLERANCE and np.allclose(
              self.rotation_velocity,
              [0.0, 0.0, 0.0],
              atol=_VELOCITY_TOLERANCE,
          ):
              break
          if speed < _MIN_BRAKING_SPEED:
              self._step(_NOOP_ACTION, 1)
          else:
              self.look_at_2d(
                  self.orientation[1]
                  + np.degrees(
                      np.arctan2(self.velocity[1], self.velocity[0])
                  ),
                  steps=1,
              )
  
              self._step(self._get_actions(_MOVE_ACTION_NAME, -1), 1)
      else:
          raise AssertionError("Failed to stop in max steps.")
      self.look_at_2d(start_orientation, steps=1)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import six
  from python.tests.utils import math_utils
label_desc: Use image node_id 5 for calling the GameController obj's underlying member method code with example usage: obj.stop(max_steps) without return types