Presentation is loading. Please wait.

Presentation is loading. Please wait.

Problem Solving What is AI way of solving problem?

Similar presentations


Presentation on theme: "Problem Solving What is AI way of solving problem?"— Presentation transcript:

1 Problem Solving What is AI way of solving problem?

2 2 Problem Solving CS 331 Dr M M Awais Example CAR BREAK DOWN

3 3 Problem Solving CS 331 Dr M M Awais Steps Analyze the problem Represent it Observe the present state Infer actions Solve to achieve the goal Development Phase Implementation Phase

4 4 Problem Solving CS 331 Dr M M Awais Analyze Identify possible states Identify possible actions Identify possible goals States, Actions, and Goals relate through rules Generate Rules that govern the problem/or are helpful in searching the goal

5 5 Problem Solving CS 331 Dr M M Awais Analyze: Car Break Down Possible States (that you can observe or measure): –Air fuel ratio –Temperature –Engine sound –Fuel Consumption

6 6 Problem Solving CS 331 Dr M M Awais Analyze: Goals Reduction in Fuel Consumption High Pickup Low Coolant Temperature High Air-Conditioning Efficiency etc…

7 7 Problem Solving CS 331 Dr M M Awais Analyze: Actions Change condenser Change carburetor Get wheel alignment Etc…

8 8 Problem Solving CS 331 Dr M M Awais Analyze: Rules If the air fuel (A/F) ratio is not correct (state observed)THEN Carburetor needs adjustment (action identified)WHICH Will achieve correct A/F ratio (Goal to be achieved)

9 9 Problem Solving CS 331 Dr M M Awais Represent Problem Convert the problem into a format that is understood by the computer system for automatic processing Numerous Techniques are available Propositional /Predicate Calculus (formal) Semantic / Conceptual Graphs (Graphical) Search Trees (Graph Theory) Rule Based/Expert Systems (Informal) Learning Methods (Statistical/Symbolic)

10 10 Problem Solving CS 331 Dr M M Awais Represent: Example IF the A/F ratio > 1.5 THEN change carburetor IF coolant temperature > 250 c THEN change condenser MATLAB, Prolog, C++, Lisp As the course progresses we will study more of these representational techniques

11 11 Problem Solving CS 331 Dr M M Awais Implementation Phase Observe: –Use sensors/stored information/user input to get the information about the present state within the problem domain. Infer: –Use above information to select appropriate actions that will lead to the goal. Achieve Goal: –Apply actions in sequence/parallel to achieve goal

12 12 Problem Solving CS 331 Dr M M Awais Problem types Deterministic, fully observable Partial Deterministic and observable –Partial knowledge of states and actions

13 13 Problem Solving CS 331 Dr M M Awais Problem types Deterministic, fully observable  single state problem –know exactly present state; –solution is a sequence of known actions.

14 14 Problem Solving CS 331 Dr M M Awais Problem types Partial knowledge of states and actions: Non-observable  sensorless or conformant problem May have no idea where one is; solution (if any) is a sequence. As if you are blind folded Nondeterministic and/or partially observable  contingency problem Percepts provide new information about current state solution is a tree or policy; often interleave search and execution. States, actions and Rules of the environment are known, but current state assessment is only possible after observation Unknown state space  exploration problem (“online”) –When states and actions of the environment are unknown.

15 15 Problem Solving CS 331 Dr M M Awais More Examples Path Finding 8 Puzzle Robot Assembly Primary FOCUS of discussion: How to Analyze a given problem?

16 16 Problem Solving CS 331 Dr M M Awais Example: Romania

17 17 Problem Solving CS 331 Dr M M Awais Example: Romania On holiday in Romania; currently in Arad –Flight leaves tomorrow from Bucharest Formulate goal –Be in Bucharest Formulate problem –States: various cities –Actions: drive between cities Find solution –Sequence of cities; e.g. Arad, Sibiu, Fagaras, Bucharest, … Identify Current State Identify Goal Analyze Solution

18 18 Problem Solving CS 331 Dr M M Awais Example: vacuum world Goal: Clean all the rooms Current State: 5 Single state, start in #5. Solution?? Possible Actions

19 19 Problem Solving CS 331 Dr M M Awais Example: vacuum world Single state, start in #5. Solution?? [Movement, clean action] [Right, Vacuum]

20 20 Problem Solving CS 331 Dr M M Awais Example: vacuum world Single state start in #5. Solution?? [Right, Vacuum] Sensorless: start in {1,2,3,4,5,6,7,8} Solution?? Contingency: start in {1,3}. Solution??

21 21 Problem Solving CS 331 Dr M M Awais Example: vacuum world States?? Initial state?? Actions?? Goal test?? Path cost??

22 22 Problem Solving CS 331 Dr M M Awais Example: vacuum world States?? two locations with or without dirt: 2 x 2 2 =8 states. Initial state?? Any state can be initial Actions?? {Left, Right, Vacuum} Goal test?? Check whether squares are clean. Cost?? Number of actions to reach goal.

23 23 Problem Solving CS 331 Dr M M Awais Example: 8-puzzle States?? Initial state?? Actions?? Goal test?? Path cost??

24 24 Problem Solving CS 331 Dr M M Awais Example: 8-puzzle States?? Integer location of each tile Initial state?? Any state can be initial Actions?? {Left, Right, Up, Down} Goal test?? Check whether goal configuration is reached Cost?? Number of actions to reach goal

25 25 Problem Solving CS 331 Dr M M Awais Example: 8-queens problem States?? Initial state?? Actions?? Goal test?? Cost??

26 26 Problem Solving CS 331 Dr M M Awais Example: 8-queens problem Incremental formulation vs. complete-state formulation States?? Initial state?? Actions?? Goal test?? Cost??

27 27 Problem Solving CS 331 Dr M M Awais Example: robot assembly States?? Initial state?? Actions?? Goal test?? Cost??

28 28 Problem Solving CS 331 Dr M M Awais Example: robot assembly States?? Real-valued coordinates of robot joint angles; parts of the object to be assembled. Initial state?? Any arm position and object configuration. Actions?? Continuous motion of robot joints Goal test?? Complete assembly (without robot) Cost?? Time to execute

29 29 Problem Solving CS 331 Dr M M Awais Summary Analyze: –States, Actions, Goals, Rules Represent: –Using any appropriate technique –Estimate the Cost factors (Time and Space Complexity) Implement: –Do actual coding/real world implementation –Validate and Test


Download ppt "Problem Solving What is AI way of solving problem?"

Similar presentations


Ads by Google