Monday, 23 July 2007


The Canberra Times had a big story on Dr Andrew Tridgell today (I'd link to it but the Canberra Times website is completely hopeless when it comes to putting print news online)
These days Andrews big claim to fame is the development of the Samba file sharing system, which allows Unix and Windows network file systems to interact, but Andrew is also the author of Knightcap, the current Australian computer chess champion.
Knightcap started off as an exercise in 3D computer graphics, before Andrew decided he needed a chess playing engine behind it. At first Andrew followed the traditional method of building a chess program, until he realised that his chess knowledge may not be enough to create a strong program. He then turned it into a "learning" program, where the evaluation function was constantly re-tuned by the program itself. You can see the idea behind this in a paper that Andrew published with Jon Baxter and Lex Weaver.
Very quickly the program became quite strong and soon overtook a number of other Australian programs, including my own program, Vanilla Chess. Here Knightcap cleans up Vchess with an intuitive Queen sac.

vchess - knightcap [A00]
National Computer Chess Championship, 1999

1.e3 d5 2.Nf3 Bg4 3.Bb5+ c6 4.Be2 Nd7 5.0-0 e5 6.d4 e4 From a typical (non-book) computer opening a sort of reversed French has arisen. 7.Nfd2 Be6 [ A human player might have opened the h file with 7...h5 8.Bxg4 hxg4 9.Qxg4 with the lead in development and attacking chances against the king giving Black plenty of compensation.] 8.f3 Qg5 9.Rf2 f5 [ 9...Qxe3?? 10.Nxe4+-] 10.c4 Ngf6 11.Nc3 Qh6 12.fxe4 fxe4 13.cxd5 cxd5 14.Nb5 Rc8! A surprising pawn sacrifice to speed up development. 15.Nxa7 Bd6 16.g4?! Fatally weakening the kingside [ ¹16.Nf1] 16...Ra8 17.Nb5 Bb8 18.Nb3 0-0 19.Rg2 Qh3 20.g5 Ng4! 21.Bxg4 Bxg4 22.Qe1 [ 22.Qxg4 Bxh2+ 23.Kh1 Rf1+ 24.Rg1 Rxg1+ 25.Qxg1 Bg3+ 26.Qh2 Qxh2#] 22...Rf5 23.Nd2 Rxg5 24.Nf1 (D) 24...Qxg2+!! While fast searchers like Fritz find the mate fairly quickly, knightcap played this sacrifice on positional grounds, not seeing the mate until the next move. 25.Kxg2 Bf3+ 26.Kh3 Ra6 Vindicating the pawn sacrifice on move 15! Faced with various mates (the best being 26.Qh4 Bg2!#) White resigned. 0-1

As Andrew Tridgell is a champion of Open Source Software you can download Knightcap from a number of places. Probably the best place is which also contains a number of other winboard compatible chess engines (including a version of Vanilla Chess!)


TrueFiendish said...

Hi, Shaun. It's a bit of a stretch to call that an "intuitive" queen sac, don't you think? We're not talking Marozcy-Tartakower, now are we!


Shaun Press said...

In a "computer" sense it was. When Knightcap sacrificed the queen it hadn't seen the mate. Knightcap didn't have a huge look-ahead (like Fritz or Hydra), but made up for this by a kind of positional understanding.
As part of its evaluation function it detects trapped pieces and had decided that "trapping" the king was worth the queen, even if there was no immediate mate.
So in a way it "felt" (as computers do) that the resultant position must be advantageous, as it turned out to be.

TrueFiendish said...

Okay. Well, if computer programs are getting advanced enough to sac queens and not even need to see the mate, god help us all!

Perhaps the computers won't need to "solve" chess as with checkers; they will be able to make an accurate intuitive assessment of the starting position, and that'll be it!