parameters: (self)
docstring: set the display hint above the agent's head (toggled with F2)
docstring_summary: set the display hint above the agent's head (toggled with F2)
docstring_tokens: set the display hint above the agent s head ( toggled with F2 )
function: def set_display_hint(self):
          """
          set the display hint above the agent's head (toggled with F2)
          """
          display_hint = constants.getDisplayHint()
          if display_hint:
              if display_hint == 'fitness':
                  self.state.label = '%.2f' % self.org.fitness
              elif display_hint == 'time alive':
                  self.state.label = str(self.org.time_alive)
              elif display_hint == 'hit points':
                  self.state.label = ''.join('.' for i in range(int(5*OpenNero.get_environment().get_hitpoints(self))))
              elif display_hint == 'id':
                  self.state.label = str(self.org.genome.id)
              elif display_hint == 'champion':
                  if self.org.champion:
                      self.state.label = 'champ!'
                  else:
                      self.state.label = ''
              elif display_hint == 'rank':
                  self.state.label = str(self.org.rank)
              elif display_hint == 'debug':
                  self.state.label = str(OpenNero.get_environment().get_state(self))
              else:
                  self.state.label = '?'
          else:
              # the first time we switch away from displaying stuff,
              # change the window caption
              if self.state.label:
                  self.state.label = ""
function_tokens: def set_display_hint ( self ) : display_hint = constants . getDisplayHint ( ) if display_hint : if display_hint == 'fitness' : self . state . label = '%.2f' % self . org . fitness elif display_hint == 'time alive' : self . state . label = str ( self . org . time_alive ) elif display_hint == 'hit points' : self . state . label = '' . join ( '.' for i in range ( int ( 5 * OpenNero . get_environment ( ) . get_hitpoints ( self ) ) ) ) elif display_hint == 'id' : self . state . label = str ( self . org . genome . id ) elif display_hint == 'champion' : if self . org . champion : self . state . label = 'champ!' else : self . state . label = '' elif display_hint == 'rank' : self . state . label = str ( self . org . rank ) elif display_hint == 'debug' : self . state . label = str ( OpenNero . get_environment ( ) . get_state ( self ) ) else : self . state . label = '?' else : # the first time we switch away from displaying stuff, # change the window caption if self . state . label : self . state . label = ""