14
Chapter 2 Approaches/Meth odsArtificial Intelligence Instructor: Haris Shahzad Artificial Intelligen ce CS-402

Chapter 2 Approaches/Methods Artificial Intelligence Instructor: Haris Shahzad Artificial Intelligence CS-402

Embed Size (px)

DESCRIPTION

Chapter:1 Review  What is Intelligence?  What is Artificial Intelligence?  Relations of Intelligence with Artificial Intelligence  Applications of Artificial Intelligence  History of Artificial Intelligence Artificial Intelligence CS-402

Citation preview

Page 1: Chapter 2 Approaches/Methods Artificial Intelligence Instructor: Haris Shahzad Artificial Intelligence CS-402

Chapter 2Approaches/Metho

dsArtificial Intelligence

Instructor: Haris Shahzad

Artificial

Intelligence

CS-402

Page 2: Chapter 2 Approaches/Methods Artificial Intelligence Instructor: Haris Shahzad Artificial Intelligence CS-402

Today Discussion: Classical Approach Generate and Test Problem Representation

Artificial

Intelligence

CS-402

Page 3: Chapter 2 Approaches/Methods Artificial Intelligence Instructor: Haris Shahzad Artificial Intelligence CS-402

Chapter:1 Review What is Intelligence? What is Artificial Intelligence? Relations of Intelligence with

Artificial Intelligence Applications of Artificial

Intelligence History of Artificial Intelligence

Artificial

Intelligence

CS-402

Page 4: Chapter 2 Approaches/Methods Artificial Intelligence Instructor: Haris Shahzad Artificial Intelligence CS-402

Classical Approach

Use: Hit & Trial method

Works Well: works well for trivial or minor problems & classical approach

Page 5: Chapter 2 Approaches/Methods Artificial Intelligence Instructor: Haris Shahzad Artificial Intelligence CS-402

Consider the maze searching problem

Classical Approach Example & Considerations:1

Page 6: Chapter 2 Approaches/Methods Artificial Intelligence Instructor: Haris Shahzad Artificial Intelligence CS-402

Consider that a toddler is to switch on the light in a dark room

Classical Approach Example & Considerations:2

Page 7: Chapter 2 Approaches/Methods Artificial Intelligence Instructor: Haris Shahzad Artificial Intelligence CS-402

Consider another situation when we have to open a combinational lock of a briefcase

Classical Approach Example & Considerations:3

Page 8: Chapter 2 Approaches/Methods Artificial Intelligence Instructor: Haris Shahzad Artificial Intelligence CS-402

Generate and Test

This is a technical name given to the classical way of solving problems where we generate different combinations to solve our problem, and the one which solves the problem is taken as the correct solution. The rest of the combinations that we try are considered as incorrect solutions and hence are destroyed.

Page 9: Chapter 2 Approaches/Methods Artificial Intelligence Instructor: Haris Shahzad Artificial Intelligence CS-402

Generate and TestDiagram & Example

Page 10: Chapter 2 Approaches/Methods Artificial Intelligence Instructor: Haris Shahzad Artificial Intelligence CS-402

The diagram in previous slide shows a simple arrangement of a Generate and Test procedure. The box on the left labeled “Solution Generator” generates different solutions to a problem at hand, e.g. in the case of maze searching problem, the solution generator can be thought of as a machine that generates different paths inside a maze. The “Tester” actually checks that either a possible solution from the solution generates solves out problem or not. Again in case of maze searching the tester can be thought of as a device that checks that a path is a valid path for the mouse to reach the cheese. In case the tester verifies the solution to be a valid path, the solution is taken to be the “Correct Solution”. On the other hand if the solution was incorrect, it is discarded as being an “Incorrect Solution”.

Diagram Explanation

Page 11: Chapter 2 Approaches/Methods Artificial Intelligence Instructor: Haris Shahzad Artificial Intelligence CS-402

Problem Representation

All the problems that we have seen till now were trivial in nature. When the magnitude of the problem increases and more parameters are added, e.g. the problem of developing a time table, then we have to come up with procedures better than simple Generate and Test approach.Before even thinking of developing techniques to systematically solve the problem, we need to know one more thing that is true about problem solving namely problem representation. The key to problem solving is actually good representation of a problem. Natural representation of problems is usually done using graphics and diagrams to develop a clear picture of the problem in your mind. As an example to our comment consider the diagram below.

Page 12: Chapter 2 Approaches/Methods Artificial Intelligence Instructor: Haris Shahzad Artificial Intelligence CS-402

Problem Representation Diagram & Example

Page 13: Chapter 2 Approaches/Methods Artificial Intelligence Instructor: Haris Shahzad Artificial Intelligence CS-402

It shows the problem of switching on the light by a toddler in a graphical form. Each rectangle represents the state of the switch board. OFF | OFF| OFF means that all the three switches are OFF. Similarly OFF| ON | OFF means that the first and the last switch is OFF and the middle one is ON. Starting from the state when all the switches are OFF the child can proceed in any of the three ways by switching either one of the switch ON. This brings the toddler to the next level in the tree. Now from here he can explore the other options, till he gets to a state where the switch corresponding to the light is ON. Hence our problem was reduced to finding a node in the tree which ON is the place corresponding to the light switch. Observe how representing a problem in a nice manner clarifies the approach to be taken in order to solve it.

Problem Representation Diagram & Example

Page 14: Chapter 2 Approaches/Methods Artificial Intelligence Instructor: Haris Shahzad Artificial Intelligence CS-402

?