From b3a3e8bf17dd338ea72ec3f3dbb8f0b9935ee940 Mon Sep 17 00:00:00 2001 From: Tom Harley Date: Sun, 17 Feb 2019 13:28:15 +0000 Subject: 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. --- metasol.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'metasol.cpp') 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; -- cgit v1.2.1