Hacker News new | past | comments | ask | show | jobs | submit login
A chess engine in 1326 bytes (110mb.com)
50 points by fizx on Aug 27, 2009 | hide | past | favorite | 16 comments



As a Chess engine enthusiast I was aware of pico chess and the fact that nanochess (by the same author) uses winboard protocol is new to me.

Most people thinks that Deep Blue solved chess and as far as computer chess is concerned, the field is "finished". But it is far from the truth. The current top Chess engine (rybka) running on an off the self desktop computer could easily beat deepblue. Not because the current desktop hardware is equivalent or superior to deep blue (which it isn't) but because the chess knowledge of current top engine is much superior than deepblue running on a super computer.

Sorry for going a bit off-topic but I thought some of you might this interesting. Actually chess-engine field is a quite interesting field, as long as you are not trying to make money.


I guess it won't ever be finished until chess is solved (like checkers). But it is finished in a way, because chess engines are much better than the best human players. It has ended an era in chess - there is less motivation to devote your life to a game that a computer will always be able to do better.


How does that follow? The existance of cars doesn't discourage runners or cyclists.


Have chess engines gotten to the point where they can win without cheating (e.g. being reprogrammed between rounds)?


Are you referring to opening books and endgame tablebases? They are not "preprogarmmed" into the chess engines (at least I have never seen one since the late 90s).

For UCI protocol the openbooks and TB are handled by the GUI - with an option to not use them. Same with the winboard protocol engine - but the engines handle the opening book and TB with the option to not use them if configured. Nothing is pre-programmed.

Opening book is the combination of best moves in the opening stages of the game taken from 1000s of games played by human players. Chess engine uses them to "minimize" the error in opening position. They can beat even the best grandmaster without opening book.

End-game Tablebases are every possible combination of moves at the end of the game. Currently only 3-4-5-6 pieces TBs are available (a combination of ~1.6 Terabyte of data).

Again, nothing is pre-programmed. Using them gives them an advantage of ~30-40 ELo points, which means little when you are already 300-500 elo points stronger than the strongest human opponent (fair guestimation IMO)

EDIT: Just realized you wrote "reprogrammed" not "preprogrammed", not sure what do you mean by "between rounds" and "Cheating". Most strong chess programs are binary builds and most of them use popular protocols like UCI and Winboard to handle GUI functions and everything is automated so I am kinda confused by the "reprogrammed" part.


In Deep Blue vs Kasparov, in between matches IBM modified Deep Blue to shore up any weaknesses it displayed against Kasparov's style. A fair competition would have seen Deep Blue "learn" only through AI techniques.


To the best of my knowledge, this was an accusation made by Kasparov after he lost the game, there is no actual evidence of this happening - or if it was within the rules of the tournament (to tweak). As you might know, "Deep Blue" was more than just software, a big part of deep blue was its massive parallel processing power crunching literally 200 million nodes per second (nps or positions per second), even though source code of deep blue is not available to public, raw logs of the game are available and nothing from those logs suggest that any monkey business was going on (it has been debunked many times).

I think Kasparov got overwhelmed by the numbers that DB was crunching and he lost the game psychologically even before the game started. If you actually studied the games he played against DB - you would see amateur mistakes made by one of the world's greatest grandmaster.

I think if he knew he wasn't playing a computer, he could have done a lot better.

Regardless, there is no comparison between deep blue and modern computer engines. To the best of my knowledge, most (popular) comp-comp tournaments and comp-human tournament, the binaries of the engines are given to the tournament organizers which are used in all games throughout the tournament. This is most definitely true for comp-human games; for comp-comp games it might depend on the participants and the organization hosting the tournament.


Kasparov lost the last and deciding game of the match with a horrible blunder playing the Caro-Kann, a defence he did not often play.

Kasparov believed that the Deep Blue team had spent a lot of time analyzing his style and looking for weaknesses. He felt it was unfair that Deep Blue was designed to beat him, personally, but he wasn't able to study it in the same way.

Kasparov decided to play an unusual defence in game 6 hoping to avoid any theoretical surprises his opponents may have prepared against his favourite defences, but it didn't work. At the same time, the pressure he was under no doubt contributed to his defeat.

Of course now Rybka doesn't need any 'help' from human handlers, it can comfortably beat strong Grandmasters (Rybka 3's ELO is over 3200).

If it is any consolation the surge in computer chess strength is largely thought to be due to modern engines evaluating positions more like a human would, rather than looking at more positions.


This was not actually Kasparov's complaint. He thought there was intervention during the game. He replayed a particular position through a PC and when given an extremely long time to think the PC did not find Deep Blue's move in the same situation. This along with his feeling that the computer 'just wouldn't' find the move made him believe that someone had essentially told Deep Blue to pick an alternate move from the tree creating a man-machine combination. This was not substantiated and seems unlikely considering the Kasparov - Deep Blue matches generated so much publicity even with Kasparov winning. In either case his accusations reflect badly on him since he doesn't have any real evidence. If he hadn't failed to find a draw in one of the games he probably would not have lost the match. Also the blunder in the last game could have been avoided but it seems human fallibility and some point would have done him in no matter what.


"e.g. being reprogrammed between rounds"

e.g. learning


Emphasis on your last sentence. There really isn't much room to advance commercially after Rybka. It is scary how good its evaluation function is compared to other engines. Even if some other engine manages to beat its strength, it will not mean much practically to a paying human(even a GM).

That said, what interesting developments are you seeing in chess engines? I know that Rybka is aggressively pruning its search tree (its pos/s is an order of magnitude less than say Fritz), but question is how?


Anyone play it yet? It's a pretty easy thing to do, apparently. There's windows binaries, and on mac, I'd just use the command line interface, and follow along with eboard (sudo port install eboard).

I'm about to start my first game. I'm going to laugh when it kicks my arse.

Edit: It prints out an ASCII-art board after every move. Apparently (since it's deterministic) it plays Scandinavian Opening against 1. e4. Anyhow, try it out.


I played it two quick games, in both of which I took a piece advantage in mid-game tactics. It's not terrible, but it doesn't seem to think more than 2-3 moves ahead. I'm a pretty casual player.


You'd imagine that its just using a very simple minimax algorithm and not stepping a great deal of turns ahead? Can't imagine you could build to many rules into code of that length.


Finally, a chess engine I can beat!

Just kidding, probably not.


I like the idea of programs (and machines) that are lean and mean. (Dinosaurs were big too.) There's something really satisfying about a few lines of code that replace a hundred.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: