A chess program by Johanes Suhardjo
Acknowledgement: Thanks to Bob Hyatt, Tim Mann, gnuchess
people, Bruce Moreland and other CCC people.
Motivation: Just to have fun. With only
about 15 minutes per day to work on it, I don't expect parrot to beat
anybody anytime soon. I add about one knowledge per month, so
by July 2933 parrot might be able to compete with today's
Download: I have $0.00 budget for parrot, so I
use free Linux, free gcc (now free Intel C++ compiler), free xboard,
F(ree)ICS, free advice from Bob Hyatt, free ideas from CCC,
etc. Some of you have been asking about it, so you can
parrot's source code to be compiled and run on Linux with no
support what-so-ever. If you don't know what to do with a
.tar.bz2 file, you probably shouldn't download it.
the help of Michael Yee, I manage to compile Windows XP version of
parrotx binaries for Winboard: parrotxp.zip.
What you need in the current directory to run parrot:
What you really need is parrot.cfg, the configuration file.
Right now, the only command you need there is hashsize.
If you want to play with opening books, have white.bin and black.bin
there. You can create your white.bin and black.bin
yourself by running readPGN and readTextBooks commands (see command.c).
If you want guide parrot
with piece square value table, put in sqvalue file.
Finally, if you want to play with Nalimov's end game tablebase, put
them in tablebase subdirectory.
"Milestones"(or is it mild stones?):
Started from gnuchess 4.0 patch level 17 (circa 1990). Added
every interesting idea I could think of or heard of. I let it
play automatically on FICS unattended. Pretty soon parrot got
up to about 2400 blitz rating on FICS. That was with a slow PC
(about 1/10 of the popular processors at that time) and some crafty
clones dilligently kept parrot's rating low. Whenever parrot's
rating seemed to grow, those clones would play 50 games, beating
parrot 49.5-0.5. Also, some human predators preyed on
parrot when there's a bug. For example, when parrot had a bug
in the opening book, the vultures would play 1. d3 ... 2. Qd2 ... 3.
Qd1 ... 4. Qd2 ... 5. Qd1 ... and so on, and waited for several
minutes until parrot froze. I often wondered how those people
looked like in real life. Were they normal people? Did
they eat normal food and breath oxygen? Some players were kind
enough to report those bugs. Pretty soon parrot became jam
packed with 925094331 bugs and it was going nowhere.
Mar 14, 2002:
Determined to write a new bug free program (yeah right, dream
on!), I managed to write line 1 in parrot.c:
/* parrot - Johanes Suhardjo (email@example.com)
During the next few months, I struggled to make parrot play
legal chess. Since I could only write a few lines now and then,
everytime I sat down to write, I had to spend a lot of time trying to
figure out what I did last time.
Dec 25, 2002: Quiescent search with material evaluation
only (isn't Christmas vacation wonderful?). Even with random
moves, parrot got about 900 lightning ratings on FICS, mostly
because those humans forfeited on time.
Jan 1, 2003: Opening books (my new year
resolution: parrot would play "normal" openings).
Jan 27, 2003: Primitive king safety (pawn too far in front of
king -> bad king, no pawn cover -> bad, bad king).
Feb 13, 2003: Piece square tables. Amazing enough, it
made parrot acted more like pretending to play chess than throwing
stones. Some people got fooled, thinking that parrot really
played chess, and asked me if they could download parrot.
Mar 9, 2003: Nalimov's endgame tablebase (up to 5 pieces).
Copied crafty's probing utilities.
Apr 4, 2003: One ply search. Could checkmate opponents
then, but since it had a sense of fairness, it was always happy to
receive a mate in one.
Jul 17, 2003: Time controlled iterative deepening, no search
extension. No more Mr. Nice Guy (unfortunately his dumb twin
brother was still there). In 2 12 games, it could go up to 5
plies (no pruning) on a 1.6 MHz Pentium PC.
October 20, 2003: Simple hash tables: fail high only,
always replace. The main treasure: hash move.
Use otim not to spend more time than opponent.
December 31, 2003: By generating pseudolegal
moves, parrot sped up twice.
March 30, 2004: Fixed bugs
(yeah, yeah, that's what I do), more aggressive passed pawn
evaluation, null move (R=2)
May 1, 2004: Finally had a king
safety evaluation, following Rebel's evaluation on Ed Schroeder's web
site. It slowed down parrot by 40%, but I thought the improved play
was worth it.
November 9, 2004: After 6 months of
hibernation, I slapped together in a short time: out of check move
generator and some standard search enhancements that would keep me
busy bug hunting for another 6 months (it turned out that those bugs
were very comfortable with parrot, they stayed for years).
Still sticked with full width search (no pruning).
February 5, 2005: Started
futility pruning for bad captures in quiescent search, but otherwise
still pretty much full width search.
October 2, 2005: I always thought of forward pruning
as gambling, but then I realized that not doing pruning was gambling
by choosing to run slower. Started experimenting with different
October 31, 2005: Started looking into Fruit's code.
The most important thing that I learned was ASSERT() which is run
everywhere in DEBUG mode. Everytime I change something significant,
I ran parrot in DEBUG mode on testdebug with 7585 positions. It
helped minimize the bugs.
March 10, 2006: Implemented allNode, pvNode, and
cutNode based on "Parallel Alpha-Beta Search on Shared Memory
Multiprocessors" by Valavan Manohararajah. By predicting those
node types, I managed to improve pruning and shaved the search tree
significantly. It did not happened overnight, but after months of
trying many tricks.
May 11, 2006: By adding a few lines to xboard, I developed
a method to match parrot with crafty with 50X time handicap. Bob
Hyatt helped by giving me some advice. Test time was now cut by
July-November, 2006: Took that many months to implement
pondering correctly. Unfortunately, I didn't know how to make it work
on the Windows side since I'm one of those dumb Linux users.
January 16, 2007: Follow PV extension.
July 22, 2007: Changed evaluation parameters, feedback
controlled search, fast iterations, etc.
April 19, 2008: Yeah, it has been that long since I had
time to work on parrot properly. BTW, Jim Ablett contributed
parrot-070116 cygwin build which allowed pondering.