reinforcement learning - damaged and prize ahead if and else not damaged and prize ahead if not and else features [ , , , , , , , , , the next features are for prize locations and distances from outside in all directions for pr in simple_game_env prize_locs+[none]if ==prfeatures +[ -xy -yelsefeatures +[ fp feature for when prize is at , this knows about the wall to the right of the prize if ==( , )if == fp elif < fp elsefp - elsefp features append(fp return features def monster_ahead( , ,action)"""returns if the location expected to get to by doing action from ( ,ycan contain monster ""if action ="rightand ( + ,yin simple_game_env monster_locsreturn elif action ="leftand ( - ,yin simple_game_env monster_locsreturn elif action ="upand ( , + in simple_game_env monster_locsreturn elif action ="downand ( , - in simple_game_env monster_locsreturn elsereturn def wall_ahead( , ,action)"""returns if there is wall in the direction of action from ( ,ythis is complicated by the internal walls ""if action ="rightand ( ==simple_game_env xdim- or ( ,yin simple_game_env vwalls)return elif action ="leftand ( == or ( - ,yin simple_game_env vwalls)version june