­xkcd thread

I’m just seeing this post now…

Generating a set of hints and checking it is solvable definitely sounds hard, but shouldn’t it be really easy to just generate the problem (randomly place mines and then generate the hints)?

Now I’m interested and want to write this, and an automatic solver.

EDIT: I just realized why this is hard. The problem is figuring out the minimal number of hints such that the problem is solvable.

I did it. Please find xkcd-like minesweeper problem maker attached. I had to allow hints of ‘0’ or else the solutions would not be unique.

Code is written in pure python 3, and is attached. Just run it, and type ‘help’ into the resulting prompt for instructions. [moderator note - attachment removed]

Huh! I didn’t know that you could upload code files.

Nice!

Moderator Note

We do not allow attachments here. Please do not do this again.

woops.

Okay, I’ve put it on google drive: minesweeper_solver.py - Google Drive
Should I make a new topic for this?

Something like (Mg2+, Fe2+)2SiO4 is a perfectly valid kind of chemical formula for minerals in solid solution. Natural minerals are not usually pure end-members of their solid solution series. Not even in any single crystal.

Of course, it’s more complex for feldspars. But note what I said there - feldspars. That needs 2 solid solution formulae, really.

Where is a slide projector when you need one?

Should be a “reverse the polarity” joke in there somewhere.

Years back, someone on this board mentioned that they’d flipped over the plug on their lamp and plugged it in the other way, and now it emits antiphotons.

That’s why one prong on the outlets is larger than the other, to prevent exactly such situations.

The switch in the lamp accomplishs the same thing as flipping the plug. It sucks the light out of the room making it dark in one position. The other position pumps out light to illuminate the room. Unassaleable.

Heh! That’s diabolical.

Randall could have factored out the b in the upper right equation.

Took me a second to get this one…the key was the first formula:

Me: isn’t that the area of a circle, not a sphere? Ohhhh. :slightly_smiling_face:

Then the mouseover text made more sense.

That would break the flow. Each panel is only slightly more weird than the previous. Upper left: quirky but legit. Upper right: oh, I see what’s going on. Lower left: take it a step further. Lower right: pure torture.

…And I only just now fully got it.

He’d done better with a Flatland quip for the mouseover.