# A solver that admits when it doesn’t know

> A Klondike app whose Guaranteed mode deals only games a solver has already won, with a search that answers winnable, unwinnable or unknown instead of guessing.

Source: https://claphamdigital.com/work/solitaire-edge/

Clapham Digital · Case study

In Guaranteed mode, Solitaire Edge deals only games a solver has already won. And when its hint is guessing, it tells you.

---

## What it is

Klondike solitaire where every deal in Guaranteed mode comes from a set a solver has already played through to a win with Standard scoring, in both Draw 1 and Draw 3. “Winnable” here means winnable if you could see every face-down card, because that’s what the solver sees. The coach tells you when a deal can’t be won, and the hint tells you how sure it is. It’s on the [App Store](https://apps.apple.com/us/app/solitaire-edge-klondike/id6811424631) and [Google Play](https://play.google.com/store/apps/details?id=com.solitaireedge.app); the [app page](https://claphamdigital.com/apps/solitaire/) has more.

---

## The hard part

- **Search under a time limit, without lying.** The solver gives one of three answers. Winnable: it found a full solution with every card visible. Unwinnable: it exhausted the search and found no win. Unknown: the time or node budget ran out first, and that isn’t a claim either way.
- **The honesty reaches the player.** When the hint can’t prove a winning line in time, it falls back to a safe move picked by rule and says it’s a guess. The coach tells you whether a deal can still be won. When it can’t tell, it says that too.
- **Fast enough to search.** Generating legal moves dominated the search, so I rewrote it from generate-then-test to direct generation. Measured on positions from real play, the new version is 2.4 times faster. A differential test pins the new version to the old one’s behaviour.

---

## What it means for your project

This is what I want from any AI or automation that touches your business. It should tell you how sure it is, and say “I don’t know” rather than hand you a confident wrong answer. I build for that from the start.

Related: [AI and automation for Columbus businesses](https://claphamdigital.com/ai-automation-columbus/).

---

Have something that needs building, fixing or checking? Email [hello@claphamdigital.com](mailto:hello@claphamdigital.com) or call [(614) 835-7163](tel:+16148357163).

[All case studies →](https://claphamdigital.com/work/)
[Blog →](https://claphamdigital.com/blog/)
