Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Problem Solving Agent Artificial Intelligence

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

Problem solving agent

Artificial Intelligence
In today lecture
• Problem solving agent
• Functionality of problem solving agent
– Goal formulation
– Problem formulation
– Search and Search groups
– Solution
– Execution
• Examples of different problem and their
problem formulation
Problem solving agent
• In Artificial Intelligence, Search techniques are
universal problem-solving methods.
• Rational agents or Problem-solving agents in AI
mostly used these search strategies or algorithms
to solve a specific problem and provide the best
result.
• Problem-solving agents are the goal-based
agents and use atomic representation.
• atomic representation each state of the world is
indivisible
– If we want to move from Multan to Lahore then all
intermediate cities are considered as atomic but no
need of internal structure.
Problem solving agent

• According to computer science, a problem-


solving is a part of artificial intelligence which
encompasses a number of techniques such
as algorithms, heuristics to solve a problem.
• Therefore, a problem-solving agent is a goal-
driven agent and focuses on satisfying the
goal.
Functionality of Problem solving agent
Goal Formulation

Problem Formulation

Search

Solution

Execution
Goal formulation

• It is the first and simplest step in problem-solving.


• It organizes the steps/sequence required to
formulate one goal out of multiple goals as well as
actions to achieve that goal.
• Goal formulation is based on the current situation
and the agent’s performance measure
Problem formulation

• It is the most important step of problem-


solving which decides what actions should
be taken to achieve the formulated goal.
• What information is accessible to the agent?
• How can the agent progress from state to
state?
Problem formulation Components
• Initial state
It is the starting state or initial step of the agent towards its
goal.
• Action
It is the description of the possible actions available to the
agent.
• Transition model: It describes what each action does.
• Goal test: It determines if the given state is a goal state.
• Path cost: It assigns a numeric cost to each path that follows
the goal.
• Path cost
– Sum of the cost of operators
– It assigns a numeric cost to each path that
follows the goal.
– The problem-solving agent selects a cost
function, which reflects its performance
measure.
– Remember, an optimal solution has the lowest
path cost among all the solutions.
Search
• An agent with several immediate options of
unknown values can decide what to do by first
examining different possible sequences of
actions that leads to states of known values,
and then choosing the best one. This process
is call search

• It identifies all the best possible sequence


of actions to reach the goal state from the
current state. It takes a problem as an
input and returns solution as its output.
Search groups Algorithm

• Method which finds path from start to goal


• Method which find the best path
• Search methods in the face of opponent
• Solution: It finds the best algorithm out of
various algorithms, which may be proven as
the best optimal solution.
• Execution: It executes the best optimal
solution from the searching algorithms to
reach the goal state from the current state.
Example Problems
Basically, there are two types of problem
approaches:
•Toy Problem: It is a concise and exact
description of the problem which is used by the
researchers to compare the performance of
algorithms.
•Real-world Problem: It is real-world based
problems which require solutions. Unlike a toy
problem, it does not depend on descriptions,
but we can have a general formulation of the
problem.
8-Puzzle problem
8-Puzzle problem
Problem formulation
• States: It describes the location of each of the eight tiles
and the blank tiles.
• Initial state: We can start from any state as the initial state.
• Actions: Left, Right, Up, or Down.
• Transition model: It returns the resulting state as per the
given state and actions.
• Goal test: This checks whether the state matches the goal
state
• Path cost: Each step costs 1, so the path cost is the number
of steps in the path.
• 8-queens problem: The aim of this problem is to place
eight queens on a chessboard in an order where no queen
may attack another. A queen can attack other queens
either diagonally or in same row and column.
For this problem, there are two main kinds of formulation:
• Incremental formulation: It starts from an empty state
where the operator augments a queen at each step.
Following steps are involved in this formulation:
•States: Arrangement of any 0 to 8 queens on the chessboard.
•Initial State: An empty chessboard
•Actions: Add a queen to any empty box.
•Transition model: Returns the chessboard with the queen
added in a box.
•Goal test: Checks whether 8-queens are placed on the
chessboard without any attack.
•Path cost: There is no need for path cost because only final
states are counted.
In this formulation, there is approximately 1.8 x 1014 possible
sequence to investigate.
Complete-state formulation: It starts with all the 8-queens
on the chessboard and moves them around, saving from the
attacks.
Following steps are involved in this formulation:
•States: Arrangement of all the 8 queens one per column with
no queen attacking the other queen.
•Actions: Move the queen at the location where it is safe from
the attacks.
•This formulation is better than the incremental formulation as
it reduces the state space from 1.8 x 1014 to 2057, and it is easy
to find the solutions.

You might also like