reinforcement learning prize_locs [( , )( , )( , )( , )prize_apears_prob prize_reward monster_locs [( , )( , )( , )( , )( , )monster_appears_prob monster_reward_when_damaged - repair_stations [( , ) actions ["up","down","left","right" def __init__(self)stateself self self damaged false self prize none statistics self number_steps self total_reward self min_reward self min_step self zero_crossing rl_env __init__(selfsimple_game_env actions(self xself yself damagedself prize)self display( ,"","step","tot rew","ave rew",sep="\ " def do(self,action)"""updates the state based on the agent doing action returns state,reward ""reward prize can appearif self prize is none and flip(self prize_apears_prob)self prize random choice(self prize_locsactions can be noisy if flip( )actual_direction random choice(self actionselseactual_direction action modeling the actions given the actual direction if actual_direction ="right"if self ==self xdim- or (self ,self yin self vwallsreward +self crashed_reward elseself + elif actual_direction ="left"if self == or (self - ,self yin self vwallsreward +self crashed_reward version june