and others added 2 commits
Replaces the fixed {s2g, b2b, b2g, s2b} action sequencing with the
prioritized greedy heuristic from Bjarnason, Fern, Tadepalli 2009
("Lower Bounding Klondike Solitaire with Monte-Carlo Planning",
ICAPS-09, pg. 3):
1. tableau -> foundation that reveals a face-down card
2. any other move to a foundation stack
3. tableau -> tableau that reveals a face-down card
4. deck -> tableau
5. foundation -> tableau (not implemented; stub returns false)
6. tableau -> tableau that does not reveal a face-down card
After each move, action selection restarts from priority 1, so an
ace exposed by a board-to-board reveal is sent to the foundation
before any deck play, and so on.
Adds two predicates on Board (columnHasHidden, removeCardWouldReveal)
and splits FromBoard's toBoard / toGoal into reveal / no-reveal
variants that the Player loop selects between.
Measured at --three --attempts 100000 on an M-series Mac:
seed 1111 before 8.637% after 12.188% (+3.55pp, 2:50 -> 1:47)
seed 2222 before 8.465% after 12.202% (+3.74pp, 3:09 -> 2:11)
The cited paper reports 12.992% for its greedy baseline on 1M games.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…antics - toBoardReveal/toBoardNoReveal: use removeCardWouldReveal(king) for king moves (playKingFromBoard moves only the king, not the face-up run); columnHasHidden(src) remains correct for playCard run moves. - toGoalReveal: return after first successful play so the Player loop re-evaluates from priority 1, matching the paper's algorithm strictly. - README: 12.188% -> 12.154% (seed 1111, 100k, three-card; within binomial noise of prior measurement).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters