- Data Structure & Algorithm Classes (Live)
- System Design (Live)
- DevOps(Live)
- Explore More Live Courses
- Interview Preparation Course
- Data Science (Live)

## GATE CS & IT 2024

- Data Structure & Algorithm-Self Paced(C++/JAVA)
- Data Structures & Algorithms in Python
- Explore More Self-Paced Courses
- C++ Programming - Beginner to Advanced
- Java Programming - Beginner to Advanced
- C Programming - Beginner to Advanced
- Full Stack Development with React & Node JS(Live)
- Java Backend Development(Live)
- Android App Development with Kotlin(Live)
- Python Backend Development with Django(Live)
- Complete Data Science Program(Live)

## Mastering Data Analytics

Devops engineering - planning to production, cbse class 12 computer science.

- School Guide
- All Courses
- Linked List
- Binary Tree
- Binary Search Tree
- Advanced Data Structure
- All Data Structures
- Asymptotic Analysis
- Worst, Average and Best Cases
- Asymptotic Notations
- Little o and little omega notations
- Lower and Upper Bound Theory
- Analysis of Loops
- Solving Recurrences
- Amortized Analysis
- What does 'Space Complexity' mean ?
- Pseudo-polynomial Algorithms
- Polynomial Time Approximation Scheme
- A Time Complexity Question
- Searching Algorithms
- Sorting Algorithms
- Graph Algorithms
- Pattern Searching
- Geometric Algorithms
- Mathematical
- Bitwise Algorithms
- Randomized Algorithms
- Greedy Algorithms
- Dynamic Programming
- Divide and Conquer
- Backtracking
- Branch and Bound
- All Algorithms
- Company Preparation
- Practice Company Questions
- Interview Experiences
- Experienced Interviews
- Internship Interviews
- Competitive Programming
- Design Patterns
- System Design Tutorial
- Multiple Choice Quizzes
- Go Language
- Tailwind CSS
- Foundation CSS
- Materialize CSS
- Semantic UI
- Angular PrimeNG
- Angular ngx Bootstrap
- jQuery Mobile
- jQuery EasyUI
- React Bootstrap
- React Rebass
- React Desktop
- React Suite
- ReactJS Evergreen
- ReactJS Reactstrap
- BlueprintJS
- TensorFlow.js
- English Grammar
- School Programming
- Number System
- Trigonometry
- Probability
- Mensuration
- Class 8 Syllabus
- Class 9 Syllabus
- Class 10 Syllabus
- Class 11 Syllabus
- Class 12 Syllabus
- Class 8 Notes
- Class 9 Notes
- Class 10 Notes
- Class 11 Notes
- Class 12 Notes
- Class 8 Formulas
- Class 9 Formulas
- Class 10 Formulas
- Class 11 Formulas
- Class 8 Maths Solution
- Class 9 Maths Solution
- Class 10 Maths Solution
- Class 11 Maths Solution
- Class 12 Maths Solution
- Class 7 SS Syllabus
- Class 8 SS Syllabus
- Class 9 SS Syllabus
- Class 10 SS Syllabus
- Class 7 Notes
- History Class 7
- History Class 8
- History Class 9
- Geo. Class 7
- Geo. Class 8
- Geo. Class 9
- Civics Class 7
- Civics Class 8
- Business Studies (Class 11th)
- Microeconomics (Class 11th)
- Statistics for Economics (Class 11th)
- Business Studies (Class 12th)
- Accountancy (Class 12th)
- Macroeconomics (Class 12th)
- Machine Learning
- Data Science
- Mathematics
- Operating System
- Computer Networks
- Computer Organization and Architecture
- Theory of Computation
- Compiler Design
- Digital Logic
- Software Engineering
- GATE 2024 Live Course
- GATE Computer Science Notes
- Last Minute Notes
- GATE CS Solved Papers
- GATE CS Original Papers and Official Keys
- GATE CS 2023 Syllabus
- Important Topics for GATE CS
- GATE 2023 Important Dates
- Software Design Patterns
- HTML Cheat Sheet
- CSS Cheat Sheet
- Bootstrap Cheat Sheet
- JS Cheat Sheet
- jQuery Cheat Sheet
- Angular Cheat Sheet
- Facebook SDE Sheet
- Amazon SDE Sheet
- Apple SDE Sheet
- Netflix SDE Sheet
- Google SDE Sheet
- Wipro Coding Sheet
- Infosys Coding Sheet
- TCS Coding Sheet
- Cognizant Coding Sheet
- HCL Coding Sheet
- FAANG Coding Sheet
- Love Babbar Sheet
- Mass Recruiter Sheet
- Product-Based Coding Sheet
- Company-Wise Preparation Sheet
- Array Sheet
- String Sheet
- Graph Sheet
- ISRO CS Original Papers and Official Keys
- ISRO CS Solved Papers
- ISRO CS Syllabus for Scientist/Engineer Exam
- UGC NET CS Notes Paper II
- UGC NET CS Notes Paper III
- UGC NET CS Solved Papers
- Campus Ambassador Program
- School Ambassador Program
- Geek of the Month
- Campus Geek of the Month
- Placement Course
- Testimonials
- Student Chapter
- Geek on the Top
- Geography Notes
- History Notes
- Science & Tech. Notes
- Ethics Notes
- Polity Notes
- Economics Notes
- UPSC Previous Year Papers
- SSC CGL Syllabus
- General Studies
- Subjectwise Practice Papers
- Previous Year Papers
- SBI Clerk Syllabus
- General Awareness
- Quantitative Aptitude
- Reasoning Ability
- SBI Clerk Practice Papers
- SBI PO Syllabus
- SBI PO Practice Papers
- IBPS PO 2022 Syllabus
- English Notes
- Reasoning Notes
- Mock Question Papers
- IBPS Clerk Syllabus
- Apply for a Job
- Apply through Jobathon
- Hire through Jobathon
- All DSA Problems
- Problem of the Day
- GFG SDE Sheet
- Top 50 Array Problems
- Top 50 String Problems
- Top 50 Tree Problems
- Top 50 Graph Problems
- Top 50 DP Problems
- Solving For India-Hackthon
- GFG Weekly Coding Contest
- Job-A-Thon: Hiring Challenge
- BiWizard School Contest
- All Contests and Events
- Saved Videos
- What's New ?
- Data Structures
- Interview Preparation
- Topic-wise Practice
- Latest Blogs
- Write & Earn
- Web Development

## Related Articles

- Write Articles
- Pick Topics to write
- Guidelines to Write
- Get Technical Writing Internship
- Write an Interview Experience

## Problem Solving in Artificial Intelligence

- Search Algorithms in AI
- A* Search Algorithm
- Uniform-Cost Search (Dijkstra for large Graphs)
- Introduction to Hill Climbing | Artificial Intelligence
- Agents in Artificial Intelligence
- Understanding PEAS in Artificial Intelligence
- Types of Environments in AI
- Difference between Informed and Uninformed Search in AI
- Difference between BFS and DFS
- N Queen Problem | Backtracking-3
- Printing all solutions in N-Queen Problem
- Warnsdorff’s algorithm for Knight’s tour problem
- The Knight’s tour problem
- Rat in a Maze
- Count number of ways to reach destination in a Maze
- Count all possible paths from top left to bottom right of a mXn matrix
- Print all possible paths from top left to bottom right of a mXn matrix
- Unique paths in a Grid with Obstacles
- Unique paths covering every non-obstacle block exactly once in a grid
- Depth First Search or DFS for a Graph
- Breadth First Search or BFS for a Graph
- Level Order Binary Tree Traversal
- Tree Traversals (Inorder, Preorder and Postorder)
- Inorder Tree Traversal without Recursion
- Naive Bayes Classifiers
- Removing stop words with NLTK in Python
- Linear Regression (Python Implementation)
- Decision Tree
- Difficulty Level : Easy
- Last Updated : 10 Jan, 2023

There are basically three types of problem in artificial intelligence:

1. Ignorable: In which solution steps can be ignored.

2. Recoverable: In which solution steps can be undone.

3. Irrecoverable: Solution steps cannot be undo.

These are the following steps which require to solve a problem :

- Problem definition: Detailed specification of inputs and acceptable system solutions.
- Problem analysis: Analyse the problem thoroughly.
- Knowledge Representation: collect detailed information about the problem and define all possible techniques.
- Problem-solving: Selection of best techniques.

Components to formulate the associated problem:

- Initial State: This state requires an initial state for the problem which starts the AI agent towards a specified goal. In this state new methods also initialize problem domain solving by a specific class.
- Action: This stage of problem formulation works with function with a specific class taken from the initial state and all possible actions done in this stage.
- Transition: This stage of problem formulation integrates the actual action done by the previous action stage and collects the final stage to forward it to their next stage.
- Goal test: This stage determines that the specified goal achieved by the integrated transition model or not, whenever the goal achieves stop the action and forward into the next stage to determines the cost to achieve the goal.
- Path costing: This component of problem-solving numerical assigned what will be the cost to achieve the goal. It requires all hardware software and human working cost.

## Please Login to comment...

## Complete Machine Learning & Data Science Program

## Artificial Intelligence(AI)

## Problem Solving Agent

- Goal Formulation -Set of one or more (desirable) world states.(eg.Checkmate in Chess)
- Problem Formulation - What actions and states to consider given a goal and an initial state
- Search for solution - Given the problem, search for a solution-- a sequence of actions to achieve the goal starting from initial state
- Execution of the solution

## Artificial Intelligence Series: Problem Solving Agents

## Artificial Intelligence Series: Structure of agents

## Problem Solving Agents

“ An agent with several immediate options of unknown value can decide what to do by first examining the future actions that eventually lead to states of known value ”

Formulate — Search — Execute

Thus the agent has a formulate, search and execute design to it.

## Problems and Solutions

The problem can be defined formally in five components:

## Initial State

## An Example Problem Formulation

The problem for vacuum world can be formulated as follows:

A larger environment would have n x 2 to the power of n states.

Initial State: Any state can be assigned as the initial state in this case.

Action: In this environment there are three actions, Move Left , Move Right , Suck up the dirt.

Goal Test: Goal test checks whether all the squares are clean.

Path Cost: Each step costs 1, so the path cost is the number of steps in the path.

Artificial Intelligence: A Modern Approach , by Peter Norvig and Stuart J. Russell

## More from Geek Culture

A new tech publication by Start it up (https://medium.com/swlh).

## Get the Medium app

I am just a being, striving to find the purpose of it all. Alas there is none!

## Problem Solving

Searching is one of the classic areas of AI.

A problem is a tuple $(S, s, A, \rho, G, P)$ where

## Example: A water jug problem

A graphical view of the transition function (initial state shaded, goal states outlined bold):

## Awww Man.... Why are we studying this?

## Problem Types

State finding vs. action sequence finding.

## Offline vs. Online Problems

## Sensorless (Conformant) Problems

Note the goal states are 1 and 5. If a state 15 was reachable, it would be a goal too.

## Contingency Problems

Can also model contingency problems is with "AND-OR graphs".

In general then, a solution is a subtree in which

If the tree has only OR nodes, then the solution is just a path.

## Search Algorithms

## Types of Problem Solving Tasks

## Search Trees

## An Introduction to Problem-Solving using Search Algorithms for Beginners

This article was published as a part of the Data Science Blogathon

In computer science, problem-solving refers to artificial intelligence techniques, including various techniques such as forming efficient algorithms, heuristics, and performing root cause analysis to find desirable solutions.

The basic crux of artificial intelligence is to solve problems just like humans.

## Examples of Problems in Artificial Intelligence

- Travelling Salesman Problem
- Tower of Hanoi Problem
- Water-Jug Problem
- N-Queen Problem
- Crypt-arithmetic Problems
- Magic Squares
- Logical Puzzles and so on.

## Table of Contents

## Types of search algorithms

In general, searching is referred to as finding information one needs.

The process of problem-solving using searching consists of the following steps.

- Define the problem
- Analyze the problem
- Identification of possible solutions
- Choosing the optimal solution
- Implementation

Let’s discuss some of the essential properties of search algorithms.

## Properties of search algorithms

## Time complexity

## Space complexity

It is the maximum storage or memory taken by the algorithm at any time while searching.

Now let’s see the types of the search algorithm.

Based on the search problems, we can classify the search algorithm as

The uninformed search strategies are of six types.

- Breadth-first search
- Depth-first search
- Depth-limited search
- Iterative deepening depth-first search
- Bidirectional search
- Uniform cost search

Let’s discuss these six strategies one by one.

## 1. Breadth-first search

BFS is used where the given problem is very small and space complexity is not considered.

Now, consider the following tree.

Here, let’s take node A as the start state and node F as the goal state.

A —-> B —-> C —-> D —-> E —-> F

Let’s implement the same in python programming.

- BFS will never be trapped in any unwanted nodes.
- If the graph has more than one solution, then BFS will return the optimal solution which provides the shortest path.

- BFS stores all the nodes in the current level and then go to the next level. It requires a lot of memory to store the nodes.
- BFS takes more time to reach the goal state which is far away.

## 2. Depth-first search

Root node —-> Left node —-> Right node

Now, consider the same example tree mentioned above.

A —-> B —-> D —-> E —-> C —-> F

The output path is as follows.

- It takes lesser memory as compared to BFS.
- The time complexity is lesser when compared to BFS.
- DFS does not require much more search.

- DFS does not always guarantee to give a solution.
- As DFS goes deep down, it may get trapped in an infinite loop.

## 3. Depth-limited search

DLS ends its traversal if any of the following conditions exits.

It denotes that the given problem does not have any solutions.

It indicates that there is no solution for the problem within the given limit.

Now, consider the same example.

Let’s take A as the start node and C as the goal state and limit as 1.

If we give the goal node as F and limit as 2, the path will be A, C, F.

When we give C as goal node and 1 as limit the path will be as follows.

- DLS may not offer an optimal solution if the problem has more than one solution.
- DLS also encounters incompleteness.

## 4. Iterative deepening depth-first search

Let me try to explain this with the same example tree.

Consider, A as the start node and E as the goal node. Let the maximum depth be 2.

The path generated is as follows.

## 5. Bidirectional search

Let’s implement the same in Python.

The path is generated as follows.

Advantages of bidirectional search

Disadvantages of bidirectional search

## 6. Uniform cost search

Consider the below graph where each node has a pre-defined cost.

Here, S is the start node and G is the goal node.

From S, G can be reached in the following ways.

Here, the path with the least cost is S, B, E, F, G.

Let’s implement UCS in Python.

The optimal output path is generated.

Now, let me compare the six different uninformed search strategies based on the time complexity.

This is all about uninformed search algorithms.

Let’s take a look at informed search algorithms.

Here, the goal state can be achieved by using the heuristic function.

Let’s discuss some of the informed search strategies.

## 1. Greedy best-first search algorithm

Consider the below graph with the heuristic values.

Here, A is the start node and H is the goal node.

The output path with the lowest cost is generated.

The time complexity of Greedy best-first search is O(b m ) in worst cases.

Advantages of Greedy best-first search

Disadvantages of Greedy best-first search

- In the worst-case scenario, the greedy best-first search algorithm may behave like an unguided DFS.
- There are some possibilities for greedy best-first to get trapped in an infinite loop.
- The algorithm is not an optimal one.

Next, let’s discuss the other informed search algorithm called the A* search algorithm.

## 2. A* search algorithm

Consider the following graph with the heuristics values as follows.

Let A be the start node and H be the goal node.

First, the algorithm will start with A. From A, it can go to B, C, H.

Note the point that A* search uses the sum of path cost and heuristics value to determine the path.

Here, from A to B, the sum of cost and heuristics is 1 + 3 = 4.

Here, the lowest cost is 4 and the path A to B is chosen. The other paths will be on hold.

Now, from B, it can go to D or E.

From A to B to D, the cost is 1 + 4 + 2 = 7.

From A to B to E, it is 1 + 6 + 6 = 13.

The lowest cost is 7. Path A to B to D is chosen and compared with other paths which are on hold.

Here, path A to C is of less cost. That is 6.

Hence, A to C is chosen and other paths are kept on hold.

From C, it can now go to F or G.

From A to C to F, the cost is 2 + 3 + 3 = 8.

From A to C to G, the cost is 2 + 2 + 1 = 5.

From G, it can go to H whose cost is 2 + 2 + 2 + 0 = 6.

Here, 6 is lesser than other paths cost which is on hold.

Also, H is our goal state. The algorithm will terminate here.

The time complexity of the A* search is O(b^d) where b is the branching factor.

Advantages of A* search algorithm

- This algorithm is best when compared with other algorithms.
- This algorithm can be used to solve very complex problems also it is an optimal one.

Disadvantages of A* search algorithm

- The A* search is based on heuristics and cost. It may not produce the shortest path.
- The usage of memory is more as it keeps all the nodes in the memory.

Now, let’s compare uninformed and informed search strategies.

## About the Author

Data Science and AI enthusiast

## Our Top Authors

## Download Analytics Vidhya App for the Latest blog/Article

Leave a reply your email address will not be published. required fields are marked *.

Notify me of follow-up comments by email.

Notify me of new posts by email.

## Top Resources

How to Read and Write With CSV Files in Python:..

Understand Random Forest Algorithms With Examples (Updated 2023)

Understanding & Interpreting Confusion Matrices for Machine Learning (Updated 2023)

An Introduction to Large Language Models (LLMs)

## Welcome to India's Largest Data Science Community

A verification link has been sent to your email id

If you have not recieved the link please goto Sign Up page again

## back Please enter the OTP that is sent to your registered email id

Back please enter the otp that is sent to your email id, back please enter your registered email id.

This email id is not registered with us. Please enter your registered email id.

## back Please enter the OTP that is sent your registered email id

Please create the new password here, privacy overview.

We've updated our privacy policy. Click here to review the details. Tap here to review the details.

Activate your 30 day free trial to unlock unlimited reading.

## Problem solving agents

## You are reading a preview.

Activate your 30 day free trial to continue reading.

## Check these out next

## Recommended

## More Related Content

## Similar to Problem solving agents (20)

## More from Megha Sharma (20)

## Recently uploaded (20)

- 1. problem solving agents 9
- 2. Problem Solving An import application of Artificial Intelligence is Problem Solving. Define problem statement first. Generating the solution by keeping the different condition in mind. Searching is the most commonly used technique of problem solving in artificial intelligence.
- 3. Problem Solving Agents: A problem-solving agent is a goal-driven agent and focuses on satisfying the goal. Goal formulation, based on the current situation and the agent’s performance measure. It organizes steps required to achieve that goal. Goal Formulation Problem Formulation Problem formulation is the process of deciding what actions should be taken to achieve the formulated goal. Components involved in Problem Formulation Initial State Actions Transition model Goal test Path cost Steps performed by Problem-solving agent
- 4. Well Defined Problems And Solutions A problem can be defined formally by five components: The initial state that the agent starts in. A description of the possible actions available to the agent. A description of what each action does; the formal name for this is the transition model. The goal test, which determines whether a given state is a goal state. Sometimes there is an explicit set of possible goal states, and the test simply checks whether the given state is one of them. A path cost function that assigns a numeric cost to each path. The problem-solving agent chooses a cost function that reflects its own performance measure. State Space
- 5. 8 Puzzle Problem States: A state description specifies the location of each of the eight tiles and the blank in one of the nine squares. Initial state: Any state can be designated as the initial state. Actions: The simplest formulation defines the actions as movements of the blank space Left, Right, Up, or Down. Different subsets of these are possible depending on where the blank is. Goal State Initial State
- 6. Example: 8 Puzzle Problem Transition model: Given a state and action, this returns the resulting state. Goal test: This check whether the state matches the goal configuration. (Other goal configurations are possible.) Path cost: Each step costs 1, so the path cost is the number of steps in the path. Goal State Initial State
- 7. 8-Queens Problem The goal of the 8-queens problem is to place eight queens on a chess-board such that no queen attacks any other. • States: Any arrangement of 0 to 8 queens on the board is a state. • Initial state: No queens on the board. • Actions: Add a queen to any empty square. • Transition model: Returns the board with a queen added to the specified square. • Goal test: 8 queens are on the board, none attacked.
- 8. Thanks For Watching Reference: Artificial Intelligence A Modern Approach Third Edition Peter Norvig and Stuart J. Russell Next Topic: Uninformed Search. Subscribe Like Share
- 9. OMega TechEd About the Channel This channel helps you to prepare for BSc IT and BSc computer science subjects. In this channel we will learn Business Intelligence ,Artificial Intelligence, Digital Electronics, Internet OF Things Python programming , Data-Structure etc. Which is useful for upcoming university exams. Gmail: [email protected] Social Media Handles: omega.teched megha_with Subscribe

## Share Clipboard

Public clipboards featuring this slide, select another clipboard.

Looks like you’ve clipped this slide to already.

You just clipped your first slide!

## Create a clipboard

## You have now unlocked unlimited access to 20M+ documents!

Learn faster and smarter from top experts

Download to take your learnings offline and on the go

Instant access to millions of ebooks, audiobooks, magazines, podcasts and more.

Read and listen offline with any device.

Free access to premium services like Tuneln, Mubi and more.

## Help us keep SlideShare free

## We've updated our privacy policy.

You can read the details below. By accepting, you agree to the updated privacy policy.

## Problem Solving Agents in Artificial Intelligence

## Problem Solving Agents

The problem solving agent follows this four phase problem solving process:

- Goal Formulation: This is the first and most basic phase in problem solving. It arranges specific steps to establish a target/goal that demands some activity to reach it. AI agents are now used to formulate goals.
- Problem Formulation: It is one of the fundamental steps in problem-solving that determines what action should be taken to reach the goal.
- Search: After the Goal and Problem Formulation, the agent simulates sequences of actions and has to look for a sequence of actions that reaches the goal. This process is called search, and the sequence is called a solution . The agent might have to simulate multiple sequences that do not reach the goal, but eventually, it will find a solution, or it will find that no solution is possible. A search algorithm takes a problem as input and outputs a sequence of actions.
- Execution: After the search phase, the agent can now execute the actions that are recommended by the search algorithm, one at a time. This final stage is known as the execution phase.

## Problems and Solution

A formal definition of a problem consists of five components:

## Initial State

## Example Problems

- Standardized/ Toy Problem: Its purpose is to demonstrate or practice various problem solving techniques. It can be described concisely and precisely, making it appropriate as a benchmark for academics to compare the performance of algorithms.
- Real-world Problems: It is real-world problems that need solutions. It does not rely on descriptions, unlike a toy problem, yet we can have a basic description of the issue.

## Some Standardized/Toy Problems

The vacuum world’s problem can be stated as follows:

Initial State: Any state can be specified as the starting point.

Goal States: The states in which every cell is clean.

Action Cost: Each action costs 1.

## 8 Puzzle Problem

STATES : A state description specifies the location of each of the tiles.

ACTION COST : Each action costs 1.

## You Might Like:

## Types of Environments in Artificial Intelligence

## Share Article:

Digital image processing: all you need to know.

## IMAGES

## VIDEO

## COMMENTS

The problem-solving agent performs precisely by defining problems and several solutions. So we can say that problem solving is a part of

Problem Solving Agent ... Example: Vacuum world, The effect of a suck action is random. There is no action sequence that can be calculated at planning time and is

Let us take the example of vacuum world that was introduced in the starting of this series, There is a vacuum cleaner agent and it can move left

Slide 6 of 27.

An agent that tries to come up with a sequence of actions that will bring the environment into a desired state. Search: The process of looking for such a

The basic crux of artificial intelligence is to solve problems just like humans. Examples of Problems in Artificial Intelligence.

Define problem. Problem Solving Agents: A problem-solving agent is a goal-driven agent and. Well Defined Problems And Solutions A problem can be defined

Artificial Intelligence – Intelligent Agents. Problem-Solving Agents. Subclass of goal-based agents goal formulation problem formulation example problems.

Initial State. It is the agent's starting state or initial step towards its goal. For example, if a taxi agent needs to travel to a location(B)

Artificial_intelligence #problem_solving_agents Hello Friends, In this video you are going to learn about : problem solving agents.