def expected_utility(a, s, U, mdp):
    "The expected utility of doing a in state s, according to the MDP and U."
    return sum([p * U[s1] for (p, s1) in mdp.T(s, a)])
def expected_utility(a, s, U, mdp):
    "The expected utility of doing a in state s, according to the MDP and U."
    return sum([p * U[s1] for (p, s1) in mdp.T(s, a)])
def expected_utility ( a , s , U , mdp ) : return sum ( [ p * U [ s1 ] for ( p , s1 ) in mdp . T ( s , a ) ] )
The expected utility of doing a in state s, according to the MDP and U.
The expected utility of doing a in state s according to the MDP and U .