| Age | Commit message (Collapse) | Author | Lines |
|
In Solvitaire, going through the stock in stock-waste games is bundled
with the move out of the waste, in what's called a k-plus move. This
makes sense in Solvitaire, but in this system having each stock move be
explicit helps because it itemises all moves similarly, making shaving
off single moves easy.
The `calculate_stock_moves` function uses a simulation rather than a
simple calculation, which has a couple of downsides:
1. it's slower than a calculation;
2. it loops infinitely when given an index that's impossible to reach.
|
|
The solver can now solve a Klondike deal! Use seed 5 to generate a deal
that seems to always be solvable.
|
|
Previously, if a game had a tableau but was not diagonal-deal, it would
only place one card in each tableau. Now, all left over cards are dealt
to each each tableau pile, evenly split.
|
|
Game rules can now be read from .json files passed as argument with
`-r`/`--rules` on the command-line. The rules descriptions are built on
top of sane default rules, so some rules can be omitted.
Without a rules file specified, `centre` plays canfield.
|
|
I promise it works this time
|
|
Piles of cards can now be read from `.json` files using the
`--game`/`-g` flag, although the solver doesn't seem to like them.
Currently, cards mentioned in these files are all face-up, which means
that they aren't particularly useful for building whole games and more
just test cases.
Also added command-line options parsing, including accepting
randomisation seeds from the `--seed`/`-s` option.
|
|
All solvitaire content has been shoved into a subdirectory to tidy up
the root of the project. This also means solvitaire is treated similarly
to other dependencies of the project, and allows other dependencies to
be added easily.
There's also a lot of other work done here, such as usign a thread pool
library to manage the running of the voters.
|
|
The code that used to reside in `metasol.cpp` has been split between
`metasol.h`, `centre.cpp`, and the original file.
|
|
It seems to be consistently running to completion successfully!
It's been renamed to `metasol` for now, since that's a better name than
`test`.
Next step will probably be eliminating the namespace pollution in
`metasol.cpp`.
|