AStar Yang Bener
AStar Yang Bener
AStar Yang Bener
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()
A B C D E F G H I
1.4
2.2 1.4 1.4 2.2 1.0 3.2
E - 4.2 3.8
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()
f()=g()+h()
A B C D E F G H
E 3.0 3.2 2.4 3.6 1.4 4.2 2.4 5.0 1.4 5.8
FF
H
A B C D E F G H A
E 3.0 4.2 3.2 3.8 3.6 1.4 4.2 2.4 5.0 1.4 5.8 E
FF
H H
A B C D E F G H A
B 1.0 2.0 3.0 4.0 B
D 4.8 2.0 3.8 2.2 2.8 2.8 3.8 3.6 2.8 4.5 D
E 5.2 3.0 4.8 3.2 5.2 3.6 1.4 4.2 2.4 5.0 1.4 5.8 E
FF
H H
A
6.2
7.7
5.8
8.1
6.2
9.4
F
G
H
B C D E F G H A B
3.0 3.4 3.2 2.4 3.6 1.4 4.2 2.4 5.0 1.4 5.8 E
FF
B C D E F G H A B
1.0 2.0 3.0 4.0 B
4.8 2.0 3.8 2.2 4.8 2.8 3.8 3.6 2.8 4.5 D
5.2 3.0 4.8 3.2 2.4 3.6 1.4 4.2 2.4 5.0 1.4 5.8 E
FF
H
B C D E F G H A B
1.4 5.0 1.0 4.2 1.4 3.6 2.2 3.2 4.1 C 5.0
2.2 4.8 2.0 3.8 2.2 4.8 2.8 3.8 3.6 2.8 4.5 D 5.4
3.2 5.8 3.0 6.2 3.2 2.4 3.6 1.4 4.2 2.4 5.0 1.4 5.8 E 5.8
H
C D E F G H A B
1.0 4.2 1.4 3.6 2.2 3.4 3.2 3.8 4.1 C 5.0 1.0
6.0 5.7 5.8 6.6 8.0 6.0
3.0 3.2 3.8 3.6 1.4 4.2 3.8 5.0 1.4 5.8 E 3.0
FF
C D E F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