def (self, , )" ( , )return 'healthy'{'relax' 'party' }'sick'{'relax' 'party' }}[ ][ def (self, , )"returns dictionary of { : such that ( , )= other probabilities are zero phealthy ('healthysa'healthy'{'relax' 'party' }'sick'{'relax' 'party' }}[ ][areturn {'healthy':phealthy'sick': -phealthythe next example is the tiny game from example and figure of poole and mackworth [ the state is represented as (xywhere counts from zero from the leftand counts from zero upwardsso the state ( is on the bottom-left state the actions are upc for up-carefuland upr for up-risky (note that gridmdp is just type of mdp for which we have methods to showyou can assume it is just mdp heremdpexamples py -(continued class mdptiny(gridmdp)def __init__(selfdiscount= )actions ['right''upc''left''upr'self x_dim -dimension self y_dim states [( ,yfor in range(self x_dimfor in range(self y_dim)for gridmdp self xoff {'right': 'upc': 'left':- 'upr': self yoff {'right': 'upc':- 'left': 'upr': gridmdp __init__(selfstatesactionsdiscount def (self, , )"""return dictionary of { : if ( , )= other probabilities are zero ""( ,ys if ='right'return {( , ): elif ='upc'return {( ,min( + , )): elif ='left'if ( , =( , )return {( , ): elsereturn {( , ) elif ='upr'if == if < return {( , ): ( + , ): ( , + ): elseat ( , return {( , ): ( , ) ( , ) version june