Artificial Intelligence part 4 d, Lecture notes of Artificial Intelligence

Artificial Intelligence part 4 d

Typology: Lecture notes

2018/2019

Uploaded on 09/25/2019

harrysuke
harrysuke 🇲🇾

16 documents

1 / 25

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Artificial Intelligence
(part 4d)
BEHAVIOR OF HEURISTICS EVALUATIONS
(USING HEURISTICS IN GAMES)
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19

Partial preview of the text

Download Artificial Intelligence part 4 d and more Lecture notes Artificial Intelligence in PDF only on Docsity!

Artificial Intelligence

(part 4d)

BEHAVIOR OF HEURISTICS EVALUATIONS

(USING HEURISTICS IN GAMES)

HEURISTICS EVALUATIONS:

(Admissibility,Monotonicity and Informedness)

 Admissibility Measures

A search is admissible if it is guaranteed to find a minimal path to a solution whenever such a path exists Recall…f(n) = g(n) + h(n) estimates the total cost of path from start state through n to the goal state

g(n) start (^) goal f(n)=total cost

n

h(n)

State space generated in heuristic search of the 8-puzzle graph

f(n)=g(n)+h(n).

g(n)=actual dist. From n to start

h(n)=no. of tiles in wrong position

Full best-first- search of 8 puzzle

Informed Heuristics

  • eg. Compare the heuristics proposed for solving the 8-puzzle
  • h1=> breadth-first-search with heuristic h1(x)=0 for all states x
  • h2=> #of tiles out of place
  • h1<= h2 <= h*, h2 is more informed and evaluates many fewer states
  • The more informed an A* algorithm, the less of the space it needs to expand to get the optimal solution

Heuristics in Games

 Game player must use heuristics to

guide play along a path to a winning

state

 Eg. game nim, player divide tokens into

2 piles of different size; eg. 6 token =>

1-5,2-4 NOT 3-

State space for a variant of nim. Each state partitions the seven matches into one or more piles.

Exhaustive minimax for the game of nim. Bold lines indicate forced win for MAX. Each node is marked with its derived value (0 or 1) under minimax.

Leaf with parent MIN forced to 0

Leaf with parent MIN forced to 0

Leaf with parent MAX forced to 1

Minimaxing to fixed Ply depth

 In complicated games, it is impossible to expand

the state graph out to leaf nodes.

 Instead, state space is searched to predefined

number of levels, called n-ply-look-ahead.

 Look-ahead allow the heuristic to be applied

over greater area of space.

 How?

 States on that ply are measured heuristically,  the values are propagated back up using minimax,  Search algo uses these values to select possible next moves

Figure 4.16:

Heuristic measuring conflict applied tostates of tic-tac-toe.

FIXED FLY DEPTH: Two-ply minimax applied to the opening move of tic-tac-toe, from Nilsson (1971).

Step1:expand the tree Step2:calculate heuristic for level n Step3:derived values for n- 1(propogate values back-up)

Figure 4.19: Two-ply minimax applied to X ’s move near the end of the game, from Nilsson (1971).

Forced win for MIN -inf

Step..N:choose best move for MAX Repeat all steps until MAX WIN

Alpha-beta pruning

 To improve search efficiency in two-person games (compared to minimax that always pursues all branches in state space)

 Alpha-beta search in depth-first fashion

 Alpha(α) and beta(β) values are created

 α associates with MAX-never decrease

 β associates with MIN-never increase

 How?

 Expand to full-ply  Apply heuristic evaluation to a state and its siblings  Back-up to the parent  The value is offered to grantparent as a potential α or β cutoff