Decision-Theoretic Planning with non-Markovian Rewards