Professional Documents
Culture Documents
Exercises: Artificial Intelligence: Simplified Memory-Bounded A
Exercises: Artificial Intelligence: Simplified Memory-Bounded A
Simplified Memory-bounded A*
Simplified Memory-bounded A*
SMA* ALGORITHM
SMA* Algorithm
• Optimizes A* to work within reduced memory
• Key Idea:
– IF memory full for extra node (C)
– Remove highest f-value leaf (A) (15)
– Remember best-forgotten child in
S 13
S 13
C 18 ¶
S 13 15
SMA* BY EXAMPLE
SMA* by Example
• Perform SMA* (memory: 3 nodes) on the
following figure.
A
4 2
3 2
S B G
5 1
C
S A B C G
heuristic 3 0 2 1 0
SMA* by Example
0
4
A 2
0
3 S 3
3
S
3
2
B
2
0
G
1
5 1
C
SMA* by Example
0
4
A 2
0
3 S 3
3
S
3
2
B
2
0
G
1
5 1
4
A C
0 4
Generate children
(One by one)
SMA* by Example
0
4
A 2
0
3 S 3
3
S
3
2
B
2
0
G
1
5 1
4
A 3
B C
0 4 2 5
Generate children
(One by one)
SMA* by Example
0
4
A 2
0 (5)
3 S 3
3
S
3
2
B
2
0
G
1
5 1
4
A 3
B 5
C C
0 4 2 5 1 6
Generate children
(One by one)
Memory full
SMA* by Example
0
4
A 2
0 (5)
3 S 3 4
S
3
3
2
B
2
0
G
1
5 1
4
A 5
C C
0 4 1 6
All children are
explored
Adjust f-values
SMA* by Example
0
4
A 2
0 (5)
3 S 4
3
S
3
2
B
2
0
G
1
5 1
4
A 5
C C
0 4 1 6
Generate children
(One by one)
6
0 G 6
Memory full
SMA* by Example
0
4
A 2
0 (5)
3 S 4
S
3
3
2
B
2
0
G
1
5 1
4
A C
0 4 6
All children are
6 explored
0 G 6
Adjust f-values
SMA* by Example
0
4
A 2
0 (5)
3 S 4 5
3
S
3
2
B
2
0
G
1
5 1
4
A C
0 6
All children are
6 explored (update)
0 G 6
Adjust f-values
SMA* by Example
0
4
A 2
0
3 S 5
3
S
3
2
B
2
0
G
1
5 1
4
A (6) 3
B C
0 6 2 5
Generate children
(One by one)
6
0 G 6
Memory full
SMA* by Example
0
4
A 2
0 (6)
3 S 5
3
S
3
2
B
2
0
G
1
5 1
4
A (6) 3
B 5
C C
0 6 2 5 1 6
Generate children
(One by one)
Memory full
SMA* by Example
0
4
A 2
0 (6)
3 S 5
3
S
3
2
B
2
0
G
1
5 1
3
B 5
C C
2 5 1 6
Generate children
(One by one)
5
0 G 5
Memory full
Simplified Memory-bounded A*
PROBLEM
Problem
• Perform SMA* (memory: 4 nodes) on the
following figure. 2 3
A C E
10 10 9 2
S G F
8 16 3 1
8 1
B D H
S A B C D E F H G
heuristic 12 5 5 5 2 2 1 1 0
Problem 5 5 2
2 3
A C E
10 10 9 2
0
12 S 12
12 S G 0 F 1
8 16 3 1
8 1
B D H
5 2 1
Problem 5 5 2
2 3
A C E
10 10 9 2
0
12 S 12
12 S G 0 F 1
8 16 3 1
8 1
B D H
10
5 A 15
5 2 1
Problem 5 5 2
2 3
A C E
10 10 9 2
0
12 S 12
12 S G 0 F 1
8 16 3 1
8 1
B D H
10 8
5 A 15 5 B 13
5 2 1
Problem 5 5 2
2 3
A C E
10 10 9 2
0
12 S 12 13
12 S G 0 F 1
8 16 3 1
8 1
B D H
10 8
5 A 15 5 B 13
5 2 1
Problem 5 5 2
2 3
A C E
10 10 9 2
0
12 S 13
12 S G 0 F 1
8 16 3 1
8 1
B D H
10 8
5 A 15 5 B 13
5 2 1
16
2 D 18
Problem 5 5 2
2 3
A C E
10 10 9 2
0
12 S 13
12 S G 0 F 1
8 16 3 1
8 1
B D H
10 8 (18)
5 A 15 5 B 13
5 2 1
16 24
2 D 18 0 G 24
Problem 5 5 2
2 3
A C E
10 10 9 2
0
12 S 13
12 S G 0 F 1
8 16 3 1
8 1
B D H
10 8 (18)
5 A 15 5 B 13 18
5 2 1
24
0 G 24
Problem 5 5 2
2 3
A C E
10 10 9 2
0
12 S 13 15
12 S G 0 F 1
8 16 3 1
8 1
B D H
10 8 (18)
5 A 15 5 B 18
5 2 1
24
0 G 24
Problem 5 5 2
2 3
A C E
10 10 9 2
0
12 S 15
12 S G 0 F 1
8 16 3 1
8 1
B D H
10 8 (18)
5 A 15 5 B 18
5 2 1
12 24
5 C 17 0 G 24
Problem 5 5 2
2 3
A C E
10 10 9 2
0 (18)
12 S 15
12 S G 0 F 1
8 16 3 1
8 1
B D H
10 8 (18)
5 A 15 5 B 18
5 2 1
12 20
5 C 17 0 G 20
Problem 5 5 2
2 3
A C E
10 10 9 2
0 (18)
12 S 15
12 S G 0 F 1
8 16 3 1
8 1
B D H
10
5 A 15 17
5 2 1
12 20
5 C 17 0 G 20
Problem 5 5 2
2 3
A C E
10 10 9 2
0 (18)
12 S 15 17
12 S G 0 F 1
8 16 3 1
8 1
B D H
10
5 A 17
5 2 1
12 20
5 C 17 0 G 20
Problem 5 5 2
2 3
A C E
10 10 9 2
0 (18)
12 S 17
12 S G 0 F 1
8 16 3 1
8 1
B D H
10 (20)
5 A 17
5 2 1
12 20
5 C 17 0 G 20
15
2 E 17
Problem 5 5 2
2 3
A C E
10 10 9 2
0 (18)
12 S 17
12 S G 0 F 1
8 16 3 1
8 1
B D H
10 (20)
5 A 17
5 2 1
12
5 C 17
15
2 E 17 ¶
Problem 5 5 2
2 3
A C E
10 10 9 2
0 (18)
12 S 17
12 S G 0 F 1
8 16 3 1
8 1
B D H
10 (20)
5 A 17
5 2 1
12 ¶)
(¶
5 C 17
15 21
2 E ¶ 0 G 21
Problem 5 5 2
2 3
A C E
10 10 9 2
0 (18)
12 S 17
12 S G 0 F 1
8 16 3 1
8 1
B D H
10 (20)
5 A 17
5 2 1
12 ¶)
(¶
5 C 17 21
21
0 G 21
Problem 5 5 2
2 3
A C E
10 10 9 2
0 (18)
12 S 17
12 S G 0 F 1
8 16 3 1
8 1
B D H
10 (20)
5 A 17 20
5 2 1
12 ¶)
(¶
5 C 21
21
0 G 21
Problem 5 5 2
2 3
A C E
10 10 9 2
0 (18)
12 S 17 18
12 S G 0 F 1
8 16 3 1
8 1
B D H
10 (20)
5 A 20
5 2 1
12 ¶)
(¶
5 C 21
21
0 G 21
Problem 5 5 2
2 3
A C E
10 10 9 2
0
12 S 18
12 S G 0 F 1
8 16 3 1
8 1
B D H
10 (20) 8
5 A 20 5 B 13
5 2 1
12 (21)
5 C 21
21
0 G 21
Problem 5 5 2
2 3
A C E
10 10 9 2
0
12 S 18
12 S G 0 F 1
8 16 3 1
8 1
B D H
10 (20) 8
5 A 20 5 B 13
5 2 1
12 (21) 16
5 C 21 2 D 18
Problem 5 5 2
2 3
A C E
10 10 9 2
0 (20)
12 S 18
12 S G 0 F 1
8 16 3 1
8 1
B D H
10 (20) 8
5 A 20 5 B 13
5 2 1
16 24
2 D 18 0 G 24
Problem 5 5 2
2 3
A C E
10 10 9 2
0 (20)
12 S 18
12 S G 0 F 1
8 16 3 1
8 1
B D H
8
5 B 13 18
5 2 1
16 24
2 D 18 0 G 24
Problem 5 5 2
2 3
A C E
10 10 9 2
0 (20)
12 S 18
12 S G 0 F 1
8 16 3 1
8 1
B D H
8 (24)
5 B 18
5 2 1
16 24
2 D 18 0 G 24
19
0 G 19
Problem 5 5 2
2 3
A C E
10 10 9 2
0 (20)
12 S 18
12 S G 0 F 1
8 16 3 1
8 1
B D H
8 (24)
5 B 18
5 2 1
16 (19)
2 D 18
19 17
0 G 19 1 H 18
Problem 5 5 2
2 3
A C E
10 10 9 2
0 (20)
12 S 18
12 S G 0 F 1
8 16 3 1
8 1
B D H
8 (24)
5 B 18
5 2 1
16 (19)
2 D 18
17
1 H 18 ¶
Problem 5 5 2
2 3
A C E
10 10 9 2
0 (20)
12 S 18
12 S G 0 F 1
8 16 3 1
8 1
B D H
8 (24)
5 B 18
5 2 1
16 (19)
2 D 18 19
17
1 H ¶
Problem 5 5 2
2 3
A C E
10 10 9 2
0 (20)
12 S 18
12 S G 0 F 1
8 16 3 1
8 1
B D H
8 (24)
5 B 18 19
5 2 1
16 (19)
2 D 19
17
1 H ¶
Problem 5 5 2
2 3
A C E
10 10 9 2
0 (20)
12 S 18 19
12 S G 0 F 1
8 16 3 1
8 1
B D H
8 (24)
5 B 19
5 2 1
16 (19)
2 D 19
17
1 H ¶
Problem 5 5 2
2 3
A C E
10 10 9 2
0 (20)
12 S 19
12 S G 0 F 1
8 16 3 1
8 1
B D H
8 (24)
5 B 19
5 2 1
16
2 D 19
17 19
1 H ¶ 0 G 19
Problem 5 5 2
2 3
A C E
10 10 9 2
0 (20)
12 S 19
12 S G 0 F 1
8 16 3 1
8 1
B D H
8 (24)
5 B 19
5 2 1
16
2 D 19
19
0 G 19