May 16, 2015Artificial Intelligence, Lecturer #131 Artificial Intelligence Lecture Md. Morshedul...

16
March 17, 2022 Artificial Intelligence, Lecturer #13 1 Artificial Intelligence Artificial Intelligence Lecture Lecture Md. Morshedul Islam Assistant Professor Department of Computer Science & Engineering Bangladesh University of Business and Technology (BUBT)

Transcript of May 16, 2015Artificial Intelligence, Lecturer #131 Artificial Intelligence Lecture Md. Morshedul...

April 18, 2023 Artificial Intelligence, Lecturer #13

1

Artificial IntelligenceArtificial IntelligenceLectureLecture

Md. Morshedul Islam Assistant Professor

Department of Computer Science & EngineeringBangladesh University of Business and Technology (BUBT)

April 18, 2023 Artificial Intelligence, Lecturer #13

2

ContentsContents

Informed Search StrategiesHeuristic InformationHill Climbing MethodsBest-First Search, etc.

April 18, 2023 Artificial Intelligence, Lecturer #13

3

Informed Search StrategiesInformed Search Strategies

Informed search algorithm have some idea of where to look for solutions.

This uses problem specific knowledge and can find solutions more efficiently than uninformed search.

These strategies often depend on the use of heuristic information (heuristic search function).

Heuristic search function h(n), is estimated cost of the cheapest path from node n to goal node.

April 18, 2023 Artificial Intelligence, Lecturer #13

4

Heuristic Information (1/2)Heuristic Information (1/2)

Information about the problem:The nature of the statesThe cost of transforming from one state to anotherThe promise of taking certain pathThe characteristics of the goals

This information can often be expressed in the form of heuristic evaluation function f(n,g), a function of the node n and/or the goal g.

April 18, 2023 Artificial Intelligence, Lecturer #13

5

Heuristic Information (2/2)Heuristic Information (2/2)

Heuristics play an important role in search strategies because of the exponential nature of most problems.

These help to reduce the number of alternatives from an exponential number to a polynomial number and thereby obtain a solution in a tolerable amount of time.

April 18, 2023 Artificial Intelligence, Lecturer #13

6

Heuristic Search: ExampleHeuristic Search: Example

Traveling salesman problem (Minimal distance tour): n-cities with path connecting the cities. A tour is any path which,

begins with some starting city, visits each of the other cities exactly once, and returns to the starting city.

A simple heuristic for choosing the next city at any point in a tour is one which picks the nearest unvisited neighbor.

This policy gives no guarantee of an optimal solutions, but its solution is often good.

Time required for this search is O(n2) [Normally exponential]

April 18, 2023 Artificial Intelligence, Lecturer #13

7

Hill Climbing Methods (1/2)Hill Climbing Methods (1/2)

Hill climbing is like depth-first searching where the most promising child is selected for expansion.

This method requires that some information be available with which to evaluate and order the most promising choices.

At each point of the search path, a successor node that appears to lead most quickly to the top of the hill (goal) is selected for expansion.

April 18, 2023 Artificial Intelligence, Lecturer #13

8

Hill Climbing Methods (2/2)Hill Climbing Methods (2/2)

When the children have been generated, alternative choices are evaluated using some type of heuristic function.

The path that appears most promising is then chosen and no further reference to the parent or other children is retained.

This process continues from node to node with previously expanded nodes being discarded.

It terminates when it reaches a ‘peak’ where no neighbor has a higher value.

April 18, 2023 Artificial Intelligence, Lecturer #13

9

Hill Climbing Methods:Hill Climbing Methods:An ExampleAn Example

21

9

1916

S

28 241821

11 22 20

23

27

25

2525

16 1923

25 25 25

April 18, 2023 Artificial Intelligence, Lecturer #13

10

Hill Climbing Methods:Hill Climbing Methods:Advantages & DisadvantagesAdvantages & Disadvantages

Advantages: Save spaces: The algorithm does not maintain a search tree, so

the current node data structure need only record the state and its objective function value.

Disadvantages: Foothill trap: it occurs when local maxima or picks are found

(Global maximum??). Ridge trap: It occurs when several adjoining nodes have higher

values than surrounding nodes. Plateau trap: It occurs when all neighboring nodes have the same

values.

April 18, 2023 Artificial Intelligence, Lecturer #13

11

Best-First Search (1/2)Best-First Search (1/2)

Uses heuristic information to select most promising paths to goal node.

Unlike hill climbing, this algorithm retains all estimates computed for previously generated nodes and makes its selection based on the best among them all.

At any point in the search process, best-first moves forward from the most promising of all the nodes generated so far.

April 18, 2023 Artificial Intelligence, Lecturer #13

12

Best-First Search (2/2)Best-First Search (2/2)AlgorithmAlgorithm

Step-1: Place the starting node s on the queue Step-2: If the queue is empty, return failure and stop. Step-3: If the first element on the queue is a goal node g,

return success and stop, Otherwise, Step-4: Remove first element from the queue, expand it and

compute the estimated goal distances for each child. Place the children on the queue and arrange all queue elements in ascending order corresponding to goal distance from the front of the queue.

Step-5: Return to step 2.

April 18, 2023 Artificial Intelligence, Lecturer #13

13

Best-First Search: An Best-First Search: An ExampleExample

g

181615

S

12

282220

10 8 2

12

8

18

12

25 2220

15 10 55 10

L1: S20, S22, S28L2: S35, S36, S38L3: S40, S45

April 18, 2023 Artificial Intelligence, Lecturer #13

14

Best-First Search:Best-First Search:Advantages and Advantages and DisadvantagesDisadvantages

Advantages: If the evaluation function is accurate, then this will

indeed be the best node. Its overcome the problem that occurs in hill climbing

search Disadvantages:

If the evaluation function will sometimes off , then this will lead the search astray.

It is not optimal

Note: Best-first search known as greedy best-first search

April 18, 2023 Artificial Intelligence, Lecturer #13

15

Recommended TextbooksRecommended Textbooks

[Negnevitsky, 2001] M. Negnevitsky “ Artificial Intelligence: A guide to Intelligent Systems”, Pearson Education Limited, England, 2002.

[Russel, 2003] S. Russell and P. Norvig Artificial Intelligence: A Modern Approach Prentice Hall, 2003, Second Edition

[Patterson, 1990] D. W. Patterson, “Introduction to Artificial Intelligence and Expert Systems”, Prentice-Hall Inc., Englewood Cliffs, N.J, USA, 1990.

[Minsky, 1974] M. Minsky “A Framework for Representing Knowledge”, MIT-AI Laboratory Memo 306, 1974.

April 18, 2023 Artificial Intelligence, Lecturer #13

16

End of PresentationEnd of Presentation

Questions or Suggestions?

Thanks to all !!!