Artificial Intelligence, Essay - Computer Science, Essays (high school) of Software Engineering

 Me vs. a devil  I have two possible moves: A or B  If I make move A, devil pays me $4  If I make move B, I pay devil $3.  Which move should I make?

Typology: Essays (high school)

2011/2012

Uploaded on 04/16/2012

shyrman
shyrman 🇺🇸

4.2

(6)

239 documents

1 / 37

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Artificial Intelligence
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25

Partial preview of the text

Download Artificial Intelligence, Essay - Computer Science and more Essays (high school) Software Engineering in PDF only on Docsity!

Artificial Intelligence

A Simple Game

 Me vs. a devil

 I have two possible moves: A or B

 If I make move A, devil pays me $4.

 If I make move B, I pay devil $3.

 Which move should I make?

Game Trees

Devil pays me $ I pay devil $

A B

Two Rounds

Devil pays me $ I pay devil $

C D

I pay devil $ I pay devil $

E F

A B

Which move should I make?

Two Rounds

Devil pays me $ I pay devil $

C D

I pay devil $ I pay devil $

E F

A B

Two Rounds

Three Rounds

Three Rounds

Minimax

 This is called the minimax algorithm.

 I'm trying to maximize my winnings,

given that I expect my opponent will try

to minimize my winnings.

Connect Four

 Let's play Connect Four

Connect Four

 How long would it take a computer to

determine the best starting move?

 Too long!!!

 After 20 moves,

roughly 80,000,000,000,000,000 states!

A More Practical Algorithm

1. Look just a few moves ahead.

2. Then estimate how good the board

appears.

Simplest estimation function

value of board for player =

 1000 (if player has 4-in-a-row)

 -1000 (if other player has 4-in-a-row)

 0 (otherwise)

Using our estimation function

What are the values of these boards for the red player? They would all have a value of zero.