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

Isn't the solver algorithm too complicated? #5

Open
faulesocke opened this issue Nov 25, 2019 · 2 comments
Open

Isn't the solver algorithm too complicated? #5

faulesocke opened this issue Nov 25, 2019 · 2 comments

Comments

@faulesocke
Copy link

Wouldn't it be easier to just generate a regular mine field (with all the usual tricks of course), where all mines have pre-determined positions and then implement your additional rules on top of that? For example, if the player clicks on an empty field but he can not know yet that it's empty he looses.

This should work since the set of all non-loosing moves in your game is always a subset of the set of all non-loosing moves in classic minesweeper.

With this you can abandon the SAT solver and all that complicated logic around it.

@pwmarcz
Copy link
Owner

pwmarcz commented Nov 25, 2019

With your proposal, wouldn't I need to know what are the "fields the player can/cannot know are empty"? And to determine that, I need some kind of reasoning engine anyway, even if it's brute-forcing all the possibilities. So it wouldn't be so different.

Additionally, there is one interesting implication of the current setup: in the case of guessing, the player is able to influence the game somewhat (by choosing a field and forcing it to be empty). This is what makes it truly different from a normal "pre-determined" minesweeper. There is no hidden state anymore, and you could argue the game becomes a complete information game (with human and computer as players), like chess or go.

I think the main source of complication is 1. treating boundary and non-boundary differently, 2. caching past results. These are performance optimizations, and perhaps with a different algorithm they would not be necessary.

@chdoc
Copy link

chdoc commented Nov 27, 2019

Additionally, there is one interesting implication of the current setup: in the case of guessing, the player is able to influence the game somewhat (by choosing a field and forcing it to be empty). This is what makes it truly different from a normal "pre-determined" minesweeper. There is no hidden state anymore, and you could argue the game becomes a complete information game (with human and computer as players), like chess or go.

Indeed, this is what currently motivates me to come back to this game again and again: I'm trying to understand what's a good strategy for forcing empty fields. Due to the complete information, this is actually more a psychology question than an algorithms question. I find the SAT solver to be much more reliable than me when doing "parity" arguments along long boundary regions. So I try to force fields that allow me to subsequently apply simple reasoning steps.

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

3 participants