Showing posts with label computers. Show all posts
Showing posts with label computers. Show all posts

Friday, April 16, 2010

The Forklift


From humble beginnings in the early 1950s, chess-playing computers have now surpassed the strongest human players. Less than $100 is needed to buy one of the electronic warriors that gave so much trouble to GMs Garry Kasparov, Vladimir Kramnik, and Michael Adams in specially-arranged test matches.

Twenty years ago, when chess computers were first approaching master strength, an initiative was started to prohibit them from entering human tournaments. It was argued that trying to defeat a machine at chess would eventually be as futile as trying to win a powerlifting contest against a forklift.

In 2009, a FIDE Category 6 tournament with a mostly human entry was won by a mobile phone.

These days many authorities proclaim the futility of trying to defeat a top chess-playing program. Instead it is recommended that players use such programs to analyse their own games and identify and perhaps correct their mistakes.

I recently acquired a copy of Fritz 12, the newest version of one of the best-selling chess programs of all time. Never mind the advice from the experts. When the DVD arrived at my study, I installed the program, set the time control for 5 minutes each, and banged out my first move 1.e4. Here is the resulting game:

Dadian-Fritz 12, G/5, Port Coquitlam 2010

1.e4 c6 2.d4 d5 3.exd5 cxd5 4.Bd3 Nc6 5.c3 Nf6 6.Bf4 g6 7.Nf3 Bg7 8.0-0 0-0 9.h3 a6 10.a4 Nh5 11.Bh2 Bh6 12.Re1 Bf4 13.Bxf4 Nxf4 14.Bc2 f6 15.Qd2 (diagram) 15...e5 16.dxe5 fxe5 17.Nxe5 Qg5 18.Ng4 h5 19.Ne3 Ne5 20.Kf1 Bxh3 21.gxh3 Nf3 0-1

Well, that was a sobering experience. I thought the exchange variation of the Caro-Kann was supposed to be a safe way for White to play, but I guess not.

Of course my first big mistake was 16.dxe5, which opened the f-file and also allowed Black's queen to get to g5. Replace 16.dxe5 with 16.Qe3 and White should be fine.

On the very next move I made my second big mistake 17.Nxe5, which allowed Black to set up a winning attack with 17...Qg5. Instead of taking the e-pawn there was the interesting option of counterplay with 17.Bb3.

After 17...Qg5 I managed to grovel for a few moves but the issue was settled after 20...Bxh3!

I suppose there is some risk of embarrassment in publishing this game, but here I will appeal to the reader's conscience.

Monday, March 26, 2007

Start your engines


I recently fulfilled a promise made a couple of months ago and sent off 34 euros to IM and chess programmer Vasik Rajlich for a copy of Rybka 2.3. I had hoped to be writing that this new release exceeds all expectations but this has not proven to be so, at least as far as my copy is concerned. The problem is that Rybka 2.3 runs much more slowly than other programs and this not only affects its playing strength but also causes strange lag effects in the board display. A posting on the Rybka Forum indicates a hashtable bug that is due to be corrected very shortly through a beta release. That's fine with me as long as it doesn't cost anything.

In order to compare Rybka 2.3 with my other playing programs I decided to assign a position from the game Szabo-Bisguier, Buenos Aires 1955, which is shown in the diagram. Szabo concluded matters by force in only three more moves: 1.Bxh7+ Kxh7 2.Qh3+ Kg8 3.Rg4! and Black resigned because he cannot prevent Rh4-h8 mate. His king is blocked in by his own pieces and any move of the f-pawn is met by g5-g6. This is a good test position for humans because the key move (3.Rg4) is slightly counterintuitive; it is usually the queen that is on the sharp end of h-file attacks.

Unlike human players, computers are tactically perfect within a short range and are thought to have few biases so one would expect them to solve this position fairly quickly. I have a number of UCI engines that run under the Fritz interface and I gave them all the same position in turn. Of course they all solved it but they took varying amounts of time to do so. Here are the results:

Rybka 1.0 beta: 2 seconds
Fritz 8: 17 seconds
Pro Deo 1.1: 60 seconds
Fruit 2.1: 62 seconds
Toga II 1.2.1: 68 seconds
Rybka 2.3: 72 seconds
Crafty 19.15: 189 seconds

Yes, a little joke at the end... I wonder what a match between Rybka 1.0 and Crafty 19.15 would look like? In any case I think you can sense my concern over spending 34 euros on Rybka: it was outperformed by the free programs Pro Deo, Fruit and Toga, and badly outperformed by Fritz 8. They were all running on an AMD Athlon 2600+ with 64 MB hashtables.

Any and all feedback is welcome on this topic.

Friday, January 26, 2007

Prodigy




1966... The Beatles were on the charts with their album Revolver... Blow Up was in theatres... and England were World Cup champions! On top of all that came Bobby Fischer's brilliant win over Svetozar Gligoric in the Havana Olympiad. Heady days for a young chessplayer!

I was taken back to those Fischer days recently when the following game came to my notice. Another prodigy, another Spanish Exchange, and another quick victory for White. Quick, and very brilliant.
When this game was played (December 2005) Rybka was in beta testing, and was a complete unknown. Since then, of course, it has vaulted to the top of all the computer rankings. Version 2.3 is due out soon, and when that happens it's going onto my machine as soon as humanly possible!

Rybka 1.0 Beta - Jonny
15th International Computer Chess Championship
Paderborn 2005
Spanish Game C69

1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Bxc6 dxc6 5.0–0 f6 6.d4 Bg4 7.c3 Bd6
Gligoric played 7...exd4 8.cxd4 Qd7, which looks quite strange to modern eyes. In My 60 Memorable Games Fischer suggested 8...c5 9.d5 Bd6, which has been played a few times with mixed results.
8.Be3 Qe7 9.Nbd2 exd4 10.cxd4 0–0–0 11.h3
A minor novelty from Rybka. The game Z.Almasi-M.Marin, Oderheiu Secuiesc (zt) 1995 went 11.Qc2 Re8 12.e5 Bb4 13.h3 Be6 with equal chances.
11...Bh5 12.Re1 Bb4 13.Rc1 Rd7
Overprotecting c7, although the rook does seem a bit awkward here. Human players would consider the line 13...Bxd2 14.Bxd2 Bxf3 15.Qxf3 Rxd4. White has very good compensation for the pawn, but whether he has the advantage is another matter.
14.d5!
Rybka strikes! Opening the c-file will create real danger for Black's king.
14...cxd5 15.exd5 Qf7 (see the first diagram.)
If 15...Qd8 16.Qb3 Bxf3 17.Qxb4 Bxd5 18.Qc5 with strong pressure for White.
16.Nc4!
Rybka has calculated a long way ahead in making this passive sacrifice, so far ahead that none of my playing programs can find the idea.
16...Bxe1
If 16...Bxf3 then 17.gxf3! (certainly not 17.Qxf3 Bxe1 18.Nb6+ Kd8 19.Nxd7 Qxd7 29.Rxe1 Ne7 30.Rd1 Nf5 with only a small advantage for White) followed by play similar to the game.
17.d6!! (see the second diagram.)
Amazing... White, a whole rook down, simply pushes a pawn! The charming point is that despite his extra material Black cannot prevent the manoeuvre Qd1-d4-a7, invading his king's position and bringing the game to a quick conclusion. Jonny was probably expecting 17.Nb6+ Kd8 18.Nxd7 Qxd7 19.Qxe1, when 19...Bxf3 20.gxf3 Ne7 21.d6 Nc6 22.dxc7+ Kxc7 23.Bf4+ Kc8 is quite equal.
17...c6
No better was 17...Ba5 18.Nxa5 Ne7 19.Qd4 Bxf3 20.gxf3 Qg6+ 21.Kh1 Qf5 22.Qa7 and White wins.
18.Qd4 Bb4 19.Qa7 Rxd6 20.Qa8+ Kd7 21.Nxd6 1-0
Black is completely lost no matter what he plays; for example, 21...Bxd6 22.Qxb7+ Ke8 23.Qc8+ Ke7 and now 24.Bc5!! Bxc5 25.Re1+ Kd6 26.Qd8+ Qd7 27.Rd1+, etc.
A brilliant game by any standard, human or mechanical.

Friday, January 12, 2007

The kibitzer


About ten years ago I was playing some 5-minute blitz chess on one of the free servers -- I think it was Chess.Net -- and in one of those games I ended up with this position as White. I think I had around a minute left on my clock. My opponent had just banged out the move 1...Qf5-f3! (well, it felt like he banged it out... that's what an OTB opponent would have done...)

What to do, what to do? Mate is threatened, as well as the rook. 2.Qxh7+ perhaps? Followed by a knight fork? No good -- he just takes the knight and I'm in the same leaky boat. No time left to even think about resigning... down went my flag and the game was over.

In those days, and on that server, there was no automatic game saving function. The moves were sent to my inbox via email. I got them on screen and started entering them into ChessBase with the analysis module running.

I got to the final position, entered my name, my opponent's name, and the venue, and just before clicking the Save tab, I happened to glance at the evaluation window. +11.69! Pardon? For a moment I was transported back to one of those post-mortems at the chess club, trying in vain to stop a kibitzer from reaching in, moving a man, and saying, "Why not this?" So annoying.

Back to the current position. Someone's winning all right, but from where I'm sitting, it can't be White! What's the killer move, Mr. Bucket of Bolts? Oh. That.

I'm rambling on here in order to put some space between the position and the key move. You see, I'd like you to find White's defensive shot for yourself.

I've shown this position to a dozen or so players of all categories and asked for an assessment. No one has spotted the winning defence.
Enough already. Take another look at the diagram, and try the move 2.Qg7+!

Simple chess. White breaks the pin on the g-pawn by force and captures Black's queen, winning easily. There are two variations: 2...Kxg7 3.gxf3; and 2...Rxg7 3.Rd8+ Rg8 4.Rxg8+ Kxg8 5.gxf3.

Computers are NOT killing chess! They're killing BAD chess!

About Me

My photo
Port Coquitlam, British Columbia, Canada
National master (Canada) since 1984. B.C. Champion 1977 and 1984. Runner-up 1991 and 2002. B.C. Open Champion 1972 and 1982. B.C. U/14 Champion 1964-65-66. Mikhail Botvinnik once wrote that publishing your analytical work forces you to be accurate because it exposes you to criticism. Hence this blog.