Einführung in heuristische Suchverfahren - Universität Paderborn
Einführung in heuristische Suchverfahren - Universität Paderborn
Einführung in heuristische Suchverfahren - Universität Paderborn
Erfolgreiche ePaper selbst erstellen
Machen Sie aus Ihren PDF Publikationen ein blätterbares Flipbook mit unserer einzigartigen Google optimierten e-Paper Software.
<strong>E<strong>in</strong>führung</strong> Graphensuche Un<strong>in</strong>formierte Suche Informierte Suche<br />
Algorithmus A*<br />
1 <strong>in</strong>sert(s,OPEN);<br />
2 g(s)=0;<br />
3 loop<br />
4 if (OPEN=∅) then Return(’Failure’);<br />
5 n=m<strong>in</strong>(OPEN,g + h);<br />
6 remove(n,OPEN);<br />
7 push(n,CLOSED);<br />
8 if (⋆(n)) then Return(n);<br />
9 forall the n ′ <strong>in</strong> successors(n) do<br />
10 set backpo<strong>in</strong>ter(n ′ ,n);<br />
11 g(n ′ ) = g(n) + c(n, n ′ );<br />
12 n ′ old = node eq state(n′ ,OPEN,CLOSED);<br />
=NULL) then<br />
13 if (n ′ old<br />
14 <strong>in</strong>sert(n ′ ,OPEN)<br />
15 else<br />
16 if (g(n ′ ) < g(n ′ old<br />
17 <strong>in</strong>sert(n ′ ,OPEN);<br />
)) then<br />
,OPEN) then<br />
18 if member(n ′ old<br />
19 remove(n ′ old ,OPEN)<br />
20 else remove(n ′ old ,CLOSED)<br />
<strong>E<strong>in</strong>führung</strong> <strong>in</strong> <strong>heuristische</strong> <strong>Suchverfahren</strong> Markus Eberl<strong>in</strong>g 36/44