
MonkeySort (2012) - apsec112
http://leonid-shevtsov.github.io/monkeysort/
======
fpanettieri
Interesting read!

I find it funny how we approach this same problem every ~5 years.
([https://stackoverflow.com/questions/164831/how-to-rank-a-
mil...](https://stackoverflow.com/questions/164831/how-to-rank-a-million-
images-with-a-crowdsourced-sort))

I recently implemented a similar tool to help my team decide which brand and
art references to use => [http://refsort.com/](http://refsort.com/)

One big difference is that I focused on subjective topics, where there is no
absolute 'correct' or 'better' option. In that case I think transitivity could
actually decrease the quality of the result, so more 'brute force' is
required.

I could probably implement this algorithm in a branch and see what happens :)

------
luizfzs
Was I the only one that clicked on 'better' every time because it was actually
the word requested on the statement?

------
fhood
My god! In the end _I_ was the monkey.

~~~
mlthoughts2018
It was Earth all along...

------
logfromblammo
With the default list, one is eventually asked "Which one is better?" with the
options "best" and "better".

Obviously, I'd choose the exact match.

~~~
wumms
"Do you want to cancel?" <OK> <Cancel>

------
dsamarin
I made this[0] a while back as an implementation of merge sort in JavaScript
with continuation passing style. His seems very similar but uses quicksort.
Surprising since merge sort has fewer comparisons than quicksort's average
case[1]. Why exactly does he use a matrix to store the comparisons?

[0]:
[https://jsfiddle.net/dsamarin/hgdjwtck/](https://jsfiddle.net/dsamarin/hgdjwtck/)
[1]: [https://stackoverflow.com/questions/8535540/exactly-how-
many...](https://stackoverflow.com/questions/8535540/exactly-how-many-
comparisons-does-merge-sort-make)

------
SketchySeaBeast
I've tried it in Chrome, Firefox, and Edge and has script errors in Chrome and
Firefox, and just doesn't work in Edge.

~~~
MagnificentSpam
In firefox you can click the site security information thing in the address
bar and then select "Disable protection for now". My firefox sets the Upgrade-
Insecure-Requests header and loads the https site instead, I guess that's what
makes the difference between browsers.

~~~
SketchySeaBeast
Yup, that worked!

------
sannee
Does this avoid asking questions that would make the relation not a partial
ordering? Is it even possible to implement that?

~~~
gnulinux
Yes, you can store old answers and report error when one of the axioms of
poset is violated.

------
anderskaseorg
A Ford–Johnson merge-insertion sort would need 28% fewer comparisons on
average than the quick sort used here.

[https://en.wikipedia.org/wiki/Merge-
insertion_sort](https://en.wikipedia.org/wiki/Merge-insertion_sort)

------
ballenf
Would love to see the list order visually during the questions phase.

But regardless, this is useful for teaching sorting to help understand the
comparison function's role that is passed into a sort routine.

------
moreira
I love this, I've used it for years any time I need to rank things, since
having to pick my preference between different options is much more accurate
than giving them arbitrary numbers.

------
zentiggr
I think an Android app called Prioritize Me did something functionally
similar. Haven't looked it up again recently.

------
ggchappell
Here we go again: the latest in a long line of sites that I can't figure out,
while lots of others comment "cool".

I click "Sort it". Nothing happens. <sigh>

For all those silent folks who are just like me: know that you are not alone.

~~~
eertami
Q: How do you tell if someone doesn't use Javascript?

A: They will tell you.

