You are on page 1of 29

‫النظم الخبيرة‬

(Expert Systems)

Obour Institute
‫خوارزميات البحث‬
‫خوارزميات البحث‬

‫‪Hill Climbing‬‬
‫خوارزميات البحث‬
‫البحث بالعمق أولا‬ ‫خوارزميات‬
‫البحث بالعرض أولا‬ ‫البحث الغير‬
‫منظم‬

‫البحث بالتكلفة الموحدة‬


‫البحث الجشع أو الطماع‬ ‫خوارزميات‬
‫بحث تسلق التالل‬ ‫البحث‬
‫المنظم‬

‫بحث ال *‪A‬‬
‫ العمق أولا‬- ‫خوارزميات البحث الغيرالمنتظم‬

Artificial Intelligence - Prof. Moheb Ramzy Girgis Dept. of


5
Computer Science - Faculty of Science Minia University
‫ العمق أولا‬- ‫خوارزميات البحث الغير المنتظم‬
➢Apply the Depth First Search algorithm
(DFS) on the following graph, where the Iteration # X open closed
start state is A and the desired Goal state 0 - [A] []
is G. show the successive values of Open, 1 A [BCD] [A]
Closed and the Traversed Path 2 B [EFCD] [BA]
1
3 E [HIFCD] [EBA]
A 4 H [IFCD] [HEBA]
5 I [FCD] [IHEBA]
2
B 8 C 10 D 6 F [JCD] [FIHEBA]
3
E F G
7 J [CD] [JFIHEBA]
6
9 8 C [GD] [CJFIHEBA]
4 H I J
5 7 9 G G is the goal

Artificial Intelligence - Prof. Moheb Ramzy Girgis Dept. of


6
Computer Science - Faculty of Science Minia University
‫خوارزميات البحث الغير المنتظم ‪ -‬العرض أولا‬
‫ العرض أولا‬- ‫خوارزميات البحث المنتظم‬

Artificial Intelligence - Prof. Moheb Ramzy Girgis Dept. of


8
Computer Science - Faculty of Science Minia University
‫ العرض أولا‬- ‫خوارزميات البحث الغير المنتظم‬

Artificial Intelligence - Prof. Moheb Ramzy Girgis Dept. of


9
Computer Science - Faculty of Science Minia University
‫ العرض أولا‬- ‫خوارزميات البحث الغير المنتظم‬

Artificial Intelligence - Prof. Moheb Ramzy Girgis Dept. of


10
Computer Science - Faculty of Science Minia University
‫ العمق أولا‬- ‫خوارزميات البحث الغير المنتظم‬
➢Apply the Breadth First Search algorithm
(BFS) on the following graph, where the
Iteration X open closed
start state is A and the desired Goal state
#
is G. show the successive values of Open,
0 - [A] []
Closed and the Traversed Path
1 A [BCD] [A]
1
A 2 B [CDEF] [BA]
3 C [DEFG] [CBA]
2
B 3 C 4 D 4 D [EFG] [DCBA]
5
E F G
5 E [FGHI] [EDCBA]
6

8
7 6 F [GHIJ] [FEDCBA]
H I J
9 10 7 G G is the goal
Artificial Intelligence - Prof. Moheb Ramzy Girgis Dept. of
11
Computer Science - Faculty of Science Minia University
‫خوارزميات البحث الغير منتظم – البحث بالتكلفة الموحدة‬

Artificial Intelligence - Prof. Moheb Ramzy Girgis Dept. of


12
Computer Science - Faculty of Science Minia University
‫خوارزميات البحث الغير منتظم – البحث بالتكلفة الموحدة‬

Artificial Intelligence - Prof. Moheb Ramzy Girgis Dept. of


13
Computer Science - Faculty of Science Minia University
‫خوارزميات البحث الغير منتظم – البحث بالتكلفة الموحدة‬

Artificial Intelligence - Prof. Moheb Ramzy Girgis Dept. of


14
Computer Science - Faculty of Science Minia University
‫خوارزميات البحث الغير منتظم – البحث بالتكلفة الموحدة‬

Artificial Intelligence - Prof. Moheb Ramzy Girgis Dept. of


15
Computer Science - Faculty of Science Minia University
‫خوارزميات البحث الغير منتظم – البحث بالتكلفة الموحدة‬

Artificial Intelligence - Prof. Moheb Ramzy Girgis Dept. of


16
Computer Science - Faculty of Science Minia University
‫خوارزميات البحث الغير منتظم – البحث بالتكلفة الموحدة‬

Artificial Intelligence - Prof. Moheb Ramzy Girgis Dept. of


17
Computer Science - Faculty of Science Minia University
‫خوارزميات البحث الغير منتظم – البحث بالتكلفة الموحدة‬

Artificial Intelligence - Prof. Moheb Ramzy Girgis Dept. of


18
Computer Science - Faculty of Science Minia University
‫خوارزميات البحث المنتظم أو التجريبى – خوارزمية *‪A‬‬
‫فى هذا المثال نريد الوصول من النقطة ‪ S‬إلى النقطة ‪ G‬األرقام‬
‫الموجودة على الوصالت هى تكلفة الوصول بين طرفى الوصلة‬

‫‪Artificial Intelligence - Prof. Moheb Ramzy Girgis Dept. of‬‬


‫‪19‬‬
‫‪Computer Science - Faculty of Science Minia University‬‬
‫خوارزميات البحث المنتظم أو التجريبى – خوارزمية *‪A‬‬

‫)‪ H(n‬هى القيم التجريبية أو التقديرية وهى تكون معطى فى المسألة وهى تمثل بعد النقاط‬
‫عن الهدف و يتم حسابها باإلعتماد على خط النظر المباشر بين النقطة الحالية والهدف‬
‫وحساب طول هذا الخط‬
‫‪Artificial Intelligence - Prof. Moheb Ramzy Girgis Dept. of‬‬
‫‪20‬‬
‫‪Computer Science - Faculty of Science Minia University‬‬
‫خوارزميات البحث المنتظم أو التجريبى – خوارزمية *‪A‬‬

‫من المعادلةالموضحة أعاله نجد أن هذه الخوارزمية تعتمد على عاملين أساسيين‬
‫وهما )‪ G(n‬و )‪H(n‬‬
‫‪Artificial Intelligence - Prof. Moheb Ramzy Girgis Dept. of‬‬
‫‪21‬‬
‫‪Computer Science - Faculty of Science Minia University‬‬
A* ‫خوارزميات البحث المنتظم أو التجريبى – خوارزمية‬

Artificial Intelligence - Prof. Moheb Ramzy Girgis Dept. of


22
Computer Science - Faculty of Science Minia University
A* ‫خوارزميات البحث المنتظم أو التجريبى – خوارزمية‬

Artificial Intelligence - Prof. Moheb Ramzy Girgis Dept. of


23
Computer Science - Faculty of Science Minia University
A* ‫خوارزميات البحث المنتظم أو التجريبى – خوارزمية‬

Artificial Intelligence - Prof. Moheb Ramzy Girgis Dept. of


24
Computer Science - Faculty of Science Minia University
A* ‫خوارزميات البحث المنتظم أو التجريبى – خوارزمية‬

Artificial Intelligence - Prof. Moheb Ramzy Girgis Dept. of


25
Computer Science - Faculty of Science Minia University
A* ‫خوارزميات البحث المنتظم أو التجريبى – خوارزمية‬

Artificial Intelligence - Prof. Moheb Ramzy Girgis Dept. of


26
Computer Science - Faculty of Science Minia University
A* ‫خوارزميات البحث المنتظم أو التجريبى – خوارزمية‬

Artificial Intelligence - Prof. Moheb Ramzy Girgis Dept. of


27
Computer Science - Faculty of Science Minia University
A* ‫خوارزميات البحث المنتظم أو التجريبى – خوارزمية‬

Artificial Intelligence - Prof. Moheb Ramzy Girgis Dept. of


28
Computer Science - Faculty of Science Minia University
THANK YOU
For any questions feel free
to contact me by mail
gh_mcs86@yahoo.com

You might also like