This paper introduces decision-theoretic planning techniques into automatic music generation. Markov decision processes (MDPs) are a mathematical model of planning under uncertainty, and factored MDPs demonstrate great advantages in an environment where the state space is large. Given a melody, we use a factored MDP planner to fill in the other three voices, based on the characteristics of classical Western four-part harmony.