Stochastic memoization and the canonical 'wet grass' example.