Solitaire Poker, released for the Sega Game Gear, is a card-based puzzle game in which the player builds poker hands across a grid to maximize the score. In a normal playthrough, the goal is to score enough points by forming hands to advance through the game. In this TAS, I've made it that the goal is to complete the run as fast as possible while still reaching a strong final score.
This project is an interesting optimization challenge because it combines puzzle solving with frame-level timing. To tackle it, I developed a custom Python-based solver that models the board as a search space of possible moves and evaluates partial states using poker-hand scoring heuristics. The solver uses a branch-and-bound strategy to explore promising move sequences while pruning weaker branches, allowing it to focus on the most efficient solutions.

Game objectives

  • Finish all 15 levels of the default one-player View-1 mode in the minimum number of frames
  • Afterward, maximize the final score of the completed boards

Approach

I built a custom search tool tailored to this game’s structure. The program evaluates rows, columns, and diagonals as poker hands, then uses a branch-and-bound search to explore the most promising move sequences while discarding branches that cannot beat the current best upper bound. I also added heuristics and caching to make the search practical and guide it toward strong configurations. The implementation uses the treys Python package for fast poker-hand evaluation.
The game uses two areas: a source area on the left, where cards are selected from columns, and a play area on the right, where cards are placed to form poker hands. To optimize for time, the main constraint is which column can be chosen from the source area.

Possible improvements

  • Further frame savings may be possible by better understanding the level-to-level frame "randomness" that is still outside my current understanding.
  • I don't think in-level timing can be improved much further.
  • A higher-score solution is possible with additional search time or a better search configuration.

Closing remarks

This was a fun and rewarding project to work on, and I am always happy to apply algorithmic search methods to video games. Unfortunately, the final result is so fast that it is difficult to follow visually. Still, I hope this TAS can serve as a solid starting point for future optimization work on this title.

Code repo


CasualPokePlayer: Claiming for judging.
CasualPokePlayer: Replacing movie with a trimmed version.
CasualPokePlayer: Accepting.

despoa: Processing...


TASVideoAgent
They/Them
Moderator
Location: 127.0.0.1
Joined: 8/3/2004
Posts: 17796
Location: 127.0.0.1
This topic is for the purpose of discussing #10585: stochastique's GG Solitaire Poker in 01:42.399
petaQ
He/Him
Joined: 3/8/2018
Posts: 27
Fantastic! Clearly optimised from what I can see as the speedrunner of the game, awesome to hear it's an interesting heuristics puzzle in TASing as well as rta! Easy yes vote.
Darkman425
He/They
Editor, Judge, Expert player (2191)
Location: Texas
Joined: 9/19/2021
Posts: 355
Location: Texas
The link on the submission leads to a 404 error, and the repo I found on your GitHub seems to be currently empty: https://github.com/guiguilegui/SolitairePokerOptimization
Switch friend code: SW-2632-3851-3712
Player (60)
Joined: 3/29/2025
Posts: 2
Darkman425 wrote:
The link on the submission leads to a 404 error, and the repo I found on your GitHub seems to be currently empty: https://github.com/guiguilegui/SolitairePokerOptimization
Good catch, I've made the repo public, thank you!
Post subject: Movie published
TASVideoAgent
They/Them
Moderator
Location: 127.0.0.1
Joined: 8/3/2004
Posts: 17796
Location: 127.0.0.1
This movie has been published. The posts before this message apply to the submission, and posts after this message apply to the published movie. ---- [7276] GG Solitaire Poker by stochastique in 01:42.399

1785151004