

The designers of Nintendo Tetris arbitrarily ordered the Tetriminos into the sequence shown above. The Mechanics of Nintendo Tetris Representing TetriminosĮach Tetrimino (tetri-mee-noh) has a single-character name that resembles its shape. Then, hit the Restart button on the Lua Script window. Toward the top of the file, you'll find the following line. To make it play faster, open the Lua script in a text editor. to modify the keyboard mapping) and press Start, the resulting starting level will be 10 plus the selected value. The AI will take over from there.įrom the second menu screen, after you select the level, if you hold down gamepad button A (use Config | Input. In the second menu, you can change the starting level using the arrow keys. Press Start (Enter) to advance to the next menu screen. On slower computers, the music may play choppy you might want to disable it completely. Leave the game type as A-Type, but feel free to change the music using the arrow keys. The Lua script will direct you to the first menu screen. From the Lua Script window, enter the path to a or hit the Browse button to navigate to it. The game will launch.įrom the menu bar, select File | Lua | New Lua Script Window. In the Open File dialog box, select the Nintendo Tetris ROM file and press Open.

Runįrom the menu bar, select File | Open ROM. DownloadĮxtract lua/a from this source zip. Google might be able to help you to track it down.

You'll also need the Nintendo Tetris ROM file (USA version). The AI was developed for FCEUX 2.2.2, the most recent version at the time of this writing. To run the AI, you'll need FCEUX, the all-in-one NES/Famicom emulator. Find out what colors appear in levels higher than any human has ever reached. You can witness the score max out while the line, level and statistics counters wraparound indefinitely. Finally, you can experience level 30 and beyond. Table of Contentsįor those lacking the persistence, patience and time necessary to master Nintendo Tetris, I created an AI to play it for you. In this article, I explore the deceptively simple mechanics of Nintendo Tetris.Īfterwards, I describe how to build an AI that exploits them. Applying Artificial Intelligence to Nintendo Tetris Applying Artificial Intelligence to Nintendo Tetris Abstract
