Live data from Hacker News

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

chessboardjs.com

41–50 of 131 posts

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

#41
post #6

I found myself getting mad at Math.random() pretty quickly. "Argh, you just got to promote two pawns, and you made them both black bishops!?!? I oughta fire you and hire an LFSR!"

I had exactly the same reaction. I was thinking it was going to be hilarious to watch, but it turned out to be extremely aggravating. The random pawn promotion was particularly egregious. I'm curious if other people had the same visceral reaction.

I was fairly disturbed by the repeated pointless sacrifices of major pieces (which typically aren't even accepted: black offers its queen in exchange for nothing, and white doesn't capture it!).

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

#43
post #6

I found myself getting mad at Math.random() pretty quickly. "Argh, you just got to promote two pawns, and you made them both black bishops!?!? I oughta fire you and hire an LFSR!"

I had exactly the same reaction. I was thinking it was going to be hilarious to watch, but it turned out to be extremely aggravating. The random pawn promotion was particularly egregious. I'm curious if other people had the same visceral reaction.

Yes. I found it really quite distressing to watch.

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

#44
post #6

I found myself getting mad at Math.random() pretty quickly. "Argh, you just got to promote two pawns, and you made them both black bishops!?!? I oughta fire you and hire an LFSR!"

I had exactly the same reaction. I was thinking it was going to be hilarious to watch, but it turned out to be extremely aggravating. The random pawn promotion was particularly egregious. I'm curious if other people had the same visceral reaction.

I did. White had two queens to black's none. It promoted a pawn and made it... a knight. And it was all by itself too. That part was hilarious, but...

In the endgame black had only a king and a pawn and the pawn was hung up on another pawn in the g column. Black's king was trapped in column a by two white rooks in the b column. White managed to create a stalemate with black king at a5 and white rooks at b4 and b6.

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

#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 opportunity of having beginner games ending in anything other than a stalemate.

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

#47
It is also interesting to play the Play Random Computer example (http://chessboardjs.com/examples#5001), and try to checkmate the random computer without losing a single piece.

It combines the fun of steamrolling the opponent with the strategy of planning captures that leave your piece perfectly safe, or managing the board so that the computer could take your piece but probably won’t.

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

#48
One thing that is on my (way too long) list of things to try is n-gram chess. 1-gram chess would, for every move from black, have a dictionary of (following move, win probability) pairs, and it would pick one that is legal using the win probabilities to generate a distribution (if there is a sure win, almost always pick it; if there is a move that always lost before, pick it very rarely)

You can start this of with empty dictionaries, and have the thing learn after each game (let two copies play for a few days to get let them teach each other how to play chess)

2-gram chess would improve on this by using (white move, black's reply) as the key in such a dictionary.

I think that would make for better chess than this. For some N, N-gram chess might even superficially look like the real thing at times.

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

#49
post #48

One thing that is on my (way too long) list of things to try is n-gram chess. 1-gram chess would, for every move from black, have a dictionary of (following move, win probability) pairs, and it would pick one that is legal using the win probabilities to generate a distribution (if there is a sure win, almost always pick it; if there is a move that always lost before, pick it very rarely) You can start this of with em…

I'm trying to figure out how you could store this without having massive dictionaries after a night of training games. I guess it's all just integers which helps.

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

#50
I once wrote a chess engine that played completely random moves and let it play on the Internet Chess Club against humans for a day. It played 1/0 games (1 minute for all moves). The final result was 46 wins, 22 draws, and 446 losses.

Here's a breakdown.

* 446 losses by checkmate

* 23 wins by time forfeit

* 18 wins by resignation

* 5 wins by disconnection forfeit

* 15 stalemates

* 5 draws by insufficient material

* 2 draws by repetition

Obviously it never won by checkmate. The rest basically came down to whether the human opponent figured out that it was playing against a bot.

Post reply on HN