Safer autonomous driving in a stochastic, partially-observable environment by hierarchical contingency planning