Game Playing. Introduction One of the earliest areas in artificial intelligence is game playing....
-
Upload
mary-potter -
Category
Documents
-
view
213 -
download
0
Transcript of Game Playing. Introduction One of the earliest areas in artificial intelligence is game playing....
![Page 1: Game Playing. Introduction One of the earliest areas in artificial intelligence is game playing. Two-person zero-sum game. Games for which the state space.](https://reader036.fdocuments.in/reader036/viewer/2022082819/56649f1c5503460f94c3270f/html5/thumbnails/1.jpg)
Game Playing
![Page 2: Game Playing. Introduction One of the earliest areas in artificial intelligence is game playing. Two-person zero-sum game. Games for which the state space.](https://reader036.fdocuments.in/reader036/viewer/2022082819/56649f1c5503460f94c3270f/html5/thumbnails/2.jpg)
Introduction• One of the earliest areas in artificial
intelligence is game playing. • Two-person zero-sum game.• Games for which the state space is
small enough – generate the entire space.
• Games for which the entire space cannot be generated.
![Page 3: Game Playing. Introduction One of the earliest areas in artificial intelligence is game playing. Two-person zero-sum game. Games for which the state space.](https://reader036.fdocuments.in/reader036/viewer/2022082819/56649f1c5503460f94c3270f/html5/thumbnails/3.jpg)
The Game NIM7
6-1 5-2 4-3
5-1-1 4-2-1 3-2-2 3-3-1
4-1-1-1 3-2-1-1 2-2-2-1
3-1-1-1 2-2-1-1
2-1-1-1-1-1
![Page 4: Game Playing. Introduction One of the earliest areas in artificial intelligence is game playing. Two-person zero-sum game. Games for which the state space.](https://reader036.fdocuments.in/reader036/viewer/2022082819/56649f1c5503460f94c3270f/html5/thumbnails/4.jpg)
NIM- MAX Plays First
.
7
6-1 5-2 4-3
5-1-1 4-2-1 3-2-2 3-3-1
4-1-1-1 3-2-1-1 2-2-2-1
3-1-1-1 2-2-1-1
2-1-1-1-1-1
MAX
MIN
MAX
MAX
MIN
MIN
1
0
1
![Page 5: Game Playing. Introduction One of the earliest areas in artificial intelligence is game playing. Two-person zero-sum game. Games for which the state space.](https://reader036.fdocuments.in/reader036/viewer/2022082819/56649f1c5503460f94c3270f/html5/thumbnails/5.jpg)
NIM- MIN Plays First
.
7
6-1 5-2 4-3
5-1-1 4-2-1 3-2-2 3-3-1
4-1-1-1 3-2-1-1 2-2-2-1
3-1-1-1 2-2-1-1
2-1-1-1-1-1
MIN
MAX
MIN
MIN
MAX
MAX
0
1
0
![Page 6: Game Playing. Introduction One of the earliest areas in artificial intelligence is game playing. Two-person zero-sum game. Games for which the state space.](https://reader036.fdocuments.in/reader036/viewer/2022082819/56649f1c5503460f94c3270f/html5/thumbnails/6.jpg)
Minimax AlgorithmRepeat• If the limit of search has been reached, compute the
static value of the current position relative to the appropriate player. Report the result.
• Otherwise, if the level is a minimizing level, use the minimax on the children of the current position. Report the minimum value of the results.
• Otherwise, if the level is a maximizing level, use the minimax on the children of the current position. Report the maximum of the results.
Until the entire tree is traversed.
![Page 7: Game Playing. Introduction One of the earliest areas in artificial intelligence is game playing. Two-person zero-sum game. Games for which the state space.](https://reader036.fdocuments.in/reader036/viewer/2022082819/56649f1c5503460f94c3270f/html5/thumbnails/7.jpg)
Minimax Applied to NIM
.
7
6-1 5-2 4-3
5-1-1 4-2-1 3-2-2 3-3-1
4-1-1-1 3-2-1-1 2-2-2-1
3-1-1-1 2-2-1-1
2-1-1-1-1-1
MIN
MAX
MIN
MIN
MAX 0
1
0
0
1
MAX
0
1 0
0 0 00
0 0
![Page 8: Game Playing. Introduction One of the earliest areas in artificial intelligence is game playing. Two-person zero-sum game. Games for which the state space.](https://reader036.fdocuments.in/reader036/viewer/2022082819/56649f1c5503460f94c3270f/html5/thumbnails/8.jpg)
Generating the Game Tree to a Depth
• In some cases the game tree will be too large to generate.
• In this case the tree is generated to a certain depth or ply.
• Heuristic values are used to estimate how promising a node is.
• Horizon effect.
![Page 9: Game Playing. Introduction One of the earliest areas in artificial intelligence is game playing. Two-person zero-sum game. Games for which the state space.](https://reader036.fdocuments.in/reader036/viewer/2022082819/56649f1c5503460f94c3270f/html5/thumbnails/9.jpg)
Example
3
3 0 2
3 9 0 7 2 6
2 3 5 9 0 7 4 2 1 5 6
MAX
MIN
MAX
MIN
![Page 10: Game Playing. Introduction One of the earliest areas in artificial intelligence is game playing. Two-person zero-sum game. Games for which the state space.](https://reader036.fdocuments.in/reader036/viewer/2022082819/56649f1c5503460f94c3270f/html5/thumbnails/10.jpg)
Heuristic for Tic-Tac-Toe
• h(n) = x(n) - o(n) where –x(n) is the total of MAX’s possible
winning (we assume MAX is playing x) –o(n) is the total of the opponent’s,
i.e. MIN’s winning lines • h(n) is the total evaluation for a state
n.