AStar Yang Bener

Download as xlsx, pdf, or txt
Download as xlsx, pdf, or txt
You are on page 1of 41

SOURCE A DESTINATIOC

NODE PREVIOUS VALUES


A 0
B D 3
D A 1
E D 2
C E 7

VISITED A, D, B, E, C
SOURCE DESTINATIONREALPATH JARAK
A B AB 6
A D AD 1
D B ADB 3
D E ADE 2
B C ABC 11
B E ABE 8
E C ADEC 7
g() = jarak ke titik awal g() h()

h() = jarak ke titik akhir f() akar a2+b2

f()= akumulasi dari g() dan h(), (f() = g() + h())

A B C D E F G H I

2.8 1.0 2.2 2.0 2.0 3.0


C 3.8 4.2 5.0

1.4
2.2 1.4 1.4 2.2 1.0 3.2

D - 3.7 3.7 4.2

2.0 2.2 1.0 2.8 1.0

E - 4.2 3.8

1.4 3.6 1.0 4.2 1.4

F - - 5.0 5.2

G -

I
J
J K L
-

4.1

5.5

4.5

5.5

5.0

6.4
14.0 10.0 14.0 g() h()

g() jarak dari titik awal 10.0 10.0 f()

h() jarak dari titik akhir heuristic 14.0 10.0 14.0

f()=g()+h()

A B C D E F G H

B 1.0 2.0 3.0 4.0

1.0 2.0 3.0 4.0

C 5.0 1.0 4.2 1.4 3.6 2.2 3.2 4.1


6.0 5.7 5.8 3.2 4.1

D 2.0 2.2 2.8 2.8 2.4 3.6 2.8 4.5

2.0 2.2 5.7 6.0 7.3

E 3.0 3.2 2.4 3.6 1.4 4.2 2.4 5.0 1.4 5.8

3.0 3.2 6.0 5.7 7.4 7.2

F 4.0 4.1 2.8 4.5 2.4 5.0 1.0 6.4

4.0 4.1 7.3 7.4 7.4

FF

G 1.4 5.8 1.0 6.4 1.4 7.1

7.2 7.4 8.5

H
A B C D E F G H A

B 1.0 2.0 3.0 4.0 B

1.0 2.0 3.0 4.0

C 5.0 1.0 4.2 1.4 3.6 2.2 4.2 3.2 4.1 C


6.0 5.7 5.8 7.4 4.1

D 2.0 3.8 2.2 2.8 2.8 3.8 3.6 2.8 4.5 D

2.0 6.1 5.7 7.4 7.3

E 3.0 4.2 3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 5.8 6.6 8.5

2.2 4.8 2.8 2.4 3.6 4.8 4.5

2.2 7.7 6.0 9.3

3.2 3.8 3.6 1.4 4.2 3.8 5.0 1.4 5.8

3.2 7.4 5.7 8.8 7.2

4.1 2.8 4.5 2.4 5.0 1.0 6.4

4.1 7.3 7.4 7.4

FF

1.4 5.8 1.0 6.4 1.4 7.1

7.2 7.4 8.5


6.8 1.4 7.2 2.2 6.2 3.2 F G H

8.2 9.5 9.4

5.8 1.0 4.8 2.0 5.8 3.0 4.8 4.0 FINISH

6.8 6.8 8.8 8.8

4.2 1.4 3.6 2.2 3.4 3.2 4.4 4.1

5.7 5.8 6.6 8.5

2.2 4.8 2.8 2.4 3.6 4.8 4.5

2.2 7.7 6.0 9.3

3.2 3.8 3.6 1.4 4.2 3.8 5.0 1.4 5.8

3.2 7.4 5.7 8.8 7.2

4.1 2.8 4.5 2.4 5.0 1.0 6.4

4.1 7.3 7.4 7.4


FF

1.4 5.8 1.0 6.4 1.4 7.1

7.2 7.4 8.5


14.0 10.0 14.0 g() h()

g() jarak dari titik awal 10.0 10.0 f()

h() jarak dari titik akhir heuristic 14.0 10.0 14.0

f()=g()+h()

5.0 1.0 4.5 2.0 4.1 3.0 4.0


6.0 6.5 7.1

5.0 1.0 4.2 1.4 3.6 2.2 3.2 3.2 3.0

6.0 5.7 5.8 6.3

4.5 2.0 3.6 2.2 2.8 2.8 2.2 3.6 2.0

6.5 5.8 5.7 5.8

4.1 3.0 3.2 3.2 2.2 3.6 1.4 4.2 1.0

7.1 6.3 5.8 5.7

4.0 4.0 3.0 4.1 2.0 4.5 1.0 5.0

8.0 7.1 6.5 6.0

1.4 5.8 1.0

7.2
4.0
8.0

4.1

7.1

4.5

6.5

5.0 1.4 5.8

6.0 7.2

1.0 6.4

7.4

6.4 1.4 7.1

7.4 8.5
14.0 10.0 14.0 g() h()

g() jarak dari titik awal 10.0 10.0 f()

h() jarak dari titik akhir heuristic 14.0 10.0 14.0

f()=g()+h()

5.0 1.0 4.5 2.0 4.1 3.0 4.0


6.0 6.5 7.1

5.0 1.0 4.2 1.4 3.6 2.2 3.2 3.2 3.0

6.0 5.7 5.8 6.3

4.5 2.0 3.6 2.2 2.8 2.8 2.2 3.6 2.0

6.5 5.8 5.7 5.8

4.1 3.0 3.2 3.2 2.2 3.6 1.4 4.2 1.0

7.1 6.3 5.8 5.7

4.0 4.0 3.0 4.1 2.0 4.5 1.0 5.0

8.0 7.1 6.5 6.0

1.4 5.8 1.0

7.2
4.0
8.0

4.1

7.1

4.5

6.5

5.0 1.4 5.8

6.0 7.2

1.0 6.4

7.4

6.4 1.4 7.1

7.4 8.5

You might also like