# ­xkcd thread

**URL:** <https://boards.straightdope.com/t/xkcd-thread/854574>\
**Category:** Cafe Society\
**Tags:** comic-strips\
**Created:** [May 28, 2020, 12:57am UTC](https://boards.straightdope.com/t/xkcd-thread/854574 "2020-05-28T00:57:03Z")\
**Posts on this page:** 20\
**Page:** 49

<div class="post-metadata">

**Author:** ![GeneralTang](https://avatars.discourse-cdn.com/v4/letter/g/97f17d/32.png) [@GeneralTang](https://boards.straightdope.com/u/GeneralTang)\
**Post date:** [August 21, 2021, 12:27pm UTC](https://boards.straightdope.com/t/xkcd-thread/854574/962 "2021-08-21T12:27:01Z")

</div>

> [@naita](#):
>
> > [@naita](#):
> >
> > I’ve decided to go supernerd on this and create a program in R to generate and solve these … Wish me luck!
> 
> Turns out algorithmically solving even a small puzzle like this is darn hard, and to check that a randomly generated one is solvable the program needs to be able to solve at least a subset of puzzles. 🤪

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.

---

<div class="post-metadata">

**Author:** ![GeneralTang](https://avatars.discourse-cdn.com/v4/letter/g/97f17d/32.png) [@GeneralTang](https://boards.straightdope.com/u/GeneralTang)\
**Post date:** [August 21, 2021, 7:02pm UTC](https://boards.straightdope.com/t/xkcd-thread/854574/963 "2021-08-21T19:02:01Z")

</div>

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]

---

<div class="post-metadata">

**Author:** ![GreenWyvern](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/greenwyvern/32/2834_2.png) [@GreenWyvern](https://boards.straightdope.com/u/GreenWyvern)\
**Post date:** [August 21, 2021, 7:07pm UTC](https://boards.straightdope.com/t/xkcd-thread/854574/964 "2021-08-21T19:07:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![naita](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/naita/32/5862_2.png) [@naita](https://boards.straightdope.com/u/naita)\
**Post date:** [August 22, 2021, 8:00pm UTC](https://boards.straightdope.com/t/xkcd-thread/854574/965 "2021-08-22T20:00:18Z")

</div>

Nice!

---

<div class="post-metadata">

**Author:** ![engineer\_comp\_geek](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/engineer_comp_geek/32/504_2.png) [@engineer\_comp\_geek](https://boards.straightdope.com/u/engineer_comp_geek)\
**Post date:** [August 22, 2021, 8:32pm UTC](https://boards.straightdope.com/t/xkcd-thread/854574/966 "2021-08-22T20:32:47Z")

</div>

**Moderator Note**

> [@GeneralTang](#):
>
> Please find xkcd-like minesweeper problem maker attached.

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

---

<div class="post-metadata">

**Author:** ![GeneralTang](https://avatars.discourse-cdn.com/v4/letter/g/97f17d/32.png) [@GeneralTang](https://boards.straightdope.com/u/GeneralTang)\
**Post date:** [August 23, 2021, 7:40am UTC](https://boards.straightdope.com/t/xkcd-thread/854574/967 "2021-08-23T07:40:06Z")

</div>

woops.

Okay, I’ve put it on google drive: [minesweeper\_solver.py - Google Drive](https://drive.google.com/file/d/10fJ_AjL6hBDkW3PFbqsnG4xZ8tZBB914/view?usp=sharing)  
Should I make a new topic for this?

---

<div class="post-metadata">

**Author:** ![MrDibble](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/mrdibble/32/114_2.png) [@MrDibble](https://boards.straightdope.com/u/MrDibble)\
**Post date:** [August 23, 2021, 3:42pm UTC](https://boards.straightdope.com/t/xkcd-thread/854574/968 "2021-08-23T15:42:11Z")

</div>

> [@Chronos](#):
>
> …And I just looked it up. Neither olivine nor feldspar even has a single chemical formula.

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 - feldspar **s**. That needs 2 solid solution formulae, really.

---

<div class="post-metadata">

**Author:** ![dtilque](https://avatars.discourse-cdn.com/v4/letter/d/d6d6ee/32.png) [@dtilque](https://boards.straightdope.com/u/dtilque)\
**Post date:** [August 24, 2021, 1:59am UTC](https://boards.straightdope.com/t/xkcd-thread/854574/969 "2021-08-24T01:59:25Z")

</div>

> **[Projecting](https://xkcd.com/2506/)**
>
> This is something we all need to work on, but especially you all.

Where is a slide projector when you need one?

---

<div class="post-metadata">

**Author:** ![dtilque](https://avatars.discourse-cdn.com/v4/letter/d/d6d6ee/32.png) [@dtilque](https://boards.straightdope.com/u/dtilque)\
**Post date:** [August 25, 2021, 10:30pm UTC](https://boards.straightdope.com/t/xkcd-thread/854574/970 "2021-08-25T22:30:07Z")

</div>

> **[USV-C](https://xkcd.com/2507/)**
>
> Ultra-Serial Violet C light is unpolarized, so you don't have to flip the polarizing filter over when you get the orientation wrong the first time.

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

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [August 26, 2021, 12:19pm UTC](https://boards.straightdope.com/t/xkcd-thread/854574/971 "2021-08-26T12:19:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![k9bfriender](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/k9bfriender/32/3283_2.png) [@k9bfriender](https://boards.straightdope.com/u/k9bfriender)\
**Post date:** [August 26, 2021, 12:20pm UTC](https://boards.straightdope.com/t/xkcd-thread/854574/972 "2021-08-26T12:20:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![smithsb](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/smithsb/32/12107_2.png) [@smithsb](https://boards.straightdope.com/u/smithsb)\
**Post date:** [August 27, 2021, 12:57pm UTC](https://boards.straightdope.com/t/xkcd-thread/854574/973 "2021-08-27T12:57:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dtilque](https://avatars.discourse-cdn.com/v4/letter/d/d6d6ee/32.png) [@dtilque](https://boards.straightdope.com/u/dtilque)\
**Post date:** [August 28, 2021, 3:52am UTC](https://boards.straightdope.com/t/xkcd-thread/854574/974 "2021-08-28T03:52:06Z")

</div>

> **[Circumappendiceal Somectomy](https://xkcd.com/2508/)**
>
> Some personal news: After treating my first case a few years ago with antibiotics, I can report that I have now had appendicitis for the second and--unless something extremely unexpected happened with the surgery--final time.

---

<div class="post-metadata">

**Author:** ![dtilque](https://avatars.discourse-cdn.com/v4/letter/d/d6d6ee/32.png) [@dtilque](https://boards.straightdope.com/u/dtilque)\
**Post date:** [August 31, 2021, 2:24am UTC](https://boards.straightdope.com/t/xkcd-thread/854574/975 "2021-08-31T02:24:57Z")

</div>

> **[Useful Geometry Formulas](https://xkcd.com/2509/)**
>
> Geometry textbooks always try to trick you by adding decorative stripes and dotted lines.

---

<div class="post-metadata">

**Author:** ![Andy\_L](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@Andy\_L](https://boards.straightdope.com/u/Andy_L)\
**Post date:** [August 31, 2021, 11:22am UTC](https://boards.straightdope.com/t/xkcd-thread/854574/976 "2021-08-31T11:22:52Z")

</div>

Heh! That’s diabolical.

---

<div class="post-metadata">

**Author:** ![Ponderoid](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ponderoid/32/19221_2.png) [@Ponderoid](https://boards.straightdope.com/u/Ponderoid)\
**Post date:** [August 31, 2021, 1:18pm UTC](https://boards.straightdope.com/t/xkcd-thread/854574/977 "2021-08-31T13:18:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![robby](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/robby/32/11048_2.png) [@robby](https://boards.straightdope.com/u/robby)\
**Post date:** [August 31, 2021, 2:53pm UTC](https://boards.straightdope.com/t/xkcd-thread/854574/978 "2021-08-31T14:53:29Z")

</div>

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. 🙂

Then the mouseover text made more sense.

---

<div class="post-metadata">

**Author:** ![Pleonast](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/pleonast/32/1183_2.png) [@Pleonast](https://boards.straightdope.com/u/Pleonast)\
**Post date:** [August 31, 2021, 2:59pm UTC](https://boards.straightdope.com/t/xkcd-thread/854574/979 "2021-08-31T14:59:37Z")

</div>

> [@Ponderoid](#):
>
> Randall could have factored out the b in the upper right equation.

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.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [August 31, 2021, 8:09pm UTC](https://boards.straightdope.com/t/xkcd-thread/854574/980 "2021-08-31T20:09:05Z")

</div>

…And I only just now fully got it.

---

<div class="post-metadata">

**Author:** ![Pleonast](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/pleonast/32/1183_2.png) [@Pleonast](https://boards.straightdope.com/u/Pleonast)\
**Post date:** [August 31, 2021, 9:03pm UTC](https://boards.straightdope.com/t/xkcd-thread/854574/981 "2021-08-31T21:03:00Z")

</div>

> [@Chronos](#):
>
> And I only just now fully got it.

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

[Previous page](https://boards.straightdope.com/t/xkcd-thread/854574.md?page=48)

[Next page](https://boards.straightdope.com/t/xkcd-thread/854574.md?page=50)
