PLANNING
Planning in artificial intelligence (AI) involves creating a
sequence of actions to achieve specific goals. This area of AI
focuses on the automation of decision-making processes,
enabling systems to operate autonomously and solve complex
tasks. Here’s an overview of key concepts and techniques in AI
planning:
Key Concepts
States: Represent the world at a specific point in time.
Each state is a unique configuration of the system and its
environment.
Actions: Operations that transition the system from one state to
another. Each action has preconditions (conditions that must be
true before the action is executed) and effects (changes to the state
resulting from the action).
Goals: Desired states or conditions that the system aims to achieve.
Plans: Sequences of actions that lead from the initial state to a
goal state.
Types of Planning
Classical Planning: Assumes a fully observable, deterministic
environment where the effects of actions are known and
predictable. Planners use algorithms to find a sequence of actions
to achieve the goal.
Hierarchical Planning: Breaks down tasks into smaller sub-tasks,
creating a hierarchy of plans. This approach simplifies complex
problems by tackling smaller, more manageable parts.
Conditional Planning: Deals with uncertainty by creating plans
that include conditional branches, allowing the system to choose
different actions based on the state of the environment
Probabilistic Planning: Considers the probability of different
outcomes and incorporates them into the planning process. This
type of planning is useful in environments where actions have
uncertain effects.
Reinforcement Learning: Combines planning and learning by
allowing agents to learn optimal policies through interaction with
the environment. Agents receive rewards or penalties based on
their actions and use this feedback to improve future performance.
Classical planning
Classical planning in artificial intelligence (AI) is a branch of automated
planning that deals with finding a sequence of actions that lead from an
initial state to a goal state in a deterministic, fully observable
environment. This type of planning assumes that:
1. The environment is fully observable: The planner has complete
information about the current state of the world at any given
time.
2. The environment is deterministic: The outcome of each action is
predictable and there is no uncertainty in action effects.
3. The goals are clearly defined: There is a specific set of conditions
that define when a goal has been achieved.
4. Actions have preconditions and effects: Each action can only be
executed if certain conditions are met (preconditions), and
executing the action changes the state of the world in known ways
(effects).
Key Components of Classical Planning
1. States: Representations of the world at a given point in time.
2. Actions (or Operators): Defined by their preconditions and
effects. An action can be applied in a state if its preconditions are
satisfied in that state, leading to a new state based on its effects.
3. Initial State: The starting point of the planning problem.
4. Goal State: The desired end state that the planner aims to achieve.
5. Plan: A sequence of actions that, when executed from the initial
state, transitions the world through intermediate states to reach the
goal state.
Example of Classical Planning
Consider a simple robot navigation problem:
Initial State: The robot is at location A.
Goal State: The robot needs to be at location B.
Actions:
o Move from A to B (precondition: robot is at A; effect: robot
is at B).
o Move from B to C (precondition: robot is at B; effect: robot
is at C).
o Move from C to B (precondition: robot is at C; effect: robot
is at B).
A classical planner would search for a sequence of these actions that
would move the robot from location A to location B.
Planning Algorithms in Classical Planning
1. State-Space Search: Algorithms such as Breadth-First Search
(BFS), Depth-First Search (DFS), and A* search are used to
explore the space of possible states and find a path from the initial
state to the goal state.
2. GraphPlan: Constructs a planning graph, a layered representation
of actions and states, and searches for a valid plan within this
graph.
3. STRIPS (Stanford Research Institute Problem Solver): A
formal language used to define classical planning problems in
terms of states, goals, and actions, which can then be processed by
a planner to generate a plan.
Classical planning is foundational in AI and serves as the basis for more
complex planning techniques that handle uncertainty, partial
observability, and dynamic environments.
Planning Algorithms
State-Space Search: Involves exploring the state space (all
possible states and actions) to find a path to the goal. Techniques
include:
1. Breadth-First Search (BFS)
2. Depth-First Search (DFS)
3. A* Algorithm: Uses heuristics to guide the search process
efficiently.
GraphPlan: Constructs a planning graph, a layered graph
representation of actions and states, to find a valid plan.
Partial-Order Planning: Focuses on the ordering of actions,
allowing for some actions to be unordered relative to others, which
can provide more flexibility in plan execution.
STRIPS (Stanford Research Institute Problem Solver): A
planning language and system that formalizes the planning
problem in terms of states, goals, and actions.
Applications of AI Planning
Robotics: Autonomous robots use planning to navigate
environments, perform tasks, and interact with objects.
Logistics: Planning algorithms optimize routes, schedules, and
resource allocation in transportation and supply chain management.
Game AI: Non-player characters (NPCs) use planning to make
decisions and execute strategies in video games.
Healthcare: AI planning helps in scheduling treatments, managing
patient care, and optimizing resource use in hospitals.
Smart Home Systems: AI-driven planning manages household
tasks, energy consumption, and security.
Challenges in AI Planning
Scalability: As the complexity of the environment increases, the state
space grows exponentially, making it challenging to find optimal plans.
Uncertainty: Handling uncertainty in action outcomes and
environmental changes requires robust planning methods.
Real-Time Planning: Many applications require plans to be
generated and executed in real-time, necessitating efficient and
quick decision-making processes.
Integration with Learning: Combining planning with learning
from experience to improve performance over time remains an
ongoing research area.
AI planning continues to evolve, with ongoing research aimed at
improving the efficiency, robustness, and applicability of planning
techniques in increasingly complex and dynamic environments.
Algorithms in planning
In Artificial Intelligence (AI), planning algorithms are essential
for generating a sequence of actions to achieve specific goals.
Here are some key planning algorithms used in AI:
1. Classical Planning Algorithms
These algorithms operate in a deterministic, fully observable
environment where actions have known effects.
Forward/Backward State-Space Search:
o Forward Search (Progression Planning): Starts from
the initial state and applies actions to reach the goal
state.
o Backward Search (Regression Planning): Starts
from the goal state and works backward to find
actions that lead to the initial state.
GraphPlan:
o Uses a planning graph to represent the problem. The
graph alternates between layers of actions and states
until the goal is reachable.
o Efficient for problems with a large number of states
due to its compact representation.
SATPlan:
o Converts the planning problem into a Boolean
satisfiability problem (SAT) and uses SAT solvers to
find a solution.
o Suitable for complex planning problems where
traditional search methods are inefficient.
Partial-Order Planning (POP):
o Plans actions without committing to a specific order
unless necessary, allowing for flexibility and
parallelism in actions.
Forward State Space Search(Progression) -
FSSS
Backward State Space Search(Regression)-
BSSS
Other Classical Planning Approaches
In addition to the previously mentioned classical planning
approaches, several other classical planning methods and
frameworks have been developed over time. These approaches
typically assume a deterministic and fully observable
environment, and they often focus on finding a sequence of
actions to achieve a specified goal. Here are some other classical
planning approaches:
1. State-Space Planning
State-space planning involves searching through the state space
of the problem, where each state represents a possible
configuration of the world.
Forward Chaining (Progression Planning):
o Starts from the initial state and applies actions to
move forward until the goal state is reached.
o Suitable for problems where it is easier to specify
how actions affect the world.
Backward Chaining (Regression Planning):
o Starts from the goal state and works backward by
determining which actions could lead to the goal
state.
o Useful when the goal state is well-defined and the
number of backward steps is manageable.
2. Partial-Order Planning (POP)
Partial-order planning allows for more flexible plans by not
committing to a specific order of actions unless necessary.
Basic POP Algorithm:
o Constructs plans by incrementally adding actions and
constraints.
o Maintains a set of partially ordered actions and
constraints on their execution.
o Suitable for parallel execution and when actions do
not have strict ordering.
3. Planning Graph-Based Approaches
These approaches use a planning graph to represent the problem
and derive solutions from the graph structure.
GraphPlan:
o Constructs a planning graph with alternating layers
of actions and states.
o Identifies a level at which the goal is reachable and
extracts a plan by searching the graph backward.
o Efficient for problems with large state spaces due to
compact representation and constraint propagation.
4. SATPlan
SATPlan converts the planning problem into a Boolean
satisfiability problem (SAT) and uses SAT solvers to find a
solution.
Basic SATPlan Algorithm:
o Encodes the planning problem as a set of logical
constraints.
o Uses a SAT solver to determine if there is a
satisfying assignment that represents a valid plan.
o Effective for complex problems where other search
methods may be inefficient.
5. Hierarchical Task Network (HTN) Planning
HTN planning decomposes tasks into simpler subtasks, creating
a hierarchy of tasks and actions.
Basic HTN Algorithm:
o Defines high-level tasks and decomposes them into
lower-level tasks or primitive actions.
o Continues decomposition until all tasks are primitive
actions that can be directly executed.
o Utilizes domain knowledge and task hierarchies to
simplify complex planning problems.
6. STRIPS (Stanford Research Institute Problem Solver)
STRIPS is a formal language and framework for defining
classical planning problems and specifying actions.
Basic STRIPS Representation:
o States are represented as sets of propositions.
o Actions are defined by preconditions (what must be
true before the action can be taken) and effects (how
the action changes the state).
o Plans are sequences of actions that transform the
initial state into the goal state.
STRIPS Planner:
o Uses forward or backward search to find a sequence
of actions that achieve the goal state.
o Employs heuristics to guide the search process and
improve efficiency.
7. Situation Calculus
Situation calculus is a formal language used for representing and
reasoning about dynamically changing worlds.
Basic Situation Calculus Framework:
o Represents states as situations and actions as
functions that transform one situation into another.
o Uses logical formulas to specify the preconditions
and effects of actions.
o Suitable for reasoning about complex temporal and
causal relationships in planning problems.
8. Planning as Theorem Proving
This approach treats planning as a problem of proving theorems
in a logical formalism.
Automated Theorem Proving:
o Represents the planning problem as a set of logical
axioms and the goal as a theorem to be proved.
o Uses logical inference techniques to derive a
sequence of actions that achieve the goal.
o Effective for problems that can be naturally
expressed in a formal logical framework.
9. Macro-Operators
Macro-operators (or macros) are sequences of actions that are
treated as a single action to simplify the planning process.
Macro-Operator Learning:
o Identifies frequently occurring sequences of actions
in previously solved problems.
o Creates macro-operators to represent these
sequences, reducing the search space in future
problems.
o Useful for speeding up the planning process by
abstracting common sub-plans.
10. Abstraction-Based Planning
This approach simplifies planning by creating abstract
representations of the problem and solving them at different
levels of abstraction.
Hierarchical Abstraction:
o Creates multiple levels of abstraction, each
representing the problem at a different level of detail.
o Solves the problem at higher levels of abstraction
and refines the solution at lower levels.
o Effective for large and complex planning problems
where detailed search is computationally expensive.
Each of these classical planning approaches has its own
strengths and is suited to different types of planning problems,
depending on factors like problem complexity, domain
knowledge, and computational resources.
PLANNING AND ACTING IN REAL WORLD:
• Time, schedules, resources
• Hierarchical planning
• Planning and acting in Non-Deterministic Domains
-Generalities
-Sensorless Planning(aka Conformant Planning)
-Conditional Planning(aka Contingent Planning)
• Multi-agent planning