

Show HN: Diff Collection Game - mkagenius
http://mkagenius.github.io/

======
jsnell
So there's two reasonable strategies. One is to maximize the score per action
by doing the mental arithmetic to determine whether you can still add the
current number to the larger number and maximize the diff, or whether you need
to add it to the smaller one. The other is to simply maximize the number of
actions by always clicking on the smaller of the two numbers which requires
much less cognitive effort.

I tried both strategies, and on clean runs got scores of 266 (maximize score
per action) and 270 (maximize action count). It's a bit unsatisfying that the
dumb strategy can be effective. I think you'd need to be only about 30% faster
when executing the simple action than the complicated one to break even.

Maybe it'd make sense to make the scoring rule non-linear? E.g. instead of
0/2/4/6/8 points give 0/1/2/4/8.

~~~
zzleeper
Well if 8 comes up the correct solution is to click the smaller number, so you
can just do the math for 2-4-6

~~~
sethhovestol
But you still need to recognise the 8, speed you don't even look for the
number

------
kenrick95
Nice game, though you can wrap all your JS in an anonymous function to disable
direct access by the user (i.e. the bot written by axemclion won't work
anymore); but one can still trigger "left press" and "right press" keyboard
event, so be aware.

Another thing is, this game does not work on mobile because mobile user cannot
use keyboard to trigger the actions; maybe give those two boxes clickable?

~~~
mkagenius
Good idea about javascript. Thanks.

Forgot to mention: You can swipe on mobiles, I had already added it :)

------
axemclion
How about this bot - var timer =
window.setInterval(function(){parseInt($('#ltext').text()) >
parseInt($('#rtext').text()) ? rightPressed() :
leftPressed();},1);window.setTimeout(function(){window.clearInterval(timer)},60000)
?

Getting a huge score, but the server is overloaded, so cannot post high scores
:P

~~~
axemclion
Oh, and the server does not have CORS enables, so cannot save my score :(

~~~
mkagenius
Hi! It has CORS support for GET request, make sure you use GET.

Also, please let me know if you get high score, this is only meant for humans
;)

------
jpmoral
Doesn't seem to be working for me. Firefox 39 on OS X.

~~~
mkagenius
Sorry about that. Maybe its going for HTTPS somehow.

Try [http://mkagenius.github.io/](http://mkagenius.github.io/) without the
https.

~~~
cxam
The issue is that your jQuery library is loaded over http and fails since it's
a different protocol from the main site. More info regarding this here:
[https://developer.mozilla.org/en-
US/docs/Security/MixedConte...](https://developer.mozilla.org/en-
US/docs/Security/MixedContent#Mixed_active_content)

To fix, simply change [http://cdnjs](http://cdnjs) to _/ /cdnjs_ to make your
request protocol independent.

~~~
mkagenius
Thanks. Pushed it. It may take 5 minuted for cdn cache to reflect.

~~~
jpmoral
It's working now. Fun game!

------
mkagenius
Top 11 so far:

(1) 678 (2) 306 (3) 292 (4) 280 (5) 278 (6) 274 (7) 270 (8) 268 (9) 268 (10)
266 (11) 266

~~~
hughdbrown
So someone tried it once and got a score higher than the next two combined? I
am calling shenanigans. And I got the 280.

~~~
mkagenius
:) Most probably that's a bot. I have the gameplay logs, I will dig it and
find out.

Till then, lets consider 2nd place as the best.

Edit: 1st Place seems genuine.

Edit2: Here is his/her logs:
[https://github.com/mkagenius/mkagenius.github.io/blob/master...](https://github.com/mkagenius/mkagenius.github.io/blob/master/README.md)

Edit3: Actually, can't say if its a bot or not unless someone accepts it.

------
gren
addictive game

~~~
mkagenius
Wow! Thank you so much. So glad you liked it.

