def play(sim, l_pol, r_pol, n_episodes = 100):
    """Run n_episodes episodes of Pong using the policies l_pol and r_pol"""

    try:
        for i in range(n_episodes):
            while not sim.done:
                state = sim.get_state()
                l_a = l_pol.get_action(state)
                r_a = r_pol.get_action(state)
                sim.step(l_a, r_a)
            sim.new_episode()
    except KeyboardInterrupt:
        pass
    return sim.score