Blogs
The Generic Chess Engine, or Chess Genie
The Chess Turk

The Generic Chess Engine, or Chess Genie

Avatar of stamma1
| 8

The Connection

The methods described in the last blog post allowed me to win my game against Heuristic Software Systems' Socrates Chess Engine in the 1992 Northern California Speed Chess Championships. 

The losing blunder 8.Nb5 is an example of the horizon effect - it gains material in the short run and the program can't see that the Knight  at a8 will be worthless, maybe not even worth the time to capture it soon - besides, Black makes the same capture just after its calculation ends.

With that generation of hardware the convenient programming kludge was to assign negative points to a knight in the corner.

This game led to pleasant discussions with the company's founder Julio Kaplan. I met him earlier as a math student at UC Berkeley. On a good day he played speed chess in the student union.

The Specs

Later I talked with Tim Sammons, the CEO  of Heuristic (also dan level Go player) and developer IM Marc Leski. We discussed the development of The Generic Chess Engine, one of Kaplan's ideas.

The idea is to adapt a standard chess program to play other variants of chess, Eventually it should be able to output a grandmaster for any variant of chess, without knowing the rules in advance, by taking the rules out of a file.

Shogi

As a first cut, we selected a few variants of chess described in the literature with the idea of writing a program that played these variants. First we selected Turkish Chess, Chinese Chess, Shogi, and Martian Chess (described in Edgar Rice Burroughs' science fiction series), and a few others.

Xianqi

Applications

Imagine the application for this program. Suppose you were sending a spaceship to some planet where you know they played some variant of chess, but didn't know which one. It would take the rules out of a file and output a grandmaster engine for that planet.

Take me to your lead architect

Or such was the marketing hype I was planning. As it happened, Kaplan decided there was no market for other variants (yet!), and left the field of computer chess because "too many people are doing it for fun." The last I heard he was an architect at Autodesk.

Easy to Prototype: "Get something working fast, optimize Later" (Ken Thompson)

But how hard is it to adapt an open source chess program to play any variant? Using an object oriented language like C++ it is mainly a matter of putting the move generator in a routine and making  the movements of a piece be one of its properties.

Any size board is possible, as well as other board geometries, like cylindrical chess. The program could be adapted to play games that don't seem anything like chess. From a high enough level of data abstraction, even go could be approached as a variant of chess - moving to intersections instead of the centers of squares is nothing.

Advantages and disadvantages

But Alpha-Zero may make most of this irrelevant now. The idea was good for its time, and may still be worth doing as an open source project.

Incidentally there are other benefits to writing chess programs or at least learning the internals of a program. For one thing, your rating is likely to take off from the greater precision in your thinking.

For another, in todays programming world the survivors are the ones who can automate thought rather than just doing it "manually". Most game algorithms and methods for "AI" were born on the chessboard.

chess.com

I write articles on remedial chess - what I learned about computer chess, how to play blindfold, how to improve at tactics.