If you like this site, I would appreciate a gift from my wishlist.
Black Hole Solitaire Solver
This is a solver, written in C, to solve the Solitaire variant called “Black Hole”. It provides a portable C library, and a command line application that after being fed with a layout will emit the cards to move to the “black hole” (the foundation).
Download
- black_hole_solver-0.2.0.tar.xz - requires CMake to be built.
- The Games-Solitaire-BlackHole-Solver CPAN Distribution - an older version of the solver written as a proof-of-concept, which produces identical results, but is much slower and consumes more memory.
- black_hole_solver.dump.xz - results from running the solver on the first 1 million PySolFC deals - inside the dump of an SQLite database.
Solving Data
We’ve ran the solver on the first 1 million PySolFC Black Hole Solitaire deals and one can download the data from that as a compressed textual dump of an SQLite database.
Here’s a description of the tables of the database:
-
bhs_runs - this table contains the results and statistics of running the solver on the boards. Its columns are:
- idx - the index of the PySolFC deal.
- status - a character representing the verdict - ‘U’ for unsolved, ‘S’ for solved.
- num_checked - the number of iterations that were checked (“num_times”). If the game was unsolved, then it will be equal to num_generated (see below).
- num_generated - the number of states generated (and not necessarily checked). May only be different if the deal was solved.
-
bhs_solutions - this table contains the compacted solutions for the solved boards. Its columns are:
- idx - the index of the deal (that must be ‘S’ on “bhs_runs”).
- solution - this is the compacted solution. The 0,2,4 etc. characters are the indices of the stacks moved in the range 1-17. The 1,3,5 etc. characters are the corresponding moved cards after calculating chr(1 + $suits_to_n{$s} * 13 + $ranks_to_n{$r}) where the suits are ordered H,C,D,S. It will total 51*2 characters. Here’s the script that was used to generate them from the more verbose solution files.
Project Links
Similar Projects
Licence
The solver is original work and is subject to the terms of the MIT/X11 licence, which is a Public Domain-like open-source licence.
News
Version 0.2.0
Version 0.2.0 of Black Hole Solitaire Solver was released. The highlight of this release is the porting of the solver from Perl to C which yields a very dramatic gain in speed and memory consumption. As a result of this effort, we have run the solver on the first 1 million PySolFC deals of Black Hole Solitaire and have drawn some conclusions:
- Solving Statistics for the First 1 Million PySolFC Black Hole Solitaire Deals
- Follow-up with number of unsolved deals with positions span below a certain threshold
Become master of latest technology with our testking SY0-201 online course. Download the testking 642-813 tutorials and testking 70-680 study guide for easy learning.