This page is under construction, so tell your
grandchildren to come visit it. This page contains explicit nerdy
material. If you are offended by nerdiness, please leave now.
Overview of Nilatac
Nilatac is a suicide chess program. It consists of a stand-alone chess
engine with a rudimentary interface, and a driver to connect it to
chess servers like FICS. The engine uses alpha-beta (with a few
optimizations) and proof-number search. It has a decent-sized opening
book and complete 4-piece EGTB (endgame tablebases). The driver
invokes telnet (or timeseal) and parses the output using regular
expressions. Each of these features is documented in the sections
below; however, if you are just a FICS user who would like to play
Nilatac, you only need to read the next section.
You can browse Nilatac's opening book online here.
NEW: I've finally taken the time to apply the GPL to the
source code. You can browse it here.
So now it's truly free software. Of course, that doesn't make it any
better :) And I'm still too lazy to make a tar.gz archive.
I'm a FICS user and I'm playing Nilatac. What features does it
have?
- Nilatac accepts draws after 7 reversible moves. Please note
the word reversible: 7 moves have to pass without any captures
or pawn pushes before Nilatac will accept draws. This is an
uncommon feature. Most computers ignore or decline all draw offers,
which can be a real nuisance, because you have to keep playing a game
that is an obvious draw until the 50 move rule or the 3rd repetition
rule take effect.
- Nilatac will keep your seat warm. After you play a game,
Nilatac will give you priority and decline match offers from anybody
else for 5 seconds. This should give you time to hit rematch if
you want to play some more. I added this feature because I know how
frustrating it feels when someone comes and steals your computer just
when you were having a good time with it :)
- Nilatac has a noescape policy. For the first 10 games you
play against Nilatac, you will have to set noescape 1 before
Nilatac will accept your invitation. The effect of this setting is
that if you disconnect during the game, you will lose the game. I am
really not too happy to enforce this policy, but without it people
constantly disconnect on Nilatac and I have very little time to
adjudicate its games. Once you play 10 or more games, you become a
trusted opponent and Nilatac no longer requires you to set noescape to
1.
- Nilatac will not play rated against you if (a) you
have a rating above 2000, (b) you are human and (c)
you would exceed your best rating in case you won. I have had several
complaints from good suicide players that people are exploting
weaknesses in Nilatac to boost up their ratings, and I can see why
that is disturbing. I do not want Nilatac to cause an instability in
the ratings pool.
Ummm... suicide what?
Suicide chess is one of the many variants of chess. Pieces move and
capture like in normal chess, but:
- The goal is to lose all your pieces, even your king.
- Captures are mandatory. If you can capture, then you must do
so. If you have multiple possibilities to capture, you can execute any
of them.
- The king is not a special piece. You can leave it in check and it
can be captured (thus, the term "check" becomes meaningless).
- Pawns can be promoted to kings as well.
- In case of stalemate, the side with fewer pieces wins (if the two
sides have an equal number of pieces then the game ends in a draw).
- Castling is not allowed.
What's a chess server?
It's a server where you can connect to play chess against other
people. In my opinion nothing compares to real chess (also called
over-the-board or OTB). There's no substitute for the sweet moments
when you take your opponent's queen, or when you strangle him for
taking yours, or when you misplace a rook and have to spend the whole
day looking for it under your furniture.
However, chess servers provide what you cannot always find in real
life: a huge diversity of opponents with various styles and
temperaments (and vocabulary, for that matter). You can play chess and
variants, simultaneous matches, blind matches, bughouse, or you can
sit back and watch lectures or other people's games (you can kibitz on
those games too).
My favorite chess server is FICS (the Free Internet Chess
Server). You can connect to FICS right off their webpage, although you
probably want to follow these
instructions in order to install a more friendly interface.
What's a chess engine?
As you might have expected, it is a program that plays chess -- or
suicide chess, in Nilatac's case. I have decided to implement a
program that plays suicide chess, rather than standard chess, because
suicide doesn't have the special rules that chess has. There is no
castling and the king is not a special piece. This simplifies the
implementation a lot and increases the computation
speed.
I began work on Nilatac simply because a friend of mine from MIT
had to write a suicide chess program as the final project for a
programming lab. The idea sounded nice and I started coding my own
suicide chess program. Shortly afterwards, I decided to connect it to
a chess server.
Nilatac has no graphic interface. It does have a user-interactive
mode, but you have to type in commands from the keyboard, for example
"move e2e3" to make a move, or "think 20" to let Nilatac think for 20
seconds and then make a move. Nilatac was never designed as a
stand-alone program; my focus was to connect it to a server.
The first version of Nilatac (this section to be continued)
What about the driver?
When Nilatac connects to a server, it receives pretty much the same
data that a human player would notice: match offers, people shouting,
kibitzing, offering draws, disconnecting in the middle of the game,
sometimes returning to continue the game... Nilatac has to make sense
of all this information in order to stay connected 24/7 and be able to
play games. For example, in its first days Nilatac couldn't properly
continue adjourned games, so you could beat it by disconnecting from
the server, then returning and offering to resume the game. Nilatac
couldn't handle this case properly, so it would run out of time.
To make things more complicated, different servers have different
output formats. Since I wanted the ability to connect Nilatac to
multiple servers, I had to make the driver general enough to
understand multiple syntaxes.
A good driver, therefore, is almost as important as a good
engine. I decided to implement my own driver, although I've heard it's
simple to connect your program using one of the consecrated clients
like xboard. My driver simply spawns a telnet process to connect to
the server, then captures the process' output. The driver then acts as
a mediator between the server and the chess engine. For example, when
it receives a board, the driver:
- tells the engine what the board is;
- decides for how long the engine should be allowed to think;
- waits for the engine to make a move;
- forwards that move to the server
The driver is also responsible for any other information that can be
deduced from the server output, that the engine knows nothing
about. These are the things the driver does:
- Accept or decline draw offers. Nilatac accepts draws after 7
reversible moves (i.e., 7 moves without any captures or pawn
pushes). The server sends the number of reversible moves with each
board.
- Message people who disconnect during the game. This is somewhat
abusive, but most of the people who disconnect do so because they
realize they're in a lost position.
- Send offers to resume the game to people who have an adjourned
game with Nilatac when they return on the server.
- Remember who our last partner was. After finishing a game, Nilatac
gives priority to its last opponent for a rematch, and declines
invitations from any other players for 5 seconds. This is to allow
people to play long streaks of games if they want that.
- Obey the commands of a designated player on the server
(myself). If I tell Nilatac to quit, offer a draw or place a seek, it
will do so. This is useful when Nilatac is running from my home
computer and I am watching it from another place.
- When the game is finished, examine the move list and learn an
opening. Nilatac has a self-generated opening book that it improves by
examining its past games. In suicide, openings are crucial as one
mistake can lead to a forced loss. We do not learn an opening if our
last game was against a weak player, because we might have played a
bad opening, but got away with it due to our opponent's weakness.
- Maintain a list of the best suiciders. Nilatac "trusts" these
players and periodically examines their history games to learn more
openings. This is done by simply issuing a sequence of "history" and
"smoves" commands. Nilatac examines hundreds of games every day and
its opening book is rapidly improving.
- Respond to tells. For now, we only respond to the "features" tell:
if somebody tells us "features", we send them back a summary of our
features. A nice idea would be to hook up Nilatac with Eliza so we
could make it chat :-)
-
What algorithms is nilatac using?
This section will talk about alpha-beta, pn and pn^2.
[an error occurred while processing this directive]