Zarkov 2.6 - The Aegon Version

In the year since we released version 2.5, author John Stanback has been steadily improving Zarkov.  In May, 1992, Zarkov was one of 24 computers playing in the Aegon Insurance Company's 7th Annual Man-Machine Competition in The Hague, Netherlands.  Zarkov's 3-3 score , running on a 486-33 (the only losses were to GMs Bronstein and Cifuentes), was better than any other commercially available program or dedicated machine!  Two specially-built machines did better - a souped-up Mephisto model which would cost over $10,000 if sold, and a university research project using a whole network of computers.  (Zarkov has beaten the special Mephisto machine twice in a row in tournaments head-to-head now - first in New Mexico last November, with Zarkov 2.5 using a special HP Risc machine, and more recently in Austria on a standard 486!)  Two Chessmachines running at over 30MHz, (instead of  the standard 8-10 MHz models) tied with Zarkov, as did former world correspondence champion Hans Berliner's Hitech program.  Further back in the field were two versions of Marty Hirsch's highly-acclaimed M-Chess (both scored 2.5 - 3.5).	

The organizer of the Aegon tournament, Cock de Gorter, was so enthusiastic about the new version of Zarkov that he asked us if we would like to include one of his own specialized opening book files with version 2.6.  You will find this file (Aegon.bk) on your new disk.

Update Information

Please use this update information in conjunction with the complete User's Manual published with Zarkov 2.5.

What's New in Zarkov 2.6

1. Stronger than Zarkov 2.5.
2. New, positional based opening book.
3. Easier to create and modify opening books.
4. Larger transposition table (8K positions).
5. Rate your play feature.
6. Beginner, Novice, Intermediate, Expert, and Master playing strengths.
7. Balanced, Cautious, and Aggressive playing styles.
8. Analyze Game -- allows multiple candidates at each position.
9. Separate data file for all of Zarkov's text messages, commands, and menu items.

Note: There are also a number of minor improvements, such as wrap-around menus - these did not seem to require explanations.

Files included in Zarkov 2.60

*README.TXT	This document, which explains the update to version 2.6
ZARKOV.EXE	The Zarkov 2.6 program
ZARKOV.CFG	Zarkov's settings
ZARKOV.BK	Zarkov's standard (default) opening book (in binary)
ZKCGA.DAT	CGA graphics for Zarkov
ZKEGA.DAT	EGA/VGA graphics for Zarkov
ZKHERC.DAT	Monochrome (Hercules) graphics for Zarkov
DGM2GR.EXE	Program that assists Zarkov in making graphic diagrams
INSTALL.BAT	Our simple installation program
SAMPLE.BK	A small example of an optional (binary) opening book file
*AEGON.BK	An alternative (binary) opening book prepared by the 	organizer of the famous Aegon Man-Computer Tournament
*BUZ.EXE	The program for converting Bookup 7 files into Zarkov's 	ascii (.OPN) opening book format
*BUZ.CFG	Text file to guide Zarkov in assigning scores to Bookup's 	data
*SORTBOOK.EXE	Program useful for optimizing the order of variations in 	Zarkov's ascii (.OPN) opening book files

The following six files are for use in selecting Zarkov's language, as well as customizing Zarkov's menus and commands.  They are fully discussed later in this documentation:
ENGLISH.BAT 	ENGLISH.CFG	ENGLISH.LNG
GERMAN.BAT	GERMAN.CFG	GERMAN.LNG

*SAMPLE.OPN	Ascii file produced by BUZ from the Sample Bookup data
*B.BAT	A batch file for using Bookup 7 with Zarkov

The following seven files are maintained by Bookup 7, and can be used by ZARKOV and BUZ:
*SAMPLE.COM	*SAMPLE.CTL 	*SAMPLE.JMP	*SAMPLE.PSX
*SAMPLE.LIN	*SAMPLE.NOT	*SAMPLE.POS

*For users receiving Zarkov on 360k diskettes, the files marked with an asterisk (*) have been placed on diskette #2.  Please remember to copy the contents of this disk into your Zarkov directory after installing disk #1.

Stronger than Zarkov 2.5

We hope that this improvement is both self-explanatory and readily apparent!

New, positional-based opening book

Opening Book  (pages 24,25 and 39-44)

Zarkov 2.6 now uses a positional based opening book.  Each position in the book has a score associated with it.  Before computing its move Zarkov checks each of the legal moves to see if it reaches a book position.  If multiple candidates exist, Zarkov gives priority based on the positional score.  Each position in the opening book requires 6 bytes of memory.  The maximum opening book size that can be used is determined by the amount of memory available in your machine after loading Zarkov.  (To find out how much memory is still available while Zarkov is running, type MEM and press Enter.)  Up to 1,000 new moves can be added during a session without exiting and restarting the program.  When you exit, Zarkov will write the updated .BK file to disk, first renaming the original file's extension .BAK.

It is very easy to view the candidate moves at any position, modify the score for a move, add a new move, delete a move, or play a move from the candidate list.  A full description of the new and altered functions follows:
 
Easier to create and modify opening books

The BOOK menu now has the following selections:

  TOGGLE ON/OFF
  SELECT BOOK
  BOOK VARIETY	(new function)
  ADD VARIATION
  CANDIDATES	(new function)
  
Toggling the Opening Book

This works the same as described in the manual on page 24.

Select Book  ('newbook')

This option allows you to change the current opening book.  You will be prompted for the name of an opening book file to use.  If you enter the name of a file which does not exist, Zarkov will create a new opening book with that name.  For example,  you might type "user" to create a new book for yourself.  Note that the opening book is kept in memory and if any changes were made it is saved when you exit the program, and any pre-existing .BK file of the same name is renamed to .BAK.

One difference between the old and new opening book formats:  Zarkov 2.6 will use only one .BK file at a time (Zarkov 2.5 would append additional .OPN files as memory allowed).  To combine two opening books, please use the procedure described later in this document.

Book Variety  ('rand')

This option allows you to adjust the randomness with which Zarkov will select moves from the currently selected opening library.  The default value is 30.  Entering a larger value such as 50, will cause Zarkov to play a wider variety of moves from it's book.  A smaller value such as 10 will cause Zarkov to play its favorite moves most of the time.
  
Add Variation  ('bk')

Selecting this option causes Zarkov to add all the moves of the current variation to the opening book.  Each move which is not already in the book will receive a score of zero.
  
Candidates   (F4 or 'peek')

This option will bring up a window containing all the 'candidate' moves available for the current position, along with the score for that move.  Moves with higher scores will be played more frequently by Zarkov.
Clicking the mouse on a move or using the cursor keys and hitting the Enter key allows you to change the score for a candidate move.  Entering a score greater than 126 or less than -126 will cause the move to be deleted from the book.  Selecting the blank line at the bottom of the window allows you to add a new move.  This new feature makes it easy to adjust the ordering of candidate moves or add new moves that you would like the program to play.
  
Pressing the SPACEBAR when the Candidates move window is active will cause Zarkov to play the currently highlighted move.
  
Pressing the ESC key or clicking the right mouse button will put away the Candidates window.
 
ZARKOV's Standard Openings  (page 40)

Unless given a command line option to specify another opening book, Zarkov will load the file "zarkov.bk" which contains the standard opening book.  This library contains over 12,000 unique positions with an emphasis on variety rather than on depth.

If you prefer not to load an opening book at startup use the command

  zarkov /b   (press Enter)
  
If you want to load the file "mybook.bk" at startup use the command

  zarkov -b mybook  (press Enter)
  
Please note that the -u command described on page 42 is no longer used.

During a game you can modify the way Zarkov uses the book as explained above.

Supplementing ZARKOV's Openings  (pages 41-43)

You can modify the standard opening book "zarkov.bk" by bringing up the Candidates window from the BOOK menu or by using the F4 key (or typing "peek") as described above.  When you exit Zarkov, any book changes will be saved and the previous book's extension renamed .BAK.

You can also use the "Select Book" option to enter the name of your own opening library and then use the Candidates window to add moves to this book.

If you want Zarkov to score positions in an opening book, you can do this with the '-s' command line options as follows:

  zarkov -s mybook -t 15	Perform a 15 second search on each position in 	'mybook.bk' which currently is unscored (has a score of 0).
	
  zarkov -so mybook -t 30	Set the scores for each position in 'mybook.bk' to 0 and 	begin scoring each position with a 30 second search time.
NOTE: This may take a long time if you have a large opening book to score.  You can break the scoring routine by hitting the ESC key.  To resume scoring at a later time, just use the '-s' command again, and Zarkov will resume scoring at the next unscored position.
	
After scoring each position in the book you can have Zarkov adjust that score based on the scores of "deeper" book positions as follows:

  zarkov -sx mybook	Average the current score for each position with that of 	the position arising from the best candidate move.

This allows Zarkov to make use of the knowledge of "future" book positions to improve it's evaluation for a given position.  It seems best to apply this procedure about 2 or 3 times.

You can write out a file containing the variations in an opening book using the '-w' command line option as follows:

  zarkov -w mybook	Create an file called 'mybook.opn' containing all the 	moves in mybook.bk
  
To merge two or more opening books, first create ascii files using the '-w' option described above.  Then merge these text files using the DOS copy command and use the '-r' option to convert the resulting file into Zarkov opening book format.  Suppose you want to merge the opening book 'book1.bk' with the standard opening book 'zarkov.bk'.  Here's how you would create a merged book called 'newbook.bk':

  1. type->	zarkov -w book1
  2. type->	zarkov -w zarkov
  3. type->	copy book1.opn+zarkov.opn newbook.opn
  4. type->	zarkov -r newbook

When manually scoring or modifying candidate moves use the following guidelines (assuming that book randomness is set to the default value of 30):
	
If a candidate move has a score more than 30 points worse than the best candidate it will never be chosen.  If a move has a score 10 points worse than the best candidate
and there are only 2 candidates, it will be chosen about 25 percent of the time.  Therefore, at any position, playable candidate moves should lie within a score range
of about 20 points.  If Zarkov has been used to generate scores for candidate moves, the scores may exhibit a larger range than this and it would be wise to review and modify the scores where necessary, or to increase the book's randomness.

Using Zarkov with BOOKUP 7  (pages 51-55)

A separate utility called 'buz.exe' allows you to convert a BOOKUP database into an opening library for ZARKOV.  The 'BUZ' utility has been modified to allow using the BOOKUP rate codes for each position to be used by Zarkov.

Suppose you have a BOOKUP database called 'french' which contains rate codes or numeric scores for positions which favor one side or the other. You must first convert the data base into an ascii file containing variations by typing:

  buz french  (Press Enter)
  
You now have an ascii text file named "french.opn" containing all the variations found in the "french" BOOKUP database.

Move this file into the ZARKOV directory.  To convert this file into a positional- based, binary opening book for Zarkov, type:

  zarkov -r french
  
Zarkov will read in each of the moves, along with the rate codes to create an opening book called "french.bk".

If the BOOKUP database does not contain many rate codes at each position, you can have Zarkov generate rate codes for each position in the database by typing:

  zarkov -a \bookup7\french -t 15
  
Zarkov will spend 15 seconds on each unrated position in the BOOKUP database.  Then the 'buz' utility can be used as explained above to generate an opening book for Zarkov.

Another way to create an opening book from a BOOKUP database is to first use Zarkov to score all the terminal nodes of variations (called leaf nodes), and then use the 'buz' utility to create a file with scores for each variation rather than for each position.  This file can be sorted based on variation score and also on popularity using the 'sortbook' utility.  The file containing sorted variations can then be converted into an opening book for Zarkov.  The procedure for doing this is summarized here:

  zarkov -al \bookup7\french -t 30	Score each leaf node for 30 seconds.
	
  buz -o french	Create an ascii text file called french.opn with scores for each
	variation rather than for each move.
	
  sortbook french.opn	Sort the file 'french.opn'
  
  zarkov -r french		Convert the file into an opening book for Zarkov.

When this method is employed, Zarkov sets the scores for each position so as to retain the ordering of the candidate moves that exists in the file "french.opn".  Zarkov uses the score of the best variation  leading from a given position as a base score.  Note that it is important to include variations which pretty much contain best play for both sides so that the terminal scores are reasonably accurate for each move along the variation.

Larger transposition table (8K positions)

Zarkov sets aside 80k of memory (RAM) to speed up its calculations by storing 10 bytes of information about various positions it has already evaluated, then checking new positions against these to avoid re-analyzing positions that it has reached by transposition, and to assist in better move ordering while searching.  In Zarkov 2.5, only 40k (4k positions) was used for this purpose.  The larger "hash" table should produce noticeable improvement in some positions, especially in the endgame.

The transposition table can be toggled on/off via the HASH TABLE command in the SETTINGS Menu.  The size of the tables can be changed by editing the Zarkov.cfg file.

Rate your play feature

Zarkov will now try to determine your rating (according to the ELO scale, as used in the United States and elsewhere).

When a game is completed, Zarkov will ask you whether or not to use the game for rating calculation.  Zarkov will then display your rating result.

The data for Zarkov's rating calculations are stored in the file "rating.dat."  Zarkov will maintain rating data separately for each opponent (as indicated by the name you give Zarkov for each player).

Two commands have been added for use with this feature.  The "resign" command allows the user to give up a lost game without waiting for Zarkov to achieve checkmate; simply type

 resign (press Enter)

The 'rating' command causes ZARKOV to display the rating of the opponent based on games played against the various levels of ZARKOV.
 
 rating (press Enter)

Beginner, Novice, Intermediate, Expert, and Master playing strengths

Strength   

The 'strength' command allows you to select between BEGINNER, NOVICE, INTERMEDIATE, EXPERT, and ADVANCED levels.  This command is also accessable via the SETTINGS menu.

Balanced, Cautious, and Aggressive playing styles

Style	

The 'style' command allows you to select between the BALANCED, AGGRESSIVE, and CAUTIOUS playing styles.
	
Search Strategy  (page 35)

The option to select Full-Width search or Speculative search has been eliminated due to a modification to the search algorithm.  Zarkov now employs a more selective search than previous versions which allows it to analyze more deeply in a given amount of time.

Analyze Game -- allows multiple candidates at each position

Zarkov will now analyze multiple alternatives for you when you choose ANALYZE GAME in the SETTINGS menu by asking "Enter # candidates to generate."    If you specify more than one alternative, Zarkov will try to analyze and score the best, second best, third best, etc., moves in each position.

Separate data file for Zarkov's text messages, commands, and menu items 

Zarkov's commands, menu items, and displayed text messages have been moved to a separate data file (.LNG), and the setting "language=" has been added to the Zarkov.cfg file.  This adds the ability to use or create files of Zarkov's commands,     menus, and messages in languages other than English, as well as the ability to customize Zarkov's menus and direct commands.

The following files have been added:

ENGLISH.LNG	Zarkov's commands and displayed text in English
ENGLISH.BAT	Batch file which copies ENGLISH.CFG to ZARKOV.CFG
ENGLISH.CFG	New configuration file which loads ENGLISH.LNG
GERMAN.LNG	Zarkov's commands and displayed text in German
GERMAN.BAT	Batch file which copies GERMAN.CFG to ZARKOV.CFG
GERMAN.CFG	New configuration file which loads GERMAN.LNG
        
The file ZARKOV.CFG

Zarkov's configuration file is used to keep track of quite a few settings for the program, and can be updated in two ways: either by selecting Save Settings from the Settings menu in Zarkov, or by editing the file directly with a text editor.

The following three lines are the most important ones for altering Zarkov's language:
        
  language= english
  opponent= HUMAN
  pieces= PNBRQK

The .LNG files

BEFORE EDITING ANY FILE, PLEASE MAKE A COPY OF YOUR CURRENT FILES  FOR REFERENCE AND SAFEKEEPING!

To create a new .LNG file for any language, simply edit an  existing .LNG file with an ascii text editor and replace the current phrases with those of your preferred language.

Then save the file with a new name ending with .LNG, and access  this file by editing the first line (language=  ) of ZARKOV.CFG (described above) to choose the new language. 

To customize your current commands, you may edit the .LNG file.  
You must follow a few basic rules:

        1.  Customizing the direct commands (the words that can be typed 
        in at the keyboard without calling the menus) can be done by 
        editing the first word or phrase on lines 1 - 108 of the .LNG 
        file.  WARNING: these words MUST be in all lower case, or Zarkov 
        will not recognize the direct command!

        2.  Customizing the menu contents can be done by editing the 
        words displayed within the double quotation marks on lines 
        1 - 104.  But do not change the keystroke reference at the end of 
        lines 1 - 13, as these keys cannot be reassigned within the program.

        3.  The remaining lines of the .LNG file contain messages which 
        Zarkov will display on its status line, and can be customized 
        within reasonable limits.

Using batch files to choose your language

The .BAT files provided (such as ENGLISH.BAT and GERMAN.BAT) will  exchange your current language choice for the choice contained in ZARKOV.CFG by copying the preferred .CFG file over the current configuration file.  Simply type the name of the preferred language, such as ENGLISH or GERMAN, at a DOS prompt to change languages before starting Zarkov. 

If you create .LNG and .CFG files for an additional language, you can also create a corresponding .BAT file to make switching to the new .LNG file fast and easy. 

Problems, questions and suggestions
        
If you have any problems, questions, or concerns - or if you create any language files which you would like to share - please contact Chess Laboratories or one of its representatives.  We are very interested in your suggestions!

	Chess Laboratories
	P.O. Box 3541,	South Pasadena, California 91031, USA
	Telephone: 	818-799-7567    
	Fax: 	818-799-2530
	Compuserve: 	70323,2674