KEMBAR78
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
SRI SHAKTHI
INSTITUTE OF ENGINEERING & TECHNOLOGY
Solving Problems by Searching
• Reflex agent is simple(Cannot Operate in Well Environment, its Action
–Based on Current Situation and ignoring the History of Perception)
e.g Car Front Brakes
• base their actions on
• a direct mapping from states to actions
• but cannot work well in environments
• which this mapping would be too large to store
• and would take too long to learn
• Hence, goal-based agent is used
SRI SHAKTHI
INSTITUTE OF ENGINEERING & TECHNOLOGY
Problem-solving agent
• Problem-solving agent
• A kind of goal-based agent – Choose their actions in order to achieve Goals.
• This Allows the Agent to a way of Choosing among Multiple Possibilities,
selecting the one which reaches a Goal states.
• It Requires Searching and Planning Techniques. E.g. GPS – Finding a path to
certain Destination.
• It solves problem by
• finding sequences of actions that lead to desirable states (goals)
• To solve a problem,
• the first step is the goal formulation, based on the current situation
SRI SHAKTHI
INSTITUTE OF ENGINEERING & TECHNOLOGY
Problem Solving Agents :
• Intelligent Agent are Supposed to “ To Maximize their
Performance Measure ”
• Achievement : It can Adopt a Goal and Aim at Satisfying.
SRI SHAKTHI
INSTITUTE OF ENGINEERING & TECHNOLOGY
SRI SHAKTHI
INSTITUTE OF ENGINEERING & TECHNOLOGY
SRI SHAKTHI
INSTITUTE OF ENGINEERING & TECHNOLOGY
SRI SHAKTHI
INSTITUTE OF ENGINEERING & TECHNOLOGY
SRI SHAKTHI
INSTITUTE OF ENGINEERING & TECHNOLOGY
SRI SHAKTHI
INSTITUTE OF ENGINEERING & TECHNOLOGY
Goal formulation
• The goal is formulated
• as a set of world states, in which the goal is satisfied
• Reaching from initial state 🡪 goal state
• Actions are required
• Actions are the operators
• causing transitions between world states
• Actions should be abstract enough at a certain degree, instead of
very detailed
• E.g., turn left VS turn left 30 degree, etc.
SRI SHAKTHI
INSTITUTE OF ENGINEERING & TECHNOLOGY
Problem formulation
Well-defined problems and solutions
A problem is defined by 5 components:
• Initial state
• Actions
• Transition model or
(Successor functions)
• Goal Test.
• Path Cost.
SRI SHAKTHI
INSTITUTE OF ENGINEERING & TECHNOLOGY
SRI SHAKTHI
INSTITUTE OF ENGINEERING & TECHNOLOGY
Well-defined problems and solutions
• A problem is defined by 4 components:
• The initial state
• that the agent starts in
• The set of possible actions
• Transition model: description of what each action does.
(successor functions): refer to any state reachable from given
state by a single action
• Initial state, actions and Transition model define the state
space
• the set of all states reachable from the initial state by any
sequence of actions.
• A path in the state space:
• any sequence of states connected by a sequence of actions.
SRI SHAKTHI
INSTITUTE OF ENGINEERING & TECHNOLOGY
Well-defined problems and solutions
• The goal test
• Applied to the current state to test
• if the agent is in its goal
-Sometimes there is an explicit set of possible goal states.
(example: in Amman).
-Sometimes the goal is described by the properties
• instead of stating explicitly the set of states
• Example: Chess
• the agent wins if it can capture the KING of the opponent on next
move ( checkmate).
• no matter what the opponent does
SRI SHAKTHI
INSTITUTE OF ENGINEERING & TECHNOLOGY
Well-defined problems and solutions
• A path cost function,
• assigns a numeric cost to each path
• = performance measure
• denoted by g
• to distinguish the best path from others
• Usually the path cost is
• the sum of the step costs of the individual actions (in the action list)
SRI SHAKTHI
INSTITUTE OF ENGINEERING & TECHNOLOGY
Well-defined problems and solutions
• Together a problem is defined by
• Initial state
• Actions
• Successor function
• Goal test
• Path cost function
• The solution of a problem is then
• a path from the initial state to a state satisfying the goal test
• Optimal solution
• the solution with lowest path cost among all solutions
SRI SHAKTHI
INSTITUTE OF ENGINEERING & TECHNOLOGY
Formulating problems
• Besides the five components for problem formulation
• anything else?
• Abstraction
• the process to take out the irrelevant information
• leave the most essential parts to the description of the states
( Remove detail from representation)
• Conclusion: Only the most important parts that are
contributing to searching are used
SRI SHAKTHI
INSTITUTE OF ENGINEERING & TECHNOLOGY
Problem-Solving Agents
• agents whose task is to solve a particular problem (steps)
• goal formulation
• what is the goal state
• what are important characteristics of the goal state
• how does the agent know that it has reached the goal
• are there several possible goal states
• are they equal or are some more preferable
• problem formulation
• what are the possible states of the world relevant for solving the
problem
• what information is accessible to the agent
• how can the agent progress from state to state
SRI SHAKTHI
INSTITUTE OF ENGINEERING & TECHNOLOGY
Example: Romania
• On holiday in Romania; currently in Arad.
• Flight leaves tomorrow from Bucharest
• Formulate goal:
• be in Bucharest
• Formulate problem:
• Initial states:
• actions:
• Transition Model
• Goal Test
• Path Cost
• Search solution :
sequence of cities, e.g., Arad, Sibiu, Fagaras, Bucharest
• Execution
SRI SHAKTHI
INSTITUTE OF ENGINEERING & TECHNOLOGY
Example: Romania
SRI SHAKTHI
INSTITUTE OF ENGINEERING & TECHNOLOGY
Single-state problem formulation
• Initial State : In(Arad)
• Action : In(Arad){Go(Sibiu),Go(Timisoara),Go(Zerind)}
• Transition Model : Result(In(Arad),Go(Zerind))=In(Zerind)
• Goal Test : In(Zerind) ==In (Bucharest) Reached the Destination??
• Path Cost : Kms , Time in Hrs
• A solution is a sequence of actions leading from the initial state to a
goal state
SRI SHAKTHI
INSTITUTE OF ENGINEERING & TECHNOLOGY
Example problems
• Toy problems
• those intended to illustrate or exercise various problem-solving methods
• E.g., puzzle, chess, etc.
• Real-world problems
• tend to be more difficult and whose solutions people actually care about
• E.g., Design, planning, etc.
SRI SHAKTHI
INSTITUTE OF ENGINEERING & TECHNOLOGY
PROBLEM 2 : Toy problems
Example : Vacuum world
SRI SHAKTHI
INSTITUTE OF ENGINEERING & TECHNOLOGY
Initial State : Any State can be Designed as Initial State
Action : L,R,S (If Large Environment UP & DOWN)
Transition Model : L->R – Successor – Suck the Dirt and Clean
R->L- Suck the Dirt and Clean
Goal Test : Check whether All the all Squares are Clean
Path Cost : Each Step cost 1(no of steps in a path)
SRI SHAKTHI
INSTITUTE OF ENGINEERING & TECHNOLOGY
PROBLEM 3 :The 8-puzzle
SRI SHAKTHI
INSTITUTE OF ENGINEERING & TECHNOLOGY
PROBLEM 3 :The 8-puzzle
Initial State : Any State can be Designed as Initial State
Action : L,R,S ,UP ,DOWN)
Transition Model : U->D,D->U,L->R,R->L Successor –
Action and State Returning State
Goal Test : Check whether it reaches the Goal State
Path Cost : Each Step cost 1(no of steps in a path)
SRI SHAKTHI
INSTITUTE OF ENGINEERING & TECHNOLOGY
PROBLEM 3 :The 8-puzzle
SRI SHAKTHI
INSTITUTE OF ENGINEERING & TECHNOLOGY
PROBLEM 4 : The 8-queens
Q
Q
Q
Q
Q
Q
Q
Q
SRI SHAKTHI
INSTITUTE OF ENGINEERING & TECHNOLOGY
PROBLEM 4 : The 8-queens
SRI SHAKTHI
INSTITUTE OF ENGINEERING & TECHNOLOGY
REAL WORLD PROBLEMS
• ROUTE FINDING PROBLEMS
• TOURING PROBLEMS
• TRAVEING SALES PERSON PROBLEM
• VLSI LAYOUT
• ROBOT NAVIGATION
• AUTOMATION ASSEMBLY SEQUENCING

UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf

  • 1.
    SRI SHAKTHI INSTITUTE OFENGINEERING & TECHNOLOGY Solving Problems by Searching • Reflex agent is simple(Cannot Operate in Well Environment, its Action –Based on Current Situation and ignoring the History of Perception) e.g Car Front Brakes • base their actions on • a direct mapping from states to actions • but cannot work well in environments • which this mapping would be too large to store • and would take too long to learn • Hence, goal-based agent is used
  • 2.
    SRI SHAKTHI INSTITUTE OFENGINEERING & TECHNOLOGY Problem-solving agent • Problem-solving agent • A kind of goal-based agent – Choose their actions in order to achieve Goals. • This Allows the Agent to a way of Choosing among Multiple Possibilities, selecting the one which reaches a Goal states. • It Requires Searching and Planning Techniques. E.g. GPS – Finding a path to certain Destination. • It solves problem by • finding sequences of actions that lead to desirable states (goals) • To solve a problem, • the first step is the goal formulation, based on the current situation
  • 3.
    SRI SHAKTHI INSTITUTE OFENGINEERING & TECHNOLOGY Problem Solving Agents : • Intelligent Agent are Supposed to “ To Maximize their Performance Measure ” • Achievement : It can Adopt a Goal and Aim at Satisfying.
  • 4.
    SRI SHAKTHI INSTITUTE OFENGINEERING & TECHNOLOGY
  • 5.
    SRI SHAKTHI INSTITUTE OFENGINEERING & TECHNOLOGY
  • 6.
    SRI SHAKTHI INSTITUTE OFENGINEERING & TECHNOLOGY
  • 7.
    SRI SHAKTHI INSTITUTE OFENGINEERING & TECHNOLOGY
  • 8.
    SRI SHAKTHI INSTITUTE OFENGINEERING & TECHNOLOGY
  • 9.
    SRI SHAKTHI INSTITUTE OFENGINEERING & TECHNOLOGY Goal formulation • The goal is formulated • as a set of world states, in which the goal is satisfied • Reaching from initial state 🡪 goal state • Actions are required • Actions are the operators • causing transitions between world states • Actions should be abstract enough at a certain degree, instead of very detailed • E.g., turn left VS turn left 30 degree, etc.
  • 10.
    SRI SHAKTHI INSTITUTE OFENGINEERING & TECHNOLOGY Problem formulation Well-defined problems and solutions A problem is defined by 5 components: • Initial state • Actions • Transition model or (Successor functions) • Goal Test. • Path Cost.
  • 11.
    SRI SHAKTHI INSTITUTE OFENGINEERING & TECHNOLOGY
  • 12.
    SRI SHAKTHI INSTITUTE OFENGINEERING & TECHNOLOGY Well-defined problems and solutions • A problem is defined by 4 components: • The initial state • that the agent starts in • The set of possible actions • Transition model: description of what each action does. (successor functions): refer to any state reachable from given state by a single action • Initial state, actions and Transition model define the state space • the set of all states reachable from the initial state by any sequence of actions. • A path in the state space: • any sequence of states connected by a sequence of actions.
  • 13.
    SRI SHAKTHI INSTITUTE OFENGINEERING & TECHNOLOGY Well-defined problems and solutions • The goal test • Applied to the current state to test • if the agent is in its goal -Sometimes there is an explicit set of possible goal states. (example: in Amman). -Sometimes the goal is described by the properties • instead of stating explicitly the set of states • Example: Chess • the agent wins if it can capture the KING of the opponent on next move ( checkmate). • no matter what the opponent does
  • 14.
    SRI SHAKTHI INSTITUTE OFENGINEERING & TECHNOLOGY Well-defined problems and solutions • A path cost function, • assigns a numeric cost to each path • = performance measure • denoted by g • to distinguish the best path from others • Usually the path cost is • the sum of the step costs of the individual actions (in the action list)
  • 15.
    SRI SHAKTHI INSTITUTE OFENGINEERING & TECHNOLOGY Well-defined problems and solutions • Together a problem is defined by • Initial state • Actions • Successor function • Goal test • Path cost function • The solution of a problem is then • a path from the initial state to a state satisfying the goal test • Optimal solution • the solution with lowest path cost among all solutions
  • 16.
    SRI SHAKTHI INSTITUTE OFENGINEERING & TECHNOLOGY Formulating problems • Besides the five components for problem formulation • anything else? • Abstraction • the process to take out the irrelevant information • leave the most essential parts to the description of the states ( Remove detail from representation) • Conclusion: Only the most important parts that are contributing to searching are used
  • 17.
    SRI SHAKTHI INSTITUTE OFENGINEERING & TECHNOLOGY Problem-Solving Agents • agents whose task is to solve a particular problem (steps) • goal formulation • what is the goal state • what are important characteristics of the goal state • how does the agent know that it has reached the goal • are there several possible goal states • are they equal or are some more preferable • problem formulation • what are the possible states of the world relevant for solving the problem • what information is accessible to the agent • how can the agent progress from state to state
  • 18.
    SRI SHAKTHI INSTITUTE OFENGINEERING & TECHNOLOGY Example: Romania • On holiday in Romania; currently in Arad. • Flight leaves tomorrow from Bucharest • Formulate goal: • be in Bucharest • Formulate problem: • Initial states: • actions: • Transition Model • Goal Test • Path Cost • Search solution : sequence of cities, e.g., Arad, Sibiu, Fagaras, Bucharest • Execution
  • 19.
    SRI SHAKTHI INSTITUTE OFENGINEERING & TECHNOLOGY Example: Romania
  • 20.
    SRI SHAKTHI INSTITUTE OFENGINEERING & TECHNOLOGY Single-state problem formulation • Initial State : In(Arad) • Action : In(Arad){Go(Sibiu),Go(Timisoara),Go(Zerind)} • Transition Model : Result(In(Arad),Go(Zerind))=In(Zerind) • Goal Test : In(Zerind) ==In (Bucharest) Reached the Destination?? • Path Cost : Kms , Time in Hrs • A solution is a sequence of actions leading from the initial state to a goal state
  • 21.
    SRI SHAKTHI INSTITUTE OFENGINEERING & TECHNOLOGY Example problems • Toy problems • those intended to illustrate or exercise various problem-solving methods • E.g., puzzle, chess, etc. • Real-world problems • tend to be more difficult and whose solutions people actually care about • E.g., Design, planning, etc.
  • 22.
    SRI SHAKTHI INSTITUTE OFENGINEERING & TECHNOLOGY PROBLEM 2 : Toy problems Example : Vacuum world
  • 23.
    SRI SHAKTHI INSTITUTE OFENGINEERING & TECHNOLOGY Initial State : Any State can be Designed as Initial State Action : L,R,S (If Large Environment UP & DOWN) Transition Model : L->R – Successor – Suck the Dirt and Clean R->L- Suck the Dirt and Clean Goal Test : Check whether All the all Squares are Clean Path Cost : Each Step cost 1(no of steps in a path)
  • 24.
    SRI SHAKTHI INSTITUTE OFENGINEERING & TECHNOLOGY PROBLEM 3 :The 8-puzzle
  • 25.
    SRI SHAKTHI INSTITUTE OFENGINEERING & TECHNOLOGY PROBLEM 3 :The 8-puzzle Initial State : Any State can be Designed as Initial State Action : L,R,S ,UP ,DOWN) Transition Model : U->D,D->U,L->R,R->L Successor – Action and State Returning State Goal Test : Check whether it reaches the Goal State Path Cost : Each Step cost 1(no of steps in a path)
  • 26.
    SRI SHAKTHI INSTITUTE OFENGINEERING & TECHNOLOGY PROBLEM 3 :The 8-puzzle
  • 27.
    SRI SHAKTHI INSTITUTE OFENGINEERING & TECHNOLOGY PROBLEM 4 : The 8-queens Q Q Q Q Q Q Q Q
  • 28.
    SRI SHAKTHI INSTITUTE OFENGINEERING & TECHNOLOGY PROBLEM 4 : The 8-queens
  • 29.
    SRI SHAKTHI INSTITUTE OFENGINEERING & TECHNOLOGY REAL WORLD PROBLEMS • ROUTE FINDING PROBLEMS • TOURING PROBLEMS • TRAVEING SALES PERSON PROBLEM • VLSI LAYOUT • ROBOT NAVIGATION • AUTOMATION ASSEMBLY SEQUENCING