Title: Documentation on Chess Program B1
File: D:\CHESS\B1\B1.DOC
Last Update: 1997-03-18
Written by: David Broughton
INTRODUCTION
B1 is the development code name of the chess program also known
as Philidor. It was written by me in 1982/83 for the IBM-PC as
it then was, with version 1.1 of DOS. The computer had only 128
Kbytes of RAM and two floppy disk drives with a capacity of 160
Kbytes. There was no CMOS memory and no CONFIG.SYS file. The
keyboard was the small version with the function keys down the
left hand side and there were no arrow keys. At first there was
no colour screen but a CGA screen with four colours was
introduced during development when it was decided that a larger
diagram of the chess board was required (as opposed to the
minuscule text-based version). This was incorporated after much
modification. There was no mouse available at that date.
The program was written under contract and I do not possess the
copyright so this program is strictly not for sale or for giving
away in any form.
IMPORTANT NOTE ABOUT INSTALLATION AND RUNNING
This program is for running under DOS in a simple environment
(i.e. no multiprogramming system, not DESQVIEW and not WINDOWS in
any version). All the files must be available in the logged-in
directory. After running, REBOOT YOUR COMPUTER or you will have
trouble as the interrupt settings may be incorrect.
INSTALLATION
The files required in the logged-in directory are as follows:
B1DAT.ROM 2304 91-04-20 18.46
BKA.BN 18560 83-09-19 21.06
BKB.BN 7040 83-09-19 20.05
BKC.BN 384 83-09-17 12.33
BKD.BN 8448 83-09-18 10.33
BKE.BN 128 83-09-17 12.43
BKF.BN 256 83-09-17 12.44
BKG.BN 128 83-09-17 12.45
BKH.BN 128 83-09-17 12.45
CHESS.COM 32752 91-05-13 17.12
OLAY(BK).OLY 412 91-05-10 15.29
OLAY(DS).OLY 768 91-05-10 15.29
OLAY(DV).OLY 216 91-05-13 11.56
OLAY(IS).OLY 404 91-05-10 15.30
OLAY(KP).OLY 8497 91-05-10 15.31
OLAY(M1).OLY 420 91-05-10 15.31
OLAY(M2).OLY 565 91-05-10 15.32
OLAY(M3).OLY 1578 91-05-10 15.32
OLAY(M4).OLY 659 91-05-10 15.32
OLAY(M5).OLY 1105 91-05-10 15.33
OLAY(M6).OLY 1118 91-05-10 15.33
OLAY(R0).OLY 431 91-05-10 15.33
OLAY(R1).OLY 616 91-05-10 15.34
OLAY(R2).OLY 725 91-05-10 15.34
OLAY(RR).OLY 312 91-05-10 15.34
The program name is CHESS.COM so to run the program just type
CHESS and press Enter. To stop the program, press Ctrl/Alt/Del
to reboot the computer. However, make sure you have saved any
game first.
B1DAT.ROM is the data for a supposed ROM and contains fixed data
which is loaded by CHESS.COM on start-up. The files with .BN
extension are opening book files. The files with extension .OLY
are overlay files. The program makes extensive use of overlays as
the original IBM-PC only had 128 Kbytes of RAM.
OPERATING INSTRUCTIONS
======================
There are two screens. There is the large colour display screen
called COLOUR SCREEN and the black-and-white text display called
the INFORMATION SCREEN. They are toggled with Control A. On
start-up the COLOUR SCREEN is selected.
Most of the general operation of the program for setting up the
game must be done with the Information Screen selected. The
Colour Screen can be used during the routine play, including the
entering of moves with the cursor.
The INFORMATION SCREEN.
This is in three sections. At the top left is a menu of ten
items which are selected with the function keys. Altogether
there are six menus. Each menu is selected with the digit keys 1
to 6 (and also with Alt 1 to 6, useful when you want to select a
new menu in the middle of data entry). Each menu brings in a
different overlay module from the disk so the first time they are
used (and sometimes subsequently) there will be a slight pause
before the new menu appears. Although each menu, in general,
provides a different set of options, one which is the same on
most is F1 labelled STOP#GO. This operation is the most
important as it starts and stops the chess task. It is also
available when the Colour Screen is showing.
STOP means stop the chess task, which is done by pressing F1.
(The chess task is one of the multiprogramming tasks or
sub-programs.) There are some operations that are not available
when the chess task is running and you may see "PRESS STOP FIRST"
on the screen.
To start the chess task (and to start the clocks) press Shift F1.
Whilst the chess task is running it will automatically compute
the program's next move. When it is your turn to move, and if
THINK is selected (see below, MENU 2, F3), then the chess task
may continue to analyse the current position on the basis of a
predicted move by you. If you make the predicted move it will
most likely play quicker on the next move. If you do not play
the expected move then the chess task will start it's analysis
again from the position reached.
The STOP/GO status of the chess task is shown by coloured arrows
for the side to move at the side of the playing board. On the
information screen the arrows are cyan for stopped, blue for the
player to move and green for the program to move.
The playing board is to the right and shows black pieces as lower
case letters and white pieces as upper case letters. The black
pieces also have an asterisk to make them more obvious.
Under the board are various items of general information and
status markers such as the mode of play, timing, analysis (if
switched on) which side the computer is playing, etc. This is
also where messages are given and data is entered.
The lower left of the information screen is the "printer output".
If a printer is connected and is toggled ON, the information
given in this part of the screen will be printed as well as being
echoed here. This part of the screen will scroll up when full.
The COLOUR SCREEN
On the colour screen the STOP/GO arrows are magenta or cyan when
the chess task is running (i.e GO state) and white when stopped.
The magenta colour is shown when the computer is thinking about
its own move and cyan when it is your turn to move.
The last few moves of the game can be displayed on the bottom
line by pressing the space bar. There is little further
information. Error messages will appear on the bottom line as
required and will disappear after a few seconds.
MOVE ENTRY
Algebraic moves can be entered using the keyboard in the form
from-square to-square. For example, E2E4. Captures are just the
same. Castling moves are entered as king moves (or you can use
the O-O notation). For pawn promotions, enter the promotion
piece code after the move, for example, E7E8R. If no promotion
piece is given, a queen is assumed.
Moves can be taken back and played forward with the + and - keys
to the right of the numeric pad.
Provided Num Lock is on, the digit keys on the numeric pad can be
used to direct the cursor. Once the cursor is on the piece you
want to move, press 5 and move the cursor to where you wish to
move the piece and press 5 again. If there is only one legal
move to a particular square you can abbreviate this procedure by
simply placing the cursor over the to-square and pressing 5,
MENU 1
F1: STOP/GO. STOP is F1. GO is SHIFT F1.
F2: SET HEADING. Allows a heading or title for the game
that will appear on printouts and will be saved on disk
when and if you save the game.
F3: NORMAL mode. This key sets the program to normal mode in
which the program is given an average time for each move.
By default this is 10 seconds per move but can be changed
with SET MODE PARAMETERS on F3 of Menu 5. The program
will only play to an average of this speed. In some
positions it may take longer and in others it may play
play much quicker.
F4: PLAY WHITE. Make the program play white.
F5: TOURNAMENT Mode. In this mode the program plays a given
number of moves within a specified time or it will lose
the game, but it can use the time freely within those
constraints. The default is 30 moves per hour.
F6: PLAY BLACK. Make the program play black.
F7: BLITZ mode. In this mode the program plays to a fixed
time for every move. The default is 10 seconds per move.
F8: PLAY BOTH. The program plays both sides automatically.
This is not allowed in TOURNAMENT mode or PROBLEM mode.
F9: PROBLEM Mode. The program is set to find a mate within a
specified number of moves or verify that no mate exists.
The solution or solutions are printed on the left screen.
It can also be used to find a refutation to a
hypothetical solution to a problem or find multiple
solutions to problems. To make the program find a
refutation to mate, start the program with Ctrl F1
instead of the usual Shift F1 after playing the
hypothetical mating move and reducing the number of moves
to mate by one.
F10: PLAY NOW. Forces the program to play its best move now,
but this is not allowed in Tournament Mode.
MENU 2
F1: STOP/GO. STOP is F1. GO is SHIFT F1.
F2: ANALYSIS. Toggles analysis display ON/OFF. This is a
display line below the board on the information screen
that shows the program's best move so far and its
predicted continuation together with the value it places
on the game after the move has been played. Zero is an
even game with + values being used to denote a winning
position for the program. The value 1.0 is the value of
a pawn. Mate values are shown as +Mn or -Mn where n is
the number of moves to mate.
F3: THINK. This toggles the ability of the chess task to
think in the opponent's time. By default it is ON as
this gives the program an advantage.
F4: BEEP. Toggles the speaker output. If ON, a beep is
given after every move is played by the program and after
some error conditions.
F5: UNDERLINE. On the information display board with this
feature ON you will see some pieces underlined (or, for
screens with colour, in blue). This shows which pieces
have not yet moved or which pawns have just moved two
squares. It is used as part of the status information
used by the program to generate legal moves. For example,
a king that has moved may not castle.
F6: SWAP BOARD. This will swap the direction of play on both
the text and colour screen displays.
F7: PRINTER. This will toggle the printer ON/OFF. When ON,
the information sent to the lower left of the information
screen will be echoed to the printer.
F8: REFORM SCREEN. Used to refresh the screen display and
also useful to provide a clean game score if there have
been many takebacks.
F9: MOVE NUMBER. The move number can be set with this key.
This would be needed, for example, after setting up a
game that has already started and has not been saved on
disk.
F10: PLAY NOW. As MENU 1.
MENU 3
F1: STOP/GO. STOP is F1. GO is SHIFT F1.
F2: List Files. See what game files are on the the disk.
Game files have a file extension .B10.
F3: ADVANCE 10. Clears out 10 moves from the game record.
This is used for very long games where all the moves
played in the game cannot be stored in the game record
due to limited memory (143 moves for both sides can be
stored).
F7: NEW GAME. Set up a new game, losing the old game. Make
sure it has been saved first if you want to keep it.
F8: REPLAY. Replay the game from the start. Use the + key
to the right of the numeric pad to advance the game move
by move according to the stored score. The - key will
take moves back.
F9: GET GAME.
F10: SAVE GAME. These two keys allow you to save and load
games on the disk. Name of game files must conform to
simple DOS 8-character file names without an extension
and without a path (there was no such thing as a "path"
in DOS 1.1). However, a drive letter may be included.
MENU 4 POSITION SET-UP
F1: POSITION SET-UP. This key will put you into a mode where
the current game will be lost and a new position will be
set up. It must be pressed first.
To enter pieces on the board press the upper or lower case letter
corresponding to the piece. Use the space bar to clear a square.
Backspace and Enter can be used to move the marker.
F3: CLEAR BOARD. Will clear all pieces from the board.
F5: QUIT. This key will cancel the position set-up mode and
restore the old game and position.
F7: SWAP SIDE TO MOVE. The side to move is shown on the
display screen. Make sure this is correct before
pressing F9.
F9: Done. The old game will be lost and the position set-up
mode will be terminated. (This assumes the position is
legal. An extensive analysis is performed to check
this and information given to tell you what is wrong with
the position if it is not legal.)
It is sometimes necessary to show various status situations that
the board position alone cannot show. These are done as follows:
Side to move. Press F7 to adjust the side to move before
pressing F9. The side to move is shown with the arrow characters
at the side of the board.
Castling status. You can show that castling is allowed when the
king and rook are in their home positions by marking the king and
rook as not having moved. This is done with the underline key.
On a colour text screen this is shown as a dark blue colour for
the piece. To show that castling is not permitted, make sure the
king or rook are marked as having moved by placing the pieces on
their squares in the normal manner where they will be shown in
white.
En-passant captures. To show that an en-passant capture is
possible on the next move, mark the pawn that has just moved two
squares with the underline key and make sure that the side to
move on pressing F9 is for the other side and that a pawn is in
the appropriate position; i.e. on the same rank as the pawn just
moved and adjacent to it.
To show that a draw by repetition is possible you must play the
appropriate number of repeated moves manually after setting up
before starting the chess task.
To show that a draw is possible by the 50-move rule after some
given number of moves you must use Shift F9 on Menu 2 and enter
the number of ply (i.e. double the number of moves) that have
been played previously since the last pawn move or capture. This
has to be done after pressing DONE on F9.
To change the move number, use F9 on Menu 2 after the position
has been set up.
MENU 5
F1: STOP/GO. STOP is F1. GO is SHIFT F1.
F2: ZERO CLOCKS.
F3: SET MODE PARAMETERS. Depending on the selected mode, the
program will prompt you for the required parameters.
F4: Set White's clock.
F6: Set Black's clock. Times are entered as three numbers
separated by colons, representing hours, minutes and
seconds. The seconds may be omitted.
F9 & F10 allow you to adjust the program's clock in Tournament
Mode in increments or decrements of 30 seconds.
MENU 6 PRINTER CONTROL COMMANDS
The function keys will print various features as labelled. The
printer need not be ON as the lower left hand display will also
show you what would be printed, so it is wise to play with these
features before going into hard copy.
STATUS CODES
At the bottom right of the Information Screen are letters to show
various status conditions as follows:
S Scroll lock is ON
A Analysis display is ON
U Underline mode is ON (see Menu 2, F5)
L Caps lock is ON
C Num Lock is ON, as it should be to use the cursor.
T THINK is ON (see Menu 2, F3).
B BEEP is ON (see Menu 2, F4).
P PRINTER is ON (see Menu 2, F7).
FURTHER INFORMATION
Please report any errors or difficulties with understanding this
document or if you cannot find out how to do some operation.
David Broughton,
david@ddina.demon.co.uk