ECE 4524 Artificial Intelligence and Engineering Applications - - PowerPoint PPT Presentation

ece 4524 artificial intelligence and engineering
SMART_READER_LITE
LIVE PREVIEW

ECE 4524 Artificial Intelligence and Engineering Applications - - PowerPoint PPT Presentation

ECE 4524 Artificial Intelligence and Engineering Applications Meeting 5: Two-Player Games and MiniMax Search Reading: AIAMA 5.1-5.2 Todays Schedule: Formally define games Example games Adversarial search MiniMax algorithm


slide-1
SLIDE 1

ECE 4524 Artificial Intelligence and Engineering Applications

Meeting 5: Two-Player Games and MiniMax Search Reading: AIAMA 5.1-5.2 Today’s Schedule:

◮ Formally define games ◮ Example games ◮ Adversarial search ◮ MiniMax algorithm ◮ Games of chance

slide-2
SLIDE 2

A review of Problem Solving Agents

Problem Solving Agents formulate problems by

◮ representing (model) the world as atomic states, ◮ defining an initial state that represents the initial condition of

the world,

◮ defining a goal state that represents what they want the

world to look like,

◮ and defining a function for allowable state transitions which

map onto actions in the world.

slide-3
SLIDE 3

Define games and adversarial search

A game is a multi-agent environment where actions are (usually) taken in turns. Agents do not have full control over the environment and so must

◮ take into account contingencies, other agent’s actions ◮ take into account competition, other agent’s goals

This leads to adversarial search.

slide-4
SLIDE 4

Game Terminology

Lets use tic-tac-toe to help explain the terminology. A game tree is made up of

◮ Initial State ◮ Player(s) ◮ Actions(s) ◮ Results(s,a) ◮ Terminal-Test(s) ◮ Utility(s,p)

slide-5
SLIDE 5

Game Terminology

Lets use tic-tac-toe to help explain the terminology. A game tree is made up of

◮ Initial State ◮ Player(s) ◮ Actions(s) ◮ Results(s,a) ◮ Terminal-Test(s) ◮ Utility(s,p)

slide-6
SLIDE 6

Game Terminology

Lets use tic-tac-toe to help explain the terminology. A game tree is made up of

◮ Initial State ◮ Player(s) ◮ Actions(s) ◮ Results(s,a) ◮ Terminal-Test(s) ◮ Utility(s,p)

slide-7
SLIDE 7

Example NIM

Nim is a simple game that is useful to illustrate game play. Here is the variation we will consider. There three piles of tokens with initially a given number in reach pile. The players take turns removing tokens under the following rules:

◮ Each turn the player must take at least one token, and ◮ You can take multiple tokens, but only from the same pile.

The game is won by the player taking the last tiles (none remain after the turn).

slide-8
SLIDE 8

Warmup #1

Consider the following initial condition for Nim Pile 1 = 3, Pile 2 = 4, Pile 3 = 5 defined as (3,4,5) What are the states of the game at the next ply depth written as triplets of numbers?

slide-9
SLIDE 9

Other Examples: Checkers and Chess

slide-10
SLIDE 10

Game On!

Lets play some Nim to get an idea of strategy. Pick a partner and play a few rounds starting at 3,4,5. Sketch your game tree.

slide-11
SLIDE 11

Cartoon Example

Consider the following game tree with the utility filled in at the terminal nodes. Assume the max player goes first. What is the rational move to make?

slide-12
SLIDE 12

Minimax Search

slide-13
SLIDE 13

Warmup #2

Suppose a Nim game starts with configuration (1,1,1) and that max goes first. Perform minimax search assuming a win for max has utility +1 and -1 if min wins. What is the backed-up minimax value?

slide-14
SLIDE 14

Exercise

Assuming max goes first, what it the rational action to take?

slide-15
SLIDE 15

Time limits and real-time decisions

◮ Most games have a time limit and a state space that prohibits

reaching terminal states.

◮ So, we cut-off the search at a specific depth and use a

heuristic, called the evaluation function, to estimate what would be the backed-up value. This is required for many games, e.g. chess.

slide-16
SLIDE 16

Is there something smarter we can do?

slide-17
SLIDE 17

Extensions to games of chance

Stochastic games have an element of chance, for example from the roll of a the dice. We can introduce chance-nodes to account for this. The backed-up value is then the Expected Utility.

slide-18
SLIDE 18

Example: Dice based 21

slide-19
SLIDE 19

Practical Applications of Adversarial Search

So this is all not just fun-and-games (pun intended).

◮ Game theory is important in many areas, notably economics ◮ It is often useful to model the environment as an adversarial

agent, i.e. contigency plans

◮ Games of chance are good models of Sequential Decision

Problems

slide-20
SLIDE 20

Next Actions

◮ Reading on alpha-beta search and practical game

considerations, AIAMA 5.3-5.4

◮ Take warmup before noon on Thursday 2/1.

Reminder! PS1 is due 2/12.