Planning or more generally decision-making is a fundamental problem in Artificial Intelligence. Planning is useful whenever there is some notion of a goal and we would like to come up with a plan that helps us achieve the goal in a reasonable amount of time. Formally, we need to have a state space S, a start state s, a set of goals G and a cost function C that we would like to minimize. The goal of planning, then, is to come up with a plan that takes us from the start state to one of the goal states. The plan could be defined in various ways: it could be a set of states $n in S$.