README file for postmodernist ============================= PostModernist v1016 28th June 2006 ------------------ Contents ======== 1. Changes 2. Background 3. Setting Up PostModernist 4. PostModernist's Opening Books 5. PostModernist's Configuration File (pm.ini) 6. Running PostModernist Under WinBoard 7. Acknowledgements 8. Copyright and Distribution 1. Changes ========== v1016 - A number of significant changes since the last release. v1010a - The EVALHTSIZE and PAWNTTSIZE #defines in tt.c were set too large. v1010 - Fixed another bug in the evaluation (iqp_white). This caused mismatches between white and black scores for a given position. This one was pretty serious. - Removed the recapture extension change from v1009. This was removed while trying to isolate the evaluation bug. It will be tested again for version 1011. v1009 - Fixed an appalling bug relating to new_see_pawnpush(..) Actually, this isn't fixed, but new_see_pawnpush has been deprecated until further notice. It is very hard to see what damage this bug might have caused. However, getting rid of it means it will be possible to use evaluation information to judge various things like when not to try a null move - Started to use information about hanging pieces in various parts of the search (eg deciding whether or not to try a null move) - Implemented a slower, more accurate hanging piece detection function (not used yet) - Changed recapture extension so that it only extends if we are returning to (approx) the material balance which pertains at the root - Apart from the recapture change, this is the version which played in CCT6 (5 points out of 9, 17th place out of 54) v1008 - Fixed a bug in the evaluation function which would result in mismatches between white and black scores for a given position. - Started work on adapting PM's source so that it compiles on MS VC++ v1007 - Fixed a stupid bug in quiesce() which caused PM to prune captures of a newly-promoted queen in some circumstances. Thanks to Koundinya Veluri for pointing this one out - Minor changes to null move activation - Provided some infrastructure for incorporating info about hanging and pinned pieces in pruning decisions - Changed the random number generator to be the same version as the Linux version. This doesn't completely fix the problem I trying to fix, but it is a necessary change. PLEASE NOTE THAT THE OLD POSTMODERNIST BOOKS WILL NO LONGER WORK WITH version 1007 v1006 - Corrected problem with Fritz interface, specifically using a book which is external to PM - Minor changes to King shelter scoring - Sorted out feature myname="PMv1006" stuff for protover 2 of Xboard. v1005 - Added an option to tell PM not to produce a log file - Changed time handling for G/mins type time controls. PM might still lose on time, but it should be less likely now - Provided a "crappy hardware" executable as a separate download v1004 - Fixed a problem with a broken array bound v1003 - Changed the way epd test sets were allocated. Now the test set is only allocated if we are running an epd test. PM was using lots of virtual memory before, which I had not noticed until Igor Gorelikov mentioned it. - Changed the EGTB cache size to 4MB (was 16MB). v1002 - Changed the approach to determining whether pondering is allowed. The PONDERINGPERMITTED line in the pm.ini file is now deprecated. You can leave it there, but it will be ignored. PostModernist now uses the "hard" and "easy" commands, as per the WinBoard standard - Fixed a bug in the pawn-race scoring which was spotted by Peter Berger. This was causing PM to think that a pawn in a KPK endgame could not be stopped, when in fact it could. There are still weaknesses to be addressed. - Removed a lot of unnecessary code which wasn't being used. 2. Background ============= PostModernist is a chess program written by Andrew Williams. You can email Andrew Williams on postmodernist@ntlworld.com I'm afraid that I may be rather slow at responding to emails sometimes. I hope you enjoy playing with PostModernist. PostModernist is a modern chess program, based on state-of-the-art techniques from the computer chess literature, plus a number of ideas of my own. It has played over 56000 games at the Internet Chess Club and it has participated in several online tournaments and in the World Computer Chess Championships at Maastricht in 2002. Here are a few of PostModernist's features: - MTD(f) search control - Iterative deepening - Quiescence search - Extended futility pruning - Hash tables: - Normal transpositional table - Pawn evaluation hash table - Evaluation hash table - On-the-fly updated attack boards - Two-stage opening book - Null move - Enhanced Transposition Table Cutoffs - Uses Nalimov endgame tablebases (not supplied with the distribution) - Winboard compatible (Protocol Version 1) 3. Setting Up PostModernist =========================== It is best to put postmodernist in its own directory. I don't think it matters what the directory is called, but I have never tested it in a directory which has spaces in its name. I would suggest that you put it in C:\postmodernist or something simple like that. There are some simple rules about this directory: 1 PostModernist's configuration file MUST be in this directory. This file is called pm.ini and cannot be renamed or removed. 2 There MUST be a subdirectory called book (this will contain the book files) 3 There MUST be a subdirectory called tmp (this is used when creating book files) If you have extracted this README file from the postmodernist.zip file provided by Andrew Williams, you will have a valid directory structure already in place. The .zip file you downloaded includes a preferred.bin file. You don't need to do anything at all to make it work. However, the big book file is empty. You can download a reasonable big book from http://homepage.ntlworld.com/postmodernist/book.zip The section below talks in more detail about PostModernist's opening book files. 4. PostModernist's Opening Books ================================ PostModernist has TWO opening books, and both of them must be present in the book\ subdirectory - if either is missing, postmodernist will crash on startup. The two books are called preferred.bin and book.bin See below for a description. The two .bin files are the binary versions of the books. They are created from specially formatted text files, *not* from pgn files. preferred.bin ------------- This book is used to guide postmodernist towards certain openings and away from others. Essentially, each line in the file is an opening line that you want to tell postmodernist *something* about. You might want to tell postmodernist to *avoid* it when playing white, or you might want to tell postmodernist to *prefer* it when playing white. Equally you can make "suggestions" about the openings postmodernist should play as black. An example of the *text* version of the preferred book is provided for your amusement (it is in the book subdirectory and it's called preferred.txt). Creating a preferred book ------------------------- The format of the preferred.txt file should be reasonably self-explanatory. Some hints are provided below: * Lines which begin with a # are comments and are completely ignored by PM * Moves are annotated with the standard glyphs: !!, !, !?, ?!, ?, ?? * PM generates a "score" for a move, based on the glyphs: !! = 40000 ! = 800 !? = 25 ?! = -5000 ? = -10000 ?? = -100000 No glyph = 0 * PM generates a score for every move that it knows about and then generates a random number which is used to choose from the available moves; the higher the score for the move, the greater the chance it will be selected. * You can see what scores PM had for each move in PM's log file. * There is *NO* distinction (except in your own mind) between lines for White and lines for Black. * I tend to divide the file into sections for White and sections for Black. In the White section, I put marks on the White moves. In the Black section, I put marks on the Black moves. That is the only difference between the sections. I could equally mix all the lines up, and the result would be the same. * The file is fairly complex at the moment. If you want to make your own, I would suggest two things: (1) Keep a backup of the one I have provided (2) Start with something simple and improve it in small steps until you are confident with what you are doing. Rebuilding the preferred book ----------------------------- Instructions for re-building the preferred book are as follows: (a) This can only be done from a DOS window (in Windows XP, select "Run..." from the Start Menu. In the space provided, enter: cmd.exe) (b) Change to the directory where the postmodernist executable is. By default, this will be C:\postmodernist You use the cd command to change directory (c) You need to type in the following command line at the C:\postmodernist> prompt (See step d. for an explanation of each part): postmodernist.exe makepref book\preferred.txt book\preferred.bin (d) This is what the various parts of the command above mean: (i) postmodernist.exe is the name of the program. (ii) makepref tells postmodernist to make the preferred book (iii) book\preferred.txt is the name of the new preferred book that you have created. You might have to change this part of the command if the text book you have created is called something different or is stored somewhere other than in the book subdirectory. (iv) book\preferred.bin is the name of the binary version of the book (you should not change this part of the command) (e) If you have typed the command correctly, you will get a large amount of information scrolling up your screen. Essentially, this is a list of the positions that you are positively recommending that PM *should* play. book.bin -------- This book is essentially a huge collection of games in pgn which have been processed. Once PostModernist is out of its preferred book, it "falls back" to the big book. I'm afraid I have not yet provided the facilities to create a big book. You can download one from the URL given below. You should unzip it inside the book subdirectory (you may have to delete the empty book.bin first). Get the big book here: http://homepage.ntlworld.com/postmodernist/book.zip It is about 7MB as a zipped file, and it expands to about 16MB when unzipped. PLEASE NOTE THAT IT IS *NOT* POSSIBLE TO BUILD A BIG BOOK DIRECTLY FROM A .pgn FILE!!! NOR IS IT POSSIBLE TO BUILD A BIG BOOK FROM A PREFERRED BOOK TEXT FILE! 5. PostModernist's Configuration File (pm.ini) ============================================== The following options are available via the configuration file: TTSIZE = This is the size of PostModernist's main hash table. The allowable range is from 16 to 28. Approximate hash-table sizes are: 16 = 1.4MB 17 = 2.8MB 18 = 5.6MB 19 = 11MB 20 = 22MB 21 = 44MB 22 = 88MB 23 = 176MB 24 = I'm sure you get the idea; the size doubles every time TBDIR = This is the directory of the (Nalimov) Endgame Tablebases. They are not included in this distribution of PostModernist. If you don't specify this line, PM will look in C:\TB for the EGTBs. MAKELOGFILE = This tells postmodernist whether or not you want it to create a log file. PM's logfiles have a lot of information in them, but they can get very large. So if you don't want a log file, set this option to be "NO". By default the option is set to "YES". If you delete the MAKELOGFILE option from pm.ini, you WILL get a log file. PostModernist will produce one unless you *specifically* tell it not to do so. If you leave the options as they are, postmodernist will require about 90MB of RAM to run. 6. Running PostModernist Under WinBoard ======================================= I have provided an extract from a .bat file I use. you should be able to use this to create your own batch files. This should all be on one line: "C:\Program Files\WinBoard\winboard" /cp /fcp "C:\postmodernist\postmodernist.exe xboard" /fd "C:\postmodernist\" Notice especially that PostModernist needs a parameter (xboard) in order to run under WinBoard. You must include that in the /fcp specification, and therefore you must put the command in quotes. Obviously, this example assumes that you've installed postmodernist to C:\postmodernist 7. Acknowledgements =================== - I'd like to thank Eugene Nalimov for creating his EGTBs and for giving me permission to use them in PostModernist. - I'd also like to thank Dann Corbit for the various .pgn files that I have used to create PostModernist's (big) opening book. - I'd also like to thank the very many people who have encouraged me to produce this Windows distribution of PostModernist 8. Copyright and Distribution ============================= PostModernist and all associated materials are, except where indicated above, copyright Andrew Williams. Please do NOT redistribute postmodernist! I would rather that everyone gets PM from a single source. Thanks. (C) Andrew Williams