4 ms·
I solved Tetris a very similar way in high school. My approach was to treat it as a zero-sum, two player game. One player assigns pieces, and the other player p
by arcastroe 4y ago
I solved Tetris a very similar way in high school. My approach was to treat it as a zero-sum, two player game. One player assigns pieces, and the other player places pieces. Treating it this way allows using Minimax algorithm with any depth (similar to chess or other two player games!). The board evaluation function can penalize "caves" (empty orphaned spaces that have been covered by pieces above them). With a board evaluation function like this, alpha/beta pruning can be used. This gives great results!
- icsa 4y agoNice work! I've done MiniMax w/ Alpha-Beta pruning for turn-based games and never thought to think about Tetris as a 2-player turn-based game.