SuperStacker is a heuristic based AI that can play NES Tetris at a superhuman level.
Example of SuperStacker playing past the killscreen
This program runs on the BizHawk emulator and uses Python for backend computations. to use:
- Run
play.py
- Start NES Tetris in Bizhawk
- Run
play.lua
fromscripts/
in the BizHawk lua console - SuperStacker should select the game and begin playing, it will automatically unpause and restart the game
For each current falling piece, SuperStacker finds every possible place the piece can land, each placement is then evaluated using a set of features. The placement with the best evaluation is chosen, actions are then performed to move and orient the piece to arrive at the desired location.
All of this is done in the first frame of each new piece arriving on screen.
Currently doesn't use information about the next piece and cannot tuck pieces.
- Current Highest Score: 4,243,879
- Current Highest Level: 130
- Most Lines Cleared: 1305
SuperStacker uses many features to determine the value of each possible move
- Heavily prioritises clearing lines
- A hole is defined as an empty tile with a solid tile directly above it
- Holes are quite heavily avoided
- A well is defined as an empty tile with a solid tile on both its right and left side
- Wells are lightly avoided
- Any placements that increase the max build height is avoided when possible
- Pieces are generally placed low down when possible
- Utilise next piece information
Add more heuristic features- Add ability to tuck pieces
- Prioritise getting higher scores through tetrises
- Evaluate hole depth