Presentation is loading. Please wait.

Presentation is loading. Please wait.

Artificial Intelligence (CS 370D)

Similar presentations


Presentation on theme: "Artificial Intelligence (CS 370D)"— Presentation transcript:

1 Artificial Intelligence (CS 370D)
Princess Noura bint Abdulrahman University College of Computer and Information Sciences Artificial Intelligence (CS 370D) Informed Search Algorithms ( examples) L. Maram ALShablan

2 Examples Greedy Algorithm A* Algorithm L. Maram ALShablan

3 Example 1: Implement the greedy algorithm on the following figure, then write the its solution path.
Solution path: Start ACGOAL Path cost : 8 L. Maram ALShablan

4 Example 1: Implement A* algorithm on the following figure, then write the its solution path.
Start A F(A)=2+3=5 B C F(B)=3+2=5 F(C)=6+1=7 F(C)=4+1=5 C Goal F(Goal)=6+0=6 Solution path: Start ABCGOAL L. Maram ALShablan Path cost : 6

5 Example 2: Implement the greedy algorithm on the following figure, then write the its solution path.
Solution path: A  C  D  E  G Path cost : 7 Greedy is not suitable  Not optimal L. Maram ALShablan

6 Example 2: Implement the A
Example 2: Implement the A* algorithm on the following figure, then write the its solution path. A F(A)=0+2=2 C B F(B)=2+4=6 F(C)=1+2=3 D F(D)=3+1=4 D F(D)=4+1=5 Solution path: ABDEG F E F(E)=6+1=7 F(F)=5+1=6 F E F(E)=5+1=6 F(F)=4+1=5 Path cost : 6 G F(G)=7+0=7 G F(G)=8+0=8 G F(G)=6+0=6 G F(G)=7+0=7 L. Maram ALShablan


Download ppt "Artificial Intelligence (CS 370D)"

Similar presentations


Ads by Google