File Exchange

image thumbnail

Computer plays Tetris by itself

version (12.9 KB) by Maxim Vedenyov
Some not perfect AI used.

1 Download

Updated 15 Nov 2011

View License

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:

Run test1.m to see.

Cite As

Maxim Vedenyov (2021). Computer plays Tetris by itself (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (0)

MATLAB Release Compatibility
Created with R2010b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!