• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Solitaire solver

Grinder

More time posting than coding
Joined
Feb 2, 2009
Messages
448
Likes received
0
Thanks received
0
Location
Essex
Has anyone ever seen a 'smart' solitaire (or 'patience' as I call it) game?

I was wondering why no one had written a game that tells you at the start if the game is solvable (or is it soluable?), and warns you if you make a wrong move.

:nerd For me it would be interesting to know the proportion of patience games that will not play to a 52 card victory, and the proportion that will yield >$0, based on Vegas rules.

I started to write one in Excel VBA, but only got as far as shuffling the deck and dealing out the cards. I was working on the rules for moving cards when I lost interest.

Any ideas / thoughts?
 
I think this is actually a rather hard program to write because the combinations of moves is huge. Using something like prolog is probably the best way to approach it, but then you would have to mangle your head to be able to program in it! Basically prolog would traverse the decision tree and let you know if it managed to sort it all. Painful to program, but probably less so than other languages, no idea how long it would take to run for a full deck though.
 
stick it up on rent-a-coder an some Indian chappie will code it in 10 minutes for a $1.

HTH
 
I was planning to use recursion, thus avoiding the issue with 'number of combinations' - like route-finding software really.

Sending it to India - would that be solving it with 'excursion'? :)
 

Advertisers

Back
Top