diff options
| author | Tom Harley | 2019-02-17 13:28:15 +0000 |
|---|---|---|
| committer | Tom Harley | 2019-02-17 13:28:15 +0000 |
| commit | b3a3e8bf17dd338ea72ec3f3dbb8f0b9935ee940 (patch) | |
| tree | d6d110cab6e8cbba883ce4e5b40c22beb560b1c2 | |
| parent | Skip voting if majority already established (diff) | |
| download | metasol-b3a3e8bf17dd338ea72ec3f3dbb8f0b9935ee940.tar.gz metasol-b3a3e8bf17dd338ea72ec3f3dbb8f0b9935ee940.zip | |
Reveal stock cards if stock redeals allowed
If stock redeals are allowed, then the player can go through the stock once at the start of the game and reset it, bringing the game back to the original game state. This allows the player to see all cards in the stock, even if the stock isn’t explicitly face-up.
This can be used to reduce the number of voters run, since the stock will not be hidden and fewer reveals means fewer full resets. As such, this optimisation seems to reduce solving time by roughly half.
This optimisation also theoretically increases solvability percentages in affected games, since the system has fewer face-down cards to generate misleading permutations with.
| -rw-r--r-- | metasol.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/metasol.cpp b/metasol.cpp index a8ac83b..e164c97 100644 --- a/metasol.cpp +++ b/metasol.cpp @@ -1011,6 +1011,13 @@ ms_game_state random_game_state(long user_seed, ms_rules *r) { for (unsigned i = 0; i < r->stock_size; ++i) { ms_card c = deck.back(); deck.pop_back(); + + /* + * If stock redeals are allowed, going through the stock once + * reveals its contents without any other consequences. + */ + c.hidden = !r->stock_redeal; + gs.stock.push_back(c); } gs.stock.back().hidden = false; |
