Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use MinimalKlondike to solve any deal in the GreenFelt database #1

Open
clemente213 opened this issue Apr 14, 2023 · 6 comments
Open

Comments

@clemente213
Copy link

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.

@ShootMe
Copy link
Owner

ShootMe commented Apr 14, 2023

No special tools, just looked through chromes debugging real quick to see if I could find anything. Found where the seed gets used to 'shuffle' the 52 cards and was able to reproduce it.

private struct GreenRandom {

@clemente213
Copy link
Author

I just ran the Klondike.exe on Seed #4.

This was the only solvable deal that I have played on GreenFelt that I was unable to solve myself over the course of thousands of deals. I kept trying to solve #4 because the HighScores for this deal displayed that a player name Mikro solved this deal on 2012/09/02. Nobody else has succeeded in solving it and your MinimalKlondike confirms that it is unsolvable. I always suspected that there must have been a bug in the code in 2012 that falsely recorded a solution.

@ShootMe
Copy link
Owner

ShootMe commented Apr 14, 2023

Yea makes sense. I also updated the zip again since I forgot an important setting. Added in the ability to specify the maximum amount of states to go through, since some deals can blow up and require millions of states to solve minimally.

It defaults to 50 million states which usually solves 90% of deals just fine, but if you encounter a deal that solves as 'Unknown' you can increase it with
-S #

Just have to make sure you have enough extra ram. every 22 Million is about 1GB in ram. I've had to go up to 800 million in one deal.

@clemente213
Copy link
Author

That was from me a year ago in this issue thread: ShootMe/Klondike-Solver#14

During the past year, I have entered and run about another 60 deals into KlondikeSolver.exe and never encountered that problem again...it has only occurred once in about 120 runs.

Will you be posting the source code for MinimalKlondike with the GreenFelt enhancements? I am inspired to study how you achieved such mastery so quickly. Were you already familiar with the GreenFelt website?

When I play Microsoft grandmaster level deals, I have the advantage of knowing in advance that a solution exists. This motivates me to keep trying and I have never failed in solving a grandmaster deal (although I have had to use KlondikeSolver on a few occasions after randomly selecting the identity of the few remaining face-down cards).

With your GreenFelt enhancements to MinimalKlondike, I can run a Seed# that has not been solved in Klondike.exe and confirm that the deal is solvable before wasting time trying to solve an unsolvable deal. That provides a tremendous benefit using the GreenFelt website and I am extremely grateful for your accomplishment.

@ShootMe
Copy link
Owner

ShootMe commented Apr 14, 2023

Very cool :)

The source code is available for it, that's what I linked above. It will bring you to the spot in code where I added the GreenFelt shuffle.

I was not familiar with it, but luckily was able to find how they shuffled the cards.

@clemente213
Copy link
Author

Check the High Scores at this link: https://greenfelt.net/klondike?game=163351715

This is a dangerous weapon that you have unleashed! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants