<s> import numpy as np <EOL> class World ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , lifespan = None ) : <EOL> """<STR_LIT>""" <EOL> if lifespan is None : <EOL> self . LIFESPAN = <NUM_LIT:10> ** <NUM_LIT:4> <EOL> else : <EOL> self . LIFESPAN = lifespan <EOL> self . timestep = <NUM_LIT:0> <EOL> self . name = '<STR_LIT>' <EOL> self . num_sensors = <NUM_LIT:0> <EOL> self . num_actions = <NUM_LIT:0> <EOL> def step ( self , action ) : <EOL> """<STR_LIT>""" <EOL> self . timestep += <NUM_LIT:1> <EOL> sensors = np . zeros ( self . num_sensors ) <EOL> reward = <NUM_LIT:0> <EOL> return sensors , reward <EOL> def is_alive ( self ) : <EOL> """<STR_LIT>""" <EOL> if ( self . timestep < self . LIFESPAN ) : <EOL> return True <EOL> else : <EOL> return False <EOL> def visualize ( self , agent ) : <EOL> """<STR_LIT>""" <EOL> print self . timestep , '<STR_LIT>' </s>
