shootme / minimalklondike Goto Github PK
View Code? Open in Web Editor NEWMinimal solver for the game of Klondike Solitaire, also known as Patience.
License: MIT License
Minimal solver for the game of Klondike Solitaire, also known as Patience.
License: MIT License
thanks for sharing this solution , but I hava some questions.
1.How to make sure this is the minimum solution?
2.It's hard for me to understand the solve process , Can share your thinking?
thanks.
ShootMe stated in a previous thread:
"Go ahead and redownload the zip. I added a way to just specify a seed from GreenFelt
Klondike.exe Seed#
Will solve that given seed. You can also specify -D 3 if you want to solve the draw 3 variant"
Wow...pure genius...but you just opened the door to cheating on GreenFelt on a massive scale!
How were you able to retrieve the starting positions of the full 52 card deal? I previously tried inspecting the html code to retrieve the deal order without any success. Do you have access to some sophisticated html debugging software? To my knowledge, nobody who uses the GreenFelt site has ever succeeded in breaking the html code to retrieve the deal order.
Hello ShootMe
I discovered a counterexample to MinimalKlondike finding the fewest possible moves for any deal, including unsolvable deals. The link is https://greenfelt.net/klondike?game=2095819838.
MinimalKlondike finished the search with a score of 10 in 54 moves. The "high scores" button shows a score of 10 in 53 moves. This may be a trivial counterexample but I thought you might be interested. It is my understanding that MinimalKlondike performs an exhaustive search of all possible moves. In this particular case, a move was saved by not playing the 4-hearts onto the 5-clubs.
Thanks to MinimalKlondike, the skills that I have acquired improve daily and the joy that I experience playing Klondike exceeds my expectations.
this is my klondike command : Klondike.exe 062122133041014042081034084111053124132083091113022071074023082033131021061104043064092054134
this is my cards : 6D,??,??,??,??,??,??,
QD,??,??,??,??,??,??,
KH,??,??,??,??,
4C,??,??,??,
AS,??,??,
4D,??,
8C,
and this is deck(drawing cards) : 3S,8S,JC,5H,QS,KD,8H,9C,JH,2D,7C,7S,2H,8D,3H,KC,2C,6C,10S,4H,6S,9D,5S,KS
when I run command witout initial move. it gives this output : Klondike.exe 062122133041014042081034084111053124132083091113022071074023082033131021061104043064092054134
Deal: 031112012094033022071023111021072032122104064121043062044133061024073114082052054083102134124074132013081053092011113084034103091014051063042093131101123041
A B C D E
F G H I J K L
+3C JD AD 9S 3H 2D 7C
+2H JC 2C 7D 3D QD
+TS 6S QC 4H 6D
+4S KH 6C 2S
+7H JS 8D
+5D 5S
+8H
TD KS QS 7S KD AH 8C
5H 9D AC JH 8S 3S TH
9C AS 5C 6H 4D 9H KC
TC QH 4C
Moves: IK KI @ak @@@al @@AE GE @@@@ab AH HG @@ag JG IG IB FB JF AJ @@ah @ah @ad LI IK @@ak @@@ai @AJ @@ab AI LK LH LD AJ AK AB AD JF KI AK AF JF JE KF KE FE FB IL IE KG LI HL HC KC GC GD IC GC ID GD GE IC FC ID GD IE LC GC ID GD IC GC ID LI LC LB FB FE IB FB IE FE IB FB IE FE IB AC AD AD
(Deal Result: Minimal Foundation: 52 Moves: 110 Rounds: 1 States: 3272426 Took: 00:00:08.9502218)
Done 00:00:09.1256026 in description you said + represents visible card but I dont have 3c at my screen. and my game version does'nt allow undo action. Here is the screenshot of fresh game .
in moves it says IK KI it means table4 to 6 but you cant move 4C to 4D
any help appreciated.
Hello ShootMe
MinimalKlondike is amazing on GreenFelt. As I told you previously, I have used it hundreds of times to only attempt to solve deals that are actually solvable.
My understanding is that the your code will often require a lengthy time to find the minimal solution. It would be a great timesaver if, prior to searching for the minimal solution, the code outputs a message informing the user that the deal is solvable.
Thanks for your assistance.
Hello ShootMe
Would you please run this command line on MinimalKlondike with a sufficiently large value for -S option to generate a solution.
klondike -S 500000000 1492773577
The above command line ran on my laptop for several hours without a solution while using the maximum available memory on my 16GB system.
This deal is solvable as evidenced at https://greenfelt.net/klondike?game=1492773577.
Please post the solution and the value used for -S option.
Thanks for your assistance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.