Using the Application

The buttons in the top right corner let you do the following:

Human

Play Tetris yourself. After clicking on the button, click on the playing field so it will accept your keystrokes. The keys to use are listed under the playing field.

Random

Watch how the computer player performs when choosing actions randomly.

Manual Weights

Watch the computer play with the weight settings typed in the red boxes. You can even change the numbers on-the-fly and watch the difference in performance.

Learned Weights

Watch the computer play with the "optimal" weights.

Stop Game

Stop the game currently in progress.

When watching the computer play, you can select Quick Graphics Mode. This will draw the tetrads only in their final positions, causing a considerable increase in speed. You can also enable/disable the deep search by toggling Next Tetrad Preview.

If running the program as an application, you can run the learning algorithm. All of the parameters can be set in the blue box on the lower right. When ready to begin, simply press the "LEARN" button. Learning will be done in Quick Graphics Mode whether or not it is selected. Although the algorithm states that every run begins with random weights, you can have the first run in the learning process begin with weights that you type in the red boxes if you select Start with Current Weights. All output will be printed to a file entitled "tetris.txt" that will be created in the output path you specify. If you want to see the performance vector for every game, select Verbose Output. This can be toggled on and off at any time during the learning process. Everything else will remain fixed, however, once the learning begins. The orange status bar keeps you updated on the algorithm’s progress, informing you what run (R), pass (P), weight (W), and trial (T) it is currently on. After the weight number, it will say "I" if increasing the weight or "D" if decreasing it (or "O" if it is at the beginning of a run before any weight adjustments occur). Finally, it will report the maximum average number of lines (L) completed in a trial during the current run.