Is One Better than None? Does foresight allow an artificial intelligence to survive longer in...
-
Upload
amanda-scott -
Category
Documents
-
view
212 -
download
0
Transcript of Is One Better than None? Does foresight allow an artificial intelligence to survive longer in...
![Page 1: Is One Better than None? Does foresight allow an artificial intelligence to survive longer in Tetris? William Granger and Liqun Tracy Yang.](https://reader035.fdocuments.in/reader035/viewer/2022070412/5697bf771a28abf838c81314/html5/thumbnails/1.jpg)
Is One Better than None?
Does foresight allow an artificial intelligence to survive longer in Tetris?
William Granger and Liqun Tracy Yang
![Page 2: Is One Better than None? Does foresight allow an artificial intelligence to survive longer in Tetris? William Granger and Liqun Tracy Yang.](https://reader035.fdocuments.in/reader035/viewer/2022070412/5697bf771a28abf838c81314/html5/thumbnails/2.jpg)
2
The Game of Tetris
Board is 10x20 blocks Board is empty at start A complete line will
remove the line of blocks When a tetromino cannot
exit the “spawning area”, the game is over.
Tetrominoes: 7 pieces that consist of four blocks each in different possible combinations.
![Page 3: Is One Better than None? Does foresight allow an artificial intelligence to survive longer in Tetris? William Granger and Liqun Tracy Yang.](https://reader035.fdocuments.in/reader035/viewer/2022070412/5697bf771a28abf838c81314/html5/thumbnails/3.jpg)
3
What is Foresight?
Foresight means having knowledge of the next piece or pieces before they are on the board
One-step look-ahead means having knowledge of the current piece and the first next piece
![Page 4: Is One Better than None? Does foresight allow an artificial intelligence to survive longer in Tetris? William Granger and Liqun Tracy Yang.](https://reader035.fdocuments.in/reader035/viewer/2022070412/5697bf771a28abf838c81314/html5/thumbnails/4.jpg)
4
Related Work The Tetris algorithm with foresight has been
coded several years ago
Most research involved in Tetris focuses on NP related problems 1
Certain tetromino sequences have been proven to make any algorithm fail 2
1.) E.D. Demaine, S. Hohenberger, and G. Liben-Nowell, Tetris is Hard, Even to Approximate, Technical Report MIT-LCS-TR-865, Laboratory of Computer Science, MIT 2002
2.) H. Burgiel. How to lose at Tetris. Mathematical Gazette, pages 194-200, July 1997
![Page 5: Is One Better than None? Does foresight allow an artificial intelligence to survive longer in Tetris? William Granger and Liqun Tracy Yang.](https://reader035.fdocuments.in/reader035/viewer/2022070412/5697bf771a28abf838c81314/html5/thumbnails/5.jpg)
5
A Tetris Comparison Without Foresight With Foresight
![Page 6: Is One Better than None? Does foresight allow an artificial intelligence to survive longer in Tetris? William Granger and Liqun Tracy Yang.](https://reader035.fdocuments.in/reader035/viewer/2022070412/5697bf771a28abf838c81314/html5/thumbnails/6.jpg)
6
Our Goals
Discover whether foresight makes the program survive longer.
See if certain sequences require no foresight
![Page 7: Is One Better than None? Does foresight allow an artificial intelligence to survive longer in Tetris? William Granger and Liqun Tracy Yang.](https://reader035.fdocuments.in/reader035/viewer/2022070412/5697bf771a28abf838c81314/html5/thumbnails/7.jpg)
7
Zero-step Look-ahead A.I.
Uses a heuristic algorithm Penalizes for holes, roughness, piece
height Rewards for filling a line Chooses the move with the highest score
![Page 8: Is One Better than None? Does foresight allow an artificial intelligence to survive longer in Tetris? William Granger and Liqun Tracy Yang.](https://reader035.fdocuments.in/reader035/viewer/2022070412/5697bf771a28abf838c81314/html5/thumbnails/8.jpg)
8
Zero-step Look-Ahead A.I. Holes = -1 Roughness = -22 Piece Average Height
= -1.5 Remove Line Score =
+0 Total Score = -24.5
![Page 9: Is One Better than None? Does foresight allow an artificial intelligence to survive longer in Tetris? William Granger and Liqun Tracy Yang.](https://reader035.fdocuments.in/reader035/viewer/2022070412/5697bf771a28abf838c81314/html5/thumbnails/9.jpg)
9
Zero-step Look-Ahead A.I. Holes = -1 Roughness = -18 Piece Average Height
= -0.5 Remove Line Score =
+10 Total Score = -9.5 This move has a
higher score than -24.5, so this move wins!
![Page 10: Is One Better than None? Does foresight allow an artificial intelligence to survive longer in Tetris? William Granger and Liqun Tracy Yang.](https://reader035.fdocuments.in/reader035/viewer/2022070412/5697bf771a28abf838c81314/html5/thumbnails/10.jpg)
10
One-step Look-ahead A.I.
Uses the same heuristic algorithm as zero-step look-ahead A.I.
Takes the average to determine final result
![Page 11: Is One Better than None? Does foresight allow an artificial intelligence to survive longer in Tetris? William Granger and Liqun Tracy Yang.](https://reader035.fdocuments.in/reader035/viewer/2022070412/5697bf771a28abf838c81314/html5/thumbnails/11.jpg)
11
How A.I. 1 makes a move vs. A.I. 0
May make a different move since the next piece can make a move with a better score
Having the next piece clear lines also affects where the current piece will go
![Page 12: Is One Better than None? Does foresight allow an artificial intelligence to survive longer in Tetris? William Granger and Liqun Tracy Yang.](https://reader035.fdocuments.in/reader035/viewer/2022070412/5697bf771a28abf838c81314/html5/thumbnails/12.jpg)
12
Hypothesis
For this particular heuristic algorithm, we hypothesize that for all sequences a one-step look-ahead will always clear more lines than a zero-step look-ahead
![Page 13: Is One Better than None? Does foresight allow an artificial intelligence to survive longer in Tetris? William Granger and Liqun Tracy Yang.](https://reader035.fdocuments.in/reader035/viewer/2022070412/5697bf771a28abf838c81314/html5/thumbnails/13.jpg)
13
Experiments & Analysis
Coded a Tetris program with the heuristic algorithm
Had Tetris program run repeatable sequences
Looked for bad and unexpected moves
![Page 14: Is One Better than None? Does foresight allow an artificial intelligence to survive longer in Tetris? William Granger and Liqun Tracy Yang.](https://reader035.fdocuments.in/reader035/viewer/2022070412/5697bf771a28abf838c81314/html5/thumbnails/14.jpg)
14
Sequences Used for Analysis
SOL Sequence: holes analysis
I+? Sequence: I-piece improve survivability?
ZTL Sequence: roughness analysis
Random Sequence: normal play
![Page 15: Is One Better than None? Does foresight allow an artificial intelligence to survive longer in Tetris? William Granger and Liqun Tracy Yang.](https://reader035.fdocuments.in/reader035/viewer/2022070412/5697bf771a28abf838c81314/html5/thumbnails/15.jpg)
15
SOL SequenceA.I. 0 A.I. 1
![Page 16: Is One Better than None? Does foresight allow an artificial intelligence to survive longer in Tetris? William Granger and Liqun Tracy Yang.](https://reader035.fdocuments.in/reader035/viewer/2022070412/5697bf771a28abf838c81314/html5/thumbnails/16.jpg)
16
I + ? Sequences
All two piece sequences with an
I-piece SZI sequence
SOLI sequence
Infinite Loop for AI0 and AI1
Infinite Loop for AI0 and AI1
AI0 clears the board, AI1 goes to infinite loop
![Page 17: Is One Better than None? Does foresight allow an artificial intelligence to survive longer in Tetris? William Granger and Liqun Tracy Yang.](https://reader035.fdocuments.in/reader035/viewer/2022070412/5697bf771a28abf838c81314/html5/thumbnails/17.jpg)
17
ZTL SequenceA.I. 0 A.I. 1
![Page 18: Is One Better than None? Does foresight allow an artificial intelligence to survive longer in Tetris? William Granger and Liqun Tracy Yang.](https://reader035.fdocuments.in/reader035/viewer/2022070412/5697bf771a28abf838c81314/html5/thumbnails/18.jpg)
18
RandomA.I. 0 A.I. 1
Mean: 354 Max: 601 Min: 129
Mean: 556,045 Max: 1,108,432 Min: 72,257
![Page 19: Is One Better than None? Does foresight allow an artificial intelligence to survive longer in Tetris? William Granger and Liqun Tracy Yang.](https://reader035.fdocuments.in/reader035/viewer/2022070412/5697bf771a28abf838c81314/html5/thumbnails/19.jpg)
19
A.I. 0 vs. A.I. 1
SOL sequence
I+? sequences
ZTL sequence
Pure Random Note: Results for “Random” were taken from an average of multiple trials
![Page 20: Is One Better than None? Does foresight allow an artificial intelligence to survive longer in Tetris? William Granger and Liqun Tracy Yang.](https://reader035.fdocuments.in/reader035/viewer/2022070412/5697bf771a28abf838c81314/html5/thumbnails/20.jpg)
20
How A.I. 0 Fails
Even with large penalties, clearing a line can make a move competitive
The holes formed from this make it more difficult for the program to fill lines
![Page 21: Is One Better than None? Does foresight allow an artificial intelligence to survive longer in Tetris? William Granger and Liqun Tracy Yang.](https://reader035.fdocuments.in/reader035/viewer/2022070412/5697bf771a28abf838c81314/html5/thumbnails/21.jpg)
21
How A.I. 1 Fails
A large empty column forms on either side Tight spaces also form which inhibit
certain pieces from fitting in horizontally
![Page 22: Is One Better than None? Does foresight allow an artificial intelligence to survive longer in Tetris? William Granger and Liqun Tracy Yang.](https://reader035.fdocuments.in/reader035/viewer/2022070412/5697bf771a28abf838c81314/html5/thumbnails/22.jpg)
22
Conclusions
AI1 indeed removes more lines than AI0 for this particular algorithm at least for most sequences
Having frequent I-tetrominoes for every two and three pieces will survive forever.
ZTL sequence performs better with AI0 than AI1
![Page 23: Is One Better than None? Does foresight allow an artificial intelligence to survive longer in Tetris? William Granger and Liqun Tracy Yang.](https://reader035.fdocuments.in/reader035/viewer/2022070412/5697bf771a28abf838c81314/html5/thumbnails/23.jpg)
23
Still in the plans
Find a definitive reason why empty columns form over time with random sequences
Explain in detail why ZTL does better with no foresight and why frequent I-pieces always go into infinite loops
![Page 24: Is One Better than None? Does foresight allow an artificial intelligence to survive longer in Tetris? William Granger and Liqun Tracy Yang.](https://reader035.fdocuments.in/reader035/viewer/2022070412/5697bf771a28abf838c81314/html5/thumbnails/24.jpg)
24
Future Work
See how a two-step look-ahead performs
N-step look-ahead Super Tetris? (five or
more piece blocks)
![Page 25: Is One Better than None? Does foresight allow an artificial intelligence to survive longer in Tetris? William Granger and Liqun Tracy Yang.](https://reader035.fdocuments.in/reader035/viewer/2022070412/5697bf771a28abf838c81314/html5/thumbnails/25.jpg)
Is One Better than None?
Does foresight allow an artificial intelligence to survive longer in Tetris?
William Granger and Liqun Tracy Yang