Computer plays Tetris by itself
Version 1.0.0.0 (12.9 KB) by
Maxim Vedenyov
Some not perfect AI used.
Computer plays classic Tetris by itself, 10x20 gamepad, 7 random 4-squares Tetris blocks come. There are some not-perfect AI: scan all positions and all rotation to find minimum of value: number_of_holes + relative_high. Number of holes in gamepad is used to break tie. Usually game over at 10-80 lines.
See how it works here:
http://www.youtube.com/watch?v=Yeiy-K1ztfY
Run test1.m to see.
Cite As
Maxim Vedenyov (2026). Computer plays Tetris by itself (https://au.mathworks.com/matlabcentral/fileexchange/33779-computer-plays-tetris-by-itself), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2010b
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
