Docsity

Artifical intelligence, Study notes of Artificial Intelligence

Toggle sidebar
bg1
Planning and Learning: Planning with State Space Search
(PYQs-Oriented)
1. Introduction
In Artificial Intelligence, planning is the process of deciding a sequence of actions that transforms an
initial state into a goal state.
Planning with State Space Search treats planning as a search problem, where the AI agent searches
through different states to find a valid plan.
It is one of the classical planning approaches in AI.
2. What is State Space?
A State Space is the set of all possible states that an agent can reach from the initial state by
performing actions.
•
•
Initial State → Starting condition
•
Goal State → Desired condition
3. Planning with State Space Search (Definition)
Planning with State Space Search involves:
•
Representing the planning problem as a state space
•
Applying search algorithms to find a sequence of actions (plan) that leads to the goal
Each path in the state space corresponds to a plan.
4. Components of State Space Planning
1. Initial State
•
Starting point of the agent
2. Actions (Operators)
Each action is defined by:
•
Preconditions –conditions that must be true before action
•
Effects –changes caused by the action
3. Transition Model
•
Describes how actions move the system from one state to another
4. Goal Test
•
Checks whether the goal state has been reached
UNIT 4
19 January 2026
21:24
New Section 3 Page 1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download Artifical intelligence and more Study notes Artificial Intelligence in PDF only on Docsity!

Planning and Learning: Planning with State Space Search

(PYQs-Oriented)

1. Introduction

In Artificial Intelligence, planning is the process of deciding a sequence of actions that transforms an initial state into a goal state. Planning with State Space Search treats planning as a search problem , where the AI agent searches through different states to find a valid plan. It is one of the classical planning approaches in AI.

2. What is State Space?

A State Space is the set of all possible states that an agent can reach from the initial state by performing actions.

  • State → A configuration of the world
  • Initial State → Starting condition
  • Goal State → Desired condition

3. Planning with State Space Search (Definition)

Planning with State Space Search involves:

  • Representing the planning problem as a state space
  • Applying search algorithms to find a sequence of actions (plan) that leads to the goal Each path in the state space corresponds to a plan.

4. Components of State Space Planning

1. Initial State

  • Starting point of the agent

2. Actions (Operators)

Each action is defined by:

  • Preconditions – conditions that must be true before action
  • Effects – changes caused by the action

3. Transition Model

  • Describes how actions move the system from one state to another

4. Goal Test

  • Checks whether the goal state has been reached

UNIT 4

19 January 2026 21:

  • Checks whether the goal state has been reached

5. Path Cost

  • Cost associated with actions (optional) 5. Types of State Space Search in Planning

1. Forward (Progression) Planning

  • Search starts from initial state
  • Applies actions forward until goal is reached Simple and intuitive.

2. Backward (Regression) Planning

  • Search starts from goal state
  • Works backward to initial state Reduces irrelevant actions. 6. Example: Planning with State Space Search

Water Jug Problem

  • Initial State: (0, 0)
  • Goal State: (4, 0)
  • Actions: Fill, Empty, Pour The solution is a sequence of actions found by searching the state space. 7. Search Algorithms Used
  • Breadth First Search (BFS)
  • Depth First Search (DFS)
  • Uniform Cost Search (UCS)
  • A* Search Choice depends on problem size and cost. 8. Role of Learning in Planning
  • Learning improves heuristic functions
  • Reduces search time
  • Helps reuse previous plans
  • Makes planning more efficient over time 9. Advantages
  • Systematic approach to planning
  • Guarantees solution if exists
  • Easy to model structured problems 10. Limitations
  • State space may be very large
  • Computationally expensive
  • Not suitable for dynamic environments **Conditional Planning (AI – PYQs Oriented Answer)
  1. Introduction Conditional Planning** is an advanced AI planning technique used when the outcome of actions is uncertain or the environment is partially observable. In such cases, a single fixed plan is not sufficient, so the agent prepares different plans for different possible situations.

The plan depends on door status , which is known only at execution time.

8. Conditional Planning vs Classical Planning Feature Classical Planning Conditional Planning Environment Fully observable Partially observable Uncertainty Not handled Handled Plan type Linear Branching Flexibility Low High 9. Advantages of Conditional Planning - Works in uncertain environments - Flexible and adaptive - Closer to real-world decision making 10. Limitations of Conditional Planning - Complex plan generation - Large branching factor - High computational cost 11. Applications - Robotics - Autonomous agents - Game playing - Real-world planning under uncertainty **Continuous Planning in Artificial Intelligence (PYQs- Oriented Answer)

  1. Introduction Continuous Planning** is an AI planning approach used in dynamic and real-time environments , where planning and execution happen simultaneously. Unlike classical planning, the agent does not stop planning once execution starts ; instead, it continuously updates and revises the plan as the environment changes. Continuous planning is essential for real-world autonomous systems. 2. Definition Continuous Planning is a planning method in which an AI agent continuously monitors the environment, executes actions, and revises its plan in response to new information or unexpected changes. Planning + Execution + Monitoring happen together. 3. Need for Continuous Planning Continuous planning is required when:
    • Environment is dynamic
    • New events occur unexpectedly
    • Goals or constraints may change
    • Real-time response is required Classical or conditional planning alone is insufficient.

4. Characteristics of Continuous Planning - Planning is ongoing - Handles unexpected events - Supports real-time decision making - Interleaves planning and execution - Uses feedback from environment 5. Working of Continuous Planning (Steps)

Step 1: Initial Planning

  • Agent generates an initial plan based on current knowledge

Step 2: Plan Execution

  • Agent starts executing actions

Step 3: Monitoring

  • Continuously observes environment and outcomes

Step 4: Replanning

  • If deviation or new information appears, plan is modified or regenerated

Step 5: Continue Until Goal Achieved

  • Loop continues until goal is reached or changed 6. Example of Continuous Planning

Autonomous Robot Example

  • Goal: Reach destination
  • While moving: ○ Detects obstacle ○ Replans path instantly ○ Continues moving Planning never stops until goal is achieved. 7. Continuous Planning vs Conditional Planning Feature Conditional Planning Continuous Planning Environment Uncertain Dynamic Plan type Predefined branches Continuously updated Execution After planning Along with planning Flexibility Medium Very high 8. Applications of Continuous Planning
  • Autonomous vehicles
  • Robotics
  • Real-time navigation systems
  • Smart manufacturing
  • Game AI 9. Advantages of Continuous Planning
  • Highly adaptive
  • Agents share a common goal
  • Work together to optimize overall outcome Example: Team of robots carrying an object

4. Competitive (Adversarial) Planning

  • Agents have conflicting goals
  • Game-theoretic reasoning is used Example: Game playing, auctions **6. Working of Multi-Agent Planning (Steps)
  1. Goal Identification** (shared or individual) 2. Task Decomposition into sub-tasks 3. Plan Generation by agents 4. Coordination & Negotiation to avoid conflicts **5. Execution & Monitoring
  2. Replanning** if conflicts or changes occur 7. Example of Multi-Agent Planning

Warehouse Robots

  • Goal: Deliver items efficiently
  • Agents: Multiple robots
  • Planning: ○ Divide delivery tasks ○ Avoid collisions ○ Share paths and resources Coordination ensures efficiency and safety. 8. Challenges in Multi-Agent Planning
  • Communication overhead
  • Conflict resolution
  • Synchronization of actions
  • Scalability with many agents
  • Handling uncertainty 9. Applications of Multi-Agent Planning
  • Robotics teams
  • Traffic management systems
  • Distributed sensor networks
  • Smart grids
  • Multi-player game AI 10. Advantages
  • Parallel task execution
  • Faster problem solving
  • Robust and flexible systems
  • Suitable for large-scale problems 11. Limitations
  • Complex design
  • High communication cost
  • Difficult coordination
  • Increased computational overhead

12. Comparison: Single-Agent vs Multi-Agent Planning Aspect Single-Agent Multi-Agent Number of agents One Multiple Coordination Not required Required Complexity Low High Scalability Limited High **Forms of Learning in Artificial Intelligence (PYQs- Oriented Answer)

  1. Introduction** In Artificial Intelligence, learning is the process by which a system improves its performance over time based on experience or data. Different problems require different forms of learning , depending on the availability of data, feedback, and environment. 2. Main Forms of Learning in AI

1. Supervised Learning

Definition: Learning where the system is trained using labeled data (input–output pairs). How it works:

  • Input is given along with correct output
  • System learns a mapping function
  • Errors are corrected during training Examples:
  • Spam vs non-spam email
  • Image classification
  • Medical diagnosis Advantages:
  • High accuracy
  • Easy to evaluate Limitation:
  • Requires large labeled datasets

2. Unsupervised Learning

Definition: Learning where the system is trained using unlabeled data to find hidden patterns. How it works:

  • No predefined output
  • System groups or clusters data Examples:
  • Customer segmentation
  • Clustering
  • Market basket analysis Advantages:
  • No need for labeled data
  • Discovers hidden structures Limitation:
  • Results may be hard to interpret

3. Reinforcement Learning

Definition:

Specific → General

4. Working of Inductive Learning (Steps) 1. Collect Training Data ○ Positive and negative examples 2. Select Hypothesis Space ○ Set of possible rules/models 3. Apply Learning Algorithm ○ Find hypothesis consistent with data 4. Generalization ○ Extend learned concept to unseen examples 5. Evaluation ○ Test accuracy on new data 5. Example of Inductive Learning

Weather Prediction Example

Examples:

  • Day 1: Sunny → Play
  • Day 2: Rainy → Don’t Play Learned Rule: IF weather is sunny THEN play Rule is generalized from examples. 6. Types of Inductive Learning

1. Concept Learning

  • Learn boolean concepts
  • Example: Decision trees

2. Classification Learning

  • Assign class labels
  • Example: Email spam detection 7. Advantages of Inductive Learning
  • Learns from data automatically
  • Generalizes to new situations
  • Reduces manual rule creation 8. Limitations of Inductive Learning
  • Requires large training data
  • Overfitting may occur
  • Depends on quality of examples 9. Inductive Learning vs Deductive Learning Feature Inductive Learning Deductive Learning Direction Specific → General General → Specific Data Examples Rules Uncertainty Possible Certain 10. Applications of Inductive Learning
  • Decision trees
  • Decision trees
  • Pattern recognition
  • Data mining
  • Medical diagnosis
  • Image classification **Statistical Learning Method in Artificial Intelligence (PYQs-Oriented Answer)
  1. Introduction** The Statistical Learning Method is a learning approach in AI that uses probability theory and statistics to learn patterns from data and make predictions under uncertainty. It assumes that data is generated by an unknown probabilistic process and tries to model it. Widely used in machine learning , pattern recognition, and data mining. 2. Definition Statistical Learning is a method where an AI system learns a probabilistic model from data and uses it to predict outcomes, classify data, or estimate unknown values. 3. Basic Idea
  • Data contains noise and uncertainty
  • Use statistics to estimate patterns
  • Learn parameters that best fit the data
  • Make predictions with probability estimates Focus is on likelihood, estimation, and inference. **4. Working of Statistical Learning (Steps)
  1. Data Collection** ○ Gather training samples 2. Model Selection ○ Choose a statistical model (e.g., regression, classifier) 3. Parameter Estimation ○ Estimate parameters using data (e.g., mean, variance) 4. Learning / Training ○ Fit model to minimize error or maximize likelihood 5. Prediction & Inference ○ Predict outcomes with probability measures 5. Common Statistical Learning Techniques

1. Regression

  • Predicts continuous values
  • Example: Linear regression

2. Classification

  • Assigns class labels
  • Example: Naive Bayes classifier

3. Probabilistic Models

  • Use probability distributions
  • Example: Bayesian models 6. Example of Statistical Learning

Spam Detection

Reward Feedback from environment Policy Strategy followed by agent

4. Working of Reinforcement Learning (Steps) 1. Agent observes current state 2. Agent selects an action 3. Environment returns reward and next state 4. Agent updates policy based on reward 5. Process repeats until optimal policy is learned This is called the agent–environment interaction loop. 5. Types of Reinforcement Learning

1. Positive Reinforcement

  • Reward for correct action
  • Encourages good behavior

2. Negative Reinforcement

  • Penalty to discourage bad action 6. Common Reinforcement Learning Methods
  • Q-Learning
  • SARSA
  • Policy Gradient Methods These methods help estimate value of actions. 7. Example of Reinforcement Learning

Game Playing Example

  • Agent: Game player
  • Actions: Moves
  • Reward: Win (+1), Lose (−1) Agent learns winning strategy over time. 8. Applications of Reinforcement Learning
  • Robotics
  • Game AI (Chess, Go)
  • Autonomous vehicles
  • Recommendation systems
  • Resource management 9. Advantages of Reinforcement Learning
  • Learns optimal behavior
  • No need for labeled data
  • Suitable for dynamic environments 10. Limitations of Reinforcement Learning
  • Training can be slow
  • Requires many interactions
  • Reward design is difficult Difference between Inductive Learning, Statistical

Difference between Inductive Learning, Statistical Learning Method, and Reinforcement Learning Basis Inductive Learning Statistical Learning Method Reinforcement Learning Basic Idea Learns general rules from examples Learns probabilistic models from data Learns by trial and error using rewards Learning Type Supervised / example- based Data-driven & probability- based Interaction-based Data Requirement Labeled examples Large datasets (may be noisy) No labeled data Feedback Correct output given Probabilistic error/loss Reward or penalty Handling Uncertainty Limited Explicitly handled using probability Handled via reward estimation Model Output Rules / concepts Probabilistic predictions Policy (action strategy) Environment Interaction No No Yes Decision Making Deterministic Probabilistic Sequential & long-term Common Techniques Decision trees, concept learning Regression, Naïve Bayes Q-Learning, SARSA Learning Speed Moderate Fast with enough data Slow (needs many trials) Applications Classification, concept learning Pattern recognition, diagnosis Robotics, game playing