Artificial Intelligence

1 / 11

# Artificial Intelligence - PowerPoint PPT Presentation

Artificial Intelligence. إعداد الطالبين : غانم نعمان غانم عبدالله ماجد معظم أنور. إشراف الدكتور : عبدالعزيز الذبحاني. السنة الدراسية 2006 - 2005. Best-First Search Expands the Best Partial Path Recall that when forward motion is blocked , Hill Climbing demands forward

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

## PowerPoint Slideshow about 'Artificial Intelligence' - denver

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

Artificial Intelligence

إعداد الطالبين :

غانم نعمان غانم عبدالله

ماجد معظم أنور

إشراف الدكتور :

عبدالعزيز الذبحاني

السنة الدراسية

2006 - 2005

Best-First Search Expands the Best Partial Path

Recall that when forward motion is blocked , Hill Climbing demands forward

motion from the most recently created open node . In the best-first search , forward motion is from the best open node so far , no matter where that node is in the partially developed tree .

The paths found by best-First search are likely to be shorter than those gound with other methods , because Best-First search always moves forward from the node that seems closest to the goal node . Note that likely to be does not mean recently are, however .

يجب علينا معرفة المسافة بين النقطة الحالية وبين النقطة التالية

S

13

12

9.7

9.5

9

10

7

9.8

4

7

كان أفضل مسار قد مر علينا

من قبل هو

1

4

2

2

5

لذلك سنعود اليه ونبدأ عملية

البحث من جديد

ان كانت هذه النقطة هي الهدف ، عند ذلك نعلن وصولنا للهدف .

أما اذا لم تكن هي الهدف، ففي هذه الحالة ستتحول هذه النقطة

الى Dead end ، ونعود الى أفضل مسار مرَ علينا من قبل .

Best-first search

In some situations, we have partial knowledge of the structure of the search space that can be applied to guide search.

We can inspect all the currently-available transitions, and rank them on the basis of our partial knowledge. Here high rank means that the transition looks promising in relation to the goal.

We'll describe the best-first algorithm in terms of a specific example involving distances by straight line and by road from a start point s to a goal point t:

e

7

2

7

S

Distance to goal

2

Distance between

these cities

5

a

5

2

b

4

4

c

f

2

2

2

3

g

2

d

3

2

3

t

0

Let us define, for any node N, g(N) to be the distance travelled from the start node s to reach N. Note that this is a known quantity by the time you reach N, but that in general it could vary depending on the route taken through state space from s to N.

In our example scenario, we don't know the distance by road from N to t, but we do know the straightline distance. Let us call this distance h(N). As our heuristic to guide best-first search, we use f(N) = g(N) + h(N). That is, we will search first from the node that we have found so far that has the lowest f(N).

Let's see how this will work in hand-simulation:

S

a

f(a)=2+5=7

e

f(e)=2+7=9

b

f(b)=4+4=8

f

f(f)=7+4=11

c

f(c)=6+4=10

g

f(g)=9+2=11

d

f(d)=9+3=12

t

f(t)=11+0=11

Beam search

First developed in the mid 1970’s in AI community

Used for speech recognition (Lowerre)

Solution time is polynomial in the size of the problem

Ignoring the remaining part of the search space

That is, unpromising nodes are rejected by beam width

Beam search is like breadth-first search in that it progresses level by level. Unlike breadth-firist search ,however , beam search moves downward only through the best w nodes at each level ; the other nodes are ignored consequently, the number of nodes explored remains manageable, even if there is a great deal of branching and the search is deep . Whenever beam search is used , there are only w nodes under consideration at any depth , rather than the exponentially explosive number of nodes with which you must cope whenever you use breadth-first search .

يجب أن نعرف

المسافات بين

النقطة الحالية والتي

تليها

في هذه الطريقة نبحث عن أفضل مسارين في كل

مرحلة ونغلق بقية المسارات الاخرى

S

10.4

8.9

A

D

6.7

8.9

10.4

6.9

B

D

A

E

6.9

4.0

3.0

6.7

C

E

B

F

end

G

A

C

هذه الطريقة مفيدة حيث انها تعطي اكثر من طريق للوصول الى الحل

وتكون مفيدة عندما يكون الهدف متواجد في بعض المواقع وليس أغلبها

نستخدم hill climbing اذا كانت المسافة مقاسة للهدف وكانت جميع السارات تعطي الهدف.

نستخدم beam search اذا المساف مقاسة للهدف والمسارات جيدة في الوصول للهدف.

نستخدم best first إذا كان المسار الجيد يشبه الخيار الاسوى الاقصر بعد عدة خطوات.

Search alternaives from procedure family