Bug 424261 - Golf reports inconsistent solver hints
Summary: Golf reports inconsistent solver hints
Status: CONFIRMED
Alias: None
Product: kpat
Classification: Applications
Component: solver (other bugs)
Version First Reported In: 20.04
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Stephan Kulow
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-15 20:35 UTC by Maciej Stanczew
Modified: 2023-02-28 15:23 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Stanczew 2020-07-15 20:35:01 UTC
SUMMARY
Golf will sometimes switch from "This game cannot be won" or "This game is no longer winnable" to "This game is lost". This can be annoying because the latter hint is shown even if solver is disabled in the menu. The behavior is different with standard solver and with Black Hole solver.

When using Black Hole Solver, the game will at some point switch from "This game cannot be won" to "This game is lost" hint, even if there are still cards in the deck (or "talon" in BH terminology). This can result in the hint being shown in the middle of the game even with solver disabled.

When compiled without BH_SOLVER the behavior is better, although still not completely consistent:
* An unwinnable game will produce "This game cannot be won" for the entire game. With solver disabled this will result in no message shown at any point in time.
* A winnable game that is purposely lost will first show "This game is winnable", then "This game is no longer winnable", and only after dealing all cards from the deck will it change to "This game is lost". With solver disabled only the last message appears at the end.

STEPS TO REPRODUCE
1. Start a winnable/unwinnable game of Golf
2. Set Enable Solver to OFF in the menu
3. Play the game and purposely lose it

OBSERVED RESULT
1. Winnable game without BH solver: message "This game is lost" appears after dealing all cards from the deck.
2. Unwinnable game without BH solver: no solver hints appear.
3. Any game with BH solver: message "This game is lost" appears at a seemingly random place in the middle of the game.

EXPECTED RESULT
Without BH solver: either the message "This game is lost" appears always when all cards are dealt from the deck (and the game cannot be won at that point), or the message doesn't appear at all when solver is disabled.
With BH solver: the behavior should be the same as with standard solver. Most importantly, "This game is lost" should not appear in the middle of a game.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.19.3
KDE Frameworks Version: 5.72.0
Qt Version: 5.15.0

ADDITIONAL INFORMATION
Comment 1 Stephan Kulow 2023-02-28 15:23:21 UTC
A bit disappointing that I get this bug. The switch to BH was accepted on the commision that Shlomi becomes maintainer.