def best_policy(mdp, U):
pi = {}<EOL>for s in mdp.states:<EOL><INDENT>pi[s] = argmax(mdp.actions(s), lambda a:expected_utility(a, s, U, mdp))<EOL><DEDENT>return pi<EOL>
Given an MDP and a utility function U, determine the best policy,
    as a mapping from state to action. (Equation 17.4)