Pills Riddle

Riddle:

Below are twelve pills. Eleven of them are identical, one of the pills is poison

The poisoned pill weighs slightly different than the other pills (heavier or lighter)

You have a scale that can be used only 3 times.

Figure out which one is the poisoned pill.


Extra Space

Extra Space

Pills


Scale 1

Scale 2

Place Poisoned Pill Here: ⇨

Instructions


[ + ]

About This Page

I first came across this riddle on Reddit, and spent a day or two contemplating a solution to the riddle, but to no avail. The closest I came to the solution was an algorithm that got me the right answer most of the time, but left me having to guess every so often, meaning my solution wasn't 100% fullproof. The difficulty of this riddle stems from the fact that you don't know whether the poisoned pill is heavier or lighter than the rest (most people wrongly assume that it's heavier).

This bugged me way more than it should have; after all, the solution was one Google search away, but my pride refused to allow me to search for the solution - I had to figure this one out the old-school way, or else the riddle would win (and I'll be damned if I let a riddle get the better of me!) In order to distract myself from my own failures, I decided to create a digital version of the problem to aid me in my quest to defeat the evil riddle. And so I began working on this page.

What you see above is not the first version of this page (it's more like version 3.12). The first iteration did a good job of simulating the riddle (randomizing the poison pill and its weight), but it was just a pain to use (I dug up the old files, you can see it here.) As you can see, the pills were very skinny and hard to click on, the two sides of the scale (orange and yellow) didn't look like they should be clicked on, and the results of the weighing were hard to read. Overall it was a pain to use, so I started over and made the newer version (let's call it 2.0)

Just when I thought I was done with this project (I still hadn't figured out the solution to the riddle, but the page looked really good), I came up with the idea of dragging the pills from place to place, and once the idea entered my head, merely clicking on the pills to and from different locations seemed extremely arduous. So I spent another two weeks implementing that feature, fixing bugs, and fixing the new bugs I created while removing the previous bugs. The final version of this page still has a few bugs in it, some of which I fixed while typing this out (hopefully I didn't make things worse!)

Long story short (well, I guess I'm making it way longer than it needed to be), I recruited a friend of mine (who happens to be an engineer), and we finally managed to find the perfect, fullproof, works-100%-of-the-time solution to this problem. I'll give you a hint: you need to think outside the box.