Live data from Hacker News

Chess: Who will win in this riveting game of Math.random() vs. Math.random()?

chessboardjs.com

111–120 of 131 posts

Re: Chess: Who will win in this riveting game of Math.random() vs. Math.random()?

#111

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 :)

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…

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() vs. Math.random()?

#112
post #91

Earlier quoted context omitted.

I still don't know how to checkmate with two bishops. I mean, I've read how to do it, but if you stuck me in an endgame situation, I'd probably draw. Luckily, I have never actually had an endgame with a king and two bishops versus a king. Same thing with king, knight, and bishop.

I have a humble level and did checkmate both with two bishops and with bishop and knight... yes, I've found both finals. I had learned the mecanics years before, didn't remember exactly how, but it wasn't so difficult to find the path with enough time. What I don't want to find is queen vs. rook. I played once queen and pawn vs. rook and won, but it was painful . It seems there are some masters that are specialists i…

The mate King-Bishop-Night vs. King is a bit elaborate.

From a random position on the keyboard, you typically need around 20-25 moves to achieve it, and there is a rule that draws a game after 50 moves without any pawn moves.

I've seen an International Master offer draw to his opponent in KNB + K game because he didn't remember what the winning method was (I suposo that after 5+ hours playing your eroded mindset also plays a role.

Re: Chess: Who will win in this riveting game of Math.random() vs. Math.random()?

#113
post #46
post #7

Because check mate is a very small subset of possible moves at the end game, I'm guessing the vast majority of games will end(?) with 2 kings moving around randomly for all of time. This assumes most games will make it past the hump of mid game where its possible the king's motion will be limited and a checkmate can erroneously happen, I suspect this is a rare case as well. On a side note I wonder what kind of useful…

It's not just random vs random. Two extremely weak players will take hours to finish a won game, because the player with the major material advantage does not know how to win! When teaching kids, it's not uncommon to, after teaching them how to move all the pieces, spend time teaching them how to perform the most basic of mates: KQ vs K, KRR vs K, KR vs K. Only after those three are mastered we have a good opportunit…

regarding the teaching thing, there's a book that wonderfully describes part of the process behind the "incremental learning", it's not a chess book btw. The book is "The Art of Learning" of Josh Waitzkin.

Really wonderful and insightful book. There's a small part about his vision in how to teach chess and in that part he also shares why he believes it's better to avoid the "learn all the rules than play" but instead to learn the rule incrementally by using actual pieces on the chess table in the most simple situations (2 or 3 pieces max). Then increase the complexity by adding pieces.

Obviously I'm going by memory so I might be a little incorrect into the explanation, but if you love the subject of learning and the subject of chess, the book is worth a look (in fact I'd advise to read the book to almost anyone).

Re: Chess: Who will win in this riveting game of Math.random() vs. Math.random()?

#115

Earlier quoted context omitted.

Uh, zero?

Probably, but is it that obvious? Having an opponent that is not even trying to win is much harder to predict. I've heard several poker players saying that it's hard to play against novices, because they do nonsense. Surly there is some game theory that says something about this. Anyone?

I wouldn't have thought so, because there isn't the same element of unknown information that there is in poker (i.e. I don't know your hand in Poker), but I know the board and if you're just playing random moves, then I can probably use some variation of Scholars mate to end the game early. (some beginners keep playing it until they finally reach a level that their opponents know how to defend against it)

Re: Chess: Who will win in this riveting game of Math.random() vs. Math.random()?

#116
post #79

Earlier quoted context omitted.

This is a drawn game according to the rules of chess, since checkmate is impossible. Other draw conditions include: * Stalemate (=The side to move has no legal moves) * 50 moves in a row without any permanent changes happening ("permanent changes" means a pawn moving or a piece being captured) * Exactly the same game state occurs for the third time ("game state" is whose turn it is + status of castling ability + stat…

As I understand it, the threefold repetition rule does not mandate a draw, it just allows either player to claim a draw upon occurrence.

That's right, see article 5.2.d under the FIDE Laws of Chess:

http://www.fide.com/component/handbook/?id=171&view=article

Re: Chess: Who will win in this riveting game of Math.random() vs. Math.random()?

#117
post #7

Because check mate is a very small subset of possible moves at the end game, I'm guessing the vast majority of games will end(?) with 2 kings moving around randomly for all of time. This assumes most games will make it past the hump of mid game where its possible the king's motion will be limited and a checkmate can erroneously happen, I suspect this is a rare case as well. On a side note I wonder what kind of useful…

I only watched one game, but it seems that: 1) Yes, most games will end in stalemate. 2) Most wins would occur when one side has enough passed paws such that they chance upon promoting to a few queens. 3) The random-promotion significantly lowers the chances for checkmate. Promotion to a queen is so common that many players who play online chess set paws to automatically promote to queens, so they don't waste the 2 o…

There are only a few circumstances where you would not promote to queen.

The first is if promoting to queen would cause stalemate. In that case, you would probably promote to bishop instead, because rook would cause the same problem as queen, and knight is harder to force mate with. In the rare case where a bishop would cause stalemate, you promote to rook instead.

The second is if promoting to knight would force checkmate faster or more surely than queen, which is so rare you practically need to play with the intent of making it happen.

Either one is trivial to determine in a chess-playing program.

Check 1: would a knight promotion cause immediate checkmate? If yes, then promote to knight.

Check 2: would a queen promotion cause immediate stalemate? If no, then promote to queen.

Check 3: would a rook promotion cause immediate stalemate? If no, then promote to rook.

Check 4: would a bishop promotion cause immediate stalemate? If no, then promote to bishop.

Check 5: would a knight promotion cause immediate stalemate? If no, then promote to knight.

Otherwise, promote to queen and take the stalemate.

Or you could simply make queen promotion the automatic default unless you advanced the pawn using a context menu to promote to a different piece.

Re: Chess: Who will win in this riveting game of Math.random() vs. Math.random()?

#118
post #65

Earlier quoted context omitted.

I still don't know how to checkmate with two bishops. I mean, I've read how to do it, but if you stuck me in an endgame situation, I'd probably draw. Luckily, I have never actually had an endgame with a king and two bishops versus a king. Same thing with king, knight, and bishop.

You have to move the king into a corner and block his way out with your king.

Which is also a good recipe for a stalemate.

Re: Chess: Who will win in this riveting game of Math.random() vs. Math.random()?

#119
post #91

Earlier quoted context omitted.

I have a humble level and did checkmate both with two bishops and with bishop and knight... yes, I've found both finals. I had learned the mecanics years before, didn't remember exactly how, but it wasn't so difficult to find the path with enough time. What I don't want to find is queen vs. rook. I played once queen and pawn vs. rook and won, but it was painful . It seems there are some masters that are specialists i…

The mate King-Bishop-Night vs. King is a bit elaborate. From a random position on the keyboard, you typically need around 20-25 moves to achieve it, and there is a rule that draws a game after 50 moves without any pawn moves. I've seen an International Master offer draw to his opponent in KNB + K game because he didn't remember what the winning method was (I suposo that after 5+ hours playing your eroded mindset also…

I did remember the general strategy: take the opponent's king to a corner of the same colour as the bishop. There are a couple of moves that must be thought carefully. But the rest comes very naturally, provided you've practiced it a few times.

Re: Chess: Who will win in this riveting game of Math.random() vs. Math.random()?

#120
post #111

Earlier quoted context omitted.

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…

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

I stopped it running after 2 hours.
Post reply on HN