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.<p>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.<p>On a side note I wonder what kind of useful information could be mined from a huge set of random-random games. Maybe the relative power of each piece in terms of the number of pieces it captures on average? Also with some heuristic tweeks you could probably start exploring the power of various openings. Of course then its no longer random-random.
Never thought this comment would end up on HN when I wrote it ;)<p>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.<p>Glad to see others are enjoying it :)
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)<p>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)<p>2-gram chess would improve on this by using (white move, black's reply) as the key in such a dictionary.<p>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.
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 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.<p>Here's a breakdown.<p>* 446 losses by checkmate<p>* 23 wins by time forfeit<p>* 18 wins by resignation<p>* 5 wins by disconnection forfeit<p>* 15 stalemates<p>* 5 draws by insufficient material<p>* 2 draws by repetition<p>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.
I briefly wondered why the King felt smarter than the other pieces before realizing the rules prevent it from taking immediately risky moves or staying in a risky position.
Oh wow, I thought it was a joke at first, my game was only a half-dozen moves: <a href="http://i.imgur.com/kmKQ2Wi.png" rel="nofollow">http://i.imgur.com/kmKQ2Wi.png</a>
I forced white to always take a piece if it can. It initially tears black to shreds, but then the lone Black king battles back and slowly picks off the white pieces.
This is strikingly similar to a web interface for chess that I just made, even down to the public domain icons. Really slick, but playing against randomized opponents is not very thrilling. There are also limitations to just optimizing for the best turn with one turn lookahead. Although I have to say the drag and drop is better on this version, I think the problem of trying to find the best move in a client-side web application is relatively tricky. The most naive attempt might use a brute-force method, but this could lock up the web browser. And using large data structures would be taxing, too.<p>link: <a href="http://greg.team-duck.com/chess/" rel="nofollow">http://greg.team-duck.com/chess/</a>
I made something that did stats on this a few months ago<p>see it here<p><a href="https://barronwasteland.wordpress.com/2014/08/04/random-move-chess-aka-infinite-monkey-chess/" rel="nofollow">https://barronwasteland.wordpress.com/2014/08/04/random-move...</a>
It is also interesting to play the Play Random Computer example (<a href="http://chessboardjs.com/examples#5001" rel="nofollow">http://chessboardjs.com/examples#5001</a>), and try to checkmate the random computer without losing a single piece.<p>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.
Some interesting things happen here, the queens almost always seem to go first in my games (perhaps because of their freedom of movement they tend to end up in dangerous territory quickly). Also lots of pawn promotions make the mid-end games a lot more fun, although as the promotion is also random I've ended up with unwinnable endgames (e.g. two knights).<p>I don't play chess beyond knowing the rules, but this is a lot more fun than watching a tournament!
It's interesting how closely the midgame resembled a real midgame. But superficially. Better than some chess arrangements you see in movie scenes.
Some risky moves from the white and we’ve got a pretty quick checkmate <a href="https://www.dropbox.com/s/q66h70kuauog3zq/Screenshot%202015-01-26%2001.37.56.png?dl=0" rel="nofollow">https://www.dropbox.com/s/q66h70kuauog3zq/Screenshot%202015-...</a>
So i simulated 2 games and both of them had a result. Quite interesting, my intuition says that there should be more draws but guess i am wrong.
[1] <a href="http://imgur.com/rN1zfDD,sQXY6zQ" rel="nofollow">http://imgur.com/rN1zfDD,sQXY6zQ</a>
I just had black pull out an epic victory over white in truly random fashion: <a href="http://imgur.com/9CTukc5" rel="nofollow">http://imgur.com/9CTukc5</a><p>I'm also curious how rare a victory is here, and if it can be modeled with math.
Very dramatic! One plucky white pawn made it all to end before getting slaughtered.<p>The two queens got <i>very</i> friendly before the white king killed the black queen in a fit of jealousy.<p>Meanwhile one black knight just stood off in the corner watching. Waiting.
White down to King, Black with Bishop, King, Knight, pawn promoted to Queen... but oh, the mistakes. White swept up piece after piece and could Black still take it with a King-Knight combination? No. No he couldn't. Stalemate.
Very original and fun :)<p>Near the end of the game the probability of something interesting happening decreases. Maybe in the end it could at least prune out some moves and choose randomly only amongst those that make pieces go closer to each other?
Oooo, that makes me want to use genetic algorithms just to see if I can come up with a great chess player... Is there an online tournament where I can match my algorithm against others?
First game I watched and I was expecting stalemate, but down to just a pawn (f2) and a king (b3), white checkmated the opposing king (at b1) by promoting the pawn to a queen
Some ideas:<p>* host a tournament of many different PRNG seeds.<p>* generate long strings of moves (random numbers) up front and then use a genetic algorithm to breed and mutate the winning strings.
The real question is if these wins would change as a result of "global consciousness"<p>(Global consciousness project is a bunch of computers generating random numbers all over the world that seem to spike when catastrophes occur <a href="http://en.wikipedia.org/wiki/Global_Consciousness_Project" rel="nofollow">http://en.wikipedia.org/wiki/Global_Consciousness_Project</a> )