0% found this document useful (0 votes)
44 views8 pages

Optimization Method - 1 - : Artificial Intelligence

This document discusses several optimization methods and algorithms for artificial intelligence including: 1. Branch and bound, which uses bounding, node selection, and branching to prune the search space. 2. A* search, which uses heuristic estimates and path costs to efficiently find optimal solutions. 3. Simplified memory bounded A* which drops the lowest scoring node when memory is full to avoid reselection. 4. Minimax and alpha-beta pruning which are used for game tree search and pruning unpromising branches.

Uploaded by

bernad tukan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views8 pages

Optimization Method - 1 - : Artificial Intelligence

This document discusses several optimization methods and algorithms for artificial intelligence including: 1. Branch and bound, which uses bounding, node selection, and branching to prune the search space. 2. A* search, which uses heuristic estimates and path costs to efficiently find optimal solutions. 3. Simplified memory bounded A* which drops the lowest scoring node when memory is full to avoid reselection. 4. Minimax and alpha-beta pruning which are used for game tree search and pruning unpromising branches.

Uploaded by

bernad tukan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Artificial Intelligence

Optimization Method
-1-

Gloria Virginia & Matahari Bhakti Nendya

DWCU, Genap 2019/2020

A*

• Principal:
- Branch and Bound extended
- Heuristic estimate extended
- Redundant path deletion extended

2
Branch and Bound Principal

• Three mechanisms:

1. A mechanism to generate a bound so that many branches can


be terminated

2. A mechanism to select the node to process

3. A mechanism to generate branches when searching the


solution space

Branch and Bound Principal (2)

• Algorithm:
1. [BOUNDING] Use any (complete) search method to find a
complete path
➡ LowerBound = cost_of_a_complete_path

2. [SELECTION] For all_open_nodes IF current_cost_of_T <


LowerBound THEN Select node_T ELSE Remove node_T

3. [BRANCHING] Generate all leaves of selected node


➡ e.g. for another 1 level

4. Iterate

4
Heuristic Estimate Principal

f(path) = cost(path) + h(endpoint_path)

Where:

cost(path) = the accumulated cost of the partial path


h(endpoint_path) = a heuristic estimate of the cost remaining
from endpoint_path to a goal node
+
f(path) = an estimate of the cost of a path
extending the current path to reach a goal.

f(T) = g(T) + h’(T)

Example of Heuristic Estimate


g(T) = the_distance_between_two_ h’(T) = the_straight_line_distance_
nodes from _T_to_G

4 4 10.4
A B C A B 6.7 C
3
4
5 5 S 11
S
3 G 8.9 G
2 4 3
4 D E 6.9 F
D E F

f(T) = g(T) + h’(T)

• f(B) = g(SAB) + h’(B) = 7 + 6.7 = 13.7 (in SABEFG)

• f(F) = g(SDEF) + h’(F) = 10 + 3 = 13 (in SDEFG)

6
Redundant Path Deletion Principal

IF the QUEUE contains:


a path P terminating in I, with cost cost_P AND
a path Q containing I, with cost cost_Q AND
cost_P ≥ cost_Q

THEN
delete P

A* Algorithm
1. QUEUE ← path only containing the root

2. WHILE QUEUE is not empty


AND goal is not reached

DO remove the first path from the QUEUE;


create new paths (to all children);
reject the new paths with loops;
add the new paths and sort the entire QUEUE;
by f(T) = g(T) + h’(T)

redundant path deletion extended;

3. IF goal reached THEN success ELSE failure

8
SMA*
• Simplified Memory Bounded A* (SMA*)

• Proceeds just like A* => expanding the best leaf


• When memory is full, drops the worst leaf node (which is the one
with the highest f-value)

• Principal:
• Expands the newest best leaf
• Deletes the oldest worst leaf

➡ To avoid selecting the same node for expansion and deletion,


when the leaf nodes have the same f-values

Minimax
• Is a method for
Ø minimizing the maximum possible loss (minmax) or
Ø maximizing the minimum gain (maxmin)

• It helps find the best move by working backwards from the


end of the game

• Restrictions:
Ø 2 players: MAX (computer) and MIN (opponent)
Ø deterministic, perfect information

10
Minimax (2)
• Prerequisite:
Ø Select a depth-bound and evaluation function

• Algorithm:
1. Construct the tree up till the depth-bound
2. Compute the evaluation function for the leaves
3. Propagate the evaluation function upwards
Ø Taking minima in MIN
Ø Taking maxima in MAX

11

Minimax (3)

3 Select
MAX
this move

MIN 2 1 3

MAX
2 5 3 1 4 4 3

12
Minimax (4)

MAX 5

Select
MIN this move 5
4 3

MAX 8 9 4 5 9 6 3 9 8

8 739 1 624 1 1 3 53 926 5 2 1 239 728 64

13

Alpha Beta Pruning


• A search algorithm that reduces the number of nodes to
be evaluated in the search tree by the minimax algorithm

• Principle:
Ø Generate the depth-first, left-to-right
Ø Propagate final values of nodes as initial estimates for
their parent node

v ALPHA-values: the temporary values of MAX-values


v BETA-values: the temporary values of MIN-values

14
Alpha Beta Pruning (2)

MAX ≥2 Alpha-value

MIN ≤2 =2 ≤1 Beta-value

2 5 1 3

15

Alpha Beta Pruning (3)

• Explanation:
‣ The MIN-value (1) is already smaller than the MAX-
value of the parent (2)
‣ The MIN-value is only allowed to decrease
‣ The MAX-value is only allowed to increase
‣ Hence, no point in computing further below the node

16

You might also like