News for hackers. Stuff that matters.
Re:Chess: Who will win in this riveting game of Math.random(... by chrisoakman on Sunday January 25, 2015 @08:02PM (#8945014)
Never thought this comment would end up on HN when I wrote it ;)

I remember writing this example and being mesmerized watching the games progress. I think I made an alternate version that speed up the time and opened a handful of browser tabs to watch the games. Most of them do end up in insufficient piece draws or the 50-move rule.

Glad to see others are enjoying it :)

Re:Chess: Who will win in this riveting game of Math.random(... by cperciva on Monday January 26, 2015 @02:19AM (#8945897)
I think I made an alternate version that speed up the time and opened a handful of browser tabs to watch the games. Most of them do end up in insufficient piece draws or the 50-move rule.

I also made an alternate version which runs faster, and I added some code to count games. About an hour on Chrome got me to this point:

    44 white wins.
    415 ties.
    41 black wins.
    500 games played.
EDIT: Another hour, and the stats are now:

    74 white wins.
    847 ties.
    79 black wins.
    1000 games played.
Re:Chess: Who will win in this riveting game of Math.random(... by annnnd on Monday January 26, 2015 @08:00AM (#8946745)
4 hours later, how does it look now?

I would expect that white/black position would be very similar in results (for random games only, of course).

Re:Chess: Who will win in this riveting game of Math.random(... by cperciva on Monday January 26, 2015 @12:05PM (#8948085)
I stopped it running after 2 hours.
Re:Chess: Who will win in this riveting game of Math.random(... by PhoenixWright on Monday January 26, 2015 @12:34AM (#8945654)
Surprised nobody has responded to you. Good job, I really enjoyed seeing your work.