                               NOW
                     A COMPUTER CHESS PROGRAM
                             (DRAFT)
                                 
                     Imagination Enterprises
                           Mark Lefler
                          December 1991
                           Version 0.1
                                 

Introduction

     NOW is a state-of-the-art (?) computer chess playing program
for the IBM-PC line of computers.  NOW will work on any 8088,
80286 or 80386 machine with CGA, EGA or VGA displays.  For text
only displays, the program will use a simple text only
representation of the board instead of the fancy graphics.

     NOW is not a profit making program.  Funds received on this
shareware program are used to pay duplication costs, salaries of
a business manager and to buy new development hardware.  Your
contribution will help develop a stronger, more feature-filled
program.  End of commercial.

     NOW did rather well in the 1991 Microcomputer Chess
Championship.  It finished with the best score for an amateur
program running on a PC with only M-CHESS beating it on a PC. 
Other programs which beat NOW ran on very fast RISC-based
processors, much faster than NOW's 40 MHz 80386 machine.

     NOW is not meant to compete with other powerful commercial
programs, such as M-CHESS, ZARKOV or Chessmaster 2100.  It is
simply a shareware option.

     You will find that NOW has some pretty nifty features, such
as an easy-to-use user programmable opening book.  You can even
help me in developing a stronger program (See the COMPUTER GEEKs
section later on).

     How strong is NOW?  I really do not know.  In my testing, it
has easily beaten many commercial stand alone chess machines,
when played on my 40 MHz 80386 computer.  I know that NOW seems
stronger than:

     Fidelity Designer 2000
     Radio Shack Chess Champion 2150 and 1450
     Saitek's Cavalier
     and other, less strong programs.

Based on its strength against other commercial chess computers, I
estimate its playing strength at about 1500 on a PC, 1600 on a
turbo PC, and higher on faster hardware (perhaps 2100 on a 33 MHz
80486).  NOW also does rather well in some standard computer
chess problems.

   NOW was named since it is the program I am working on now.


GETTING STARTED

     Note that some keyboards mark the <Return> key with a
<Enter> label or a bent arrow pointing to the left.  Just
substitute <Enter> for <Return> in the instruction below.

     You can copy NOW to a hard disk.  Just make sure to copy all
of these files over to the other disk:

   NOW.EXE      (The program itself)
   NOW.BOK      (NOW's opening book)
   NOW.HLP      (NOW's help file--this manual on disk)
   CGA.BGI      (For CGA graphics)
   EGAVAG.BGI   (For EGA or VGA graphics)

You can give friends copies of this version of NOW, provided that
these instructions stay with the copies and you charge absolutely
no fee.  Imagination Enterprises retains all overseas
distribution rights to NOW.


USING NOW

     Load NOW by typing:

     NOW <Return>

     You have several options.  If you include an 'X' after the
program name, you will see "extra" information while NOW runs
such as the program's current best move and number of positions
searched.  You can get a list of these options using:  NOW ? from
the command line.


MAKING MOVES

     To play white, just type in your moves using algebraic chess
notation (Column, Row).  For example, to move the king's pawn two
spaces forward, type:

     e2e4

     You do not need to press <Return> to finish your entry of a
move.  To play black, see the section Switching Sides below.
     
     If you have a mouse, then just point to the piece you want
to move, and click and release the left mouse button.  Next point
to the square you want to move it to and click again.  You must
load your Microsoft Mouse compatible driver before beginning the
NOW program (see the instructions that came with the mouse).  The
program will ignore from clicks on pieces you cannot move.

Who's Move Is IT?

     It is easy to see who is to move next by looking at the
chess clocks in the upper right corner of the screen.  You will
see a > symbol next to the side about to move.  For example, 

     >W:You    3:45
      B:NOW    2:23

means that it is now your move, you are playing white (W) and you
have taken 3:45 of time when you last made a move.  In the lower
right corner is the elapsed time you have taken so far on this
move.  This will be added to the total elapsed time once you make
a move.

Special Moves

     Enter castling moves by moving the king two squares (the
rook will tag along).  En-Passant moves are entered by moving the
pawn--the opponent's pawn will be taken off for you.  When a pawn
reaches the eight rank, you will be asked to select a new piece
(N-Knight, B-Bishop, R-Rook or Q-Queen).

     If the board gets messed up, the d<Return> command will
redisplay the entire board.

     Do not remove the disk while NOW is running since NOW needs
to get and save information on the disk while it is running.


SWITCHING SIDES

To switch sides (for example, to play black), type:

     s<Return>

The program will change sides, and immediately begin thinking of
a response.  Using the EDITOR and the S command, you can enter
chess problems and have NOW look for a solution.  You may also
want to use the Reverse Board (rb) command to turn the board
around.


REVERSING THE BOARD

You can reverse the board (rotate it) by typing:
     
     rb<Return>

You may want to do this if you are playing black.


GETTING HELP

     You can press f1 or ? to get a screen of help information. 
To return to the game, press ESC.  If you would like to read the
online manual, press any other key.  You can also get help by
clicking the mouse on the f1-help label in the upper right corner
of the screen.


FORCING NOW TO MOVE

     You can force NOW to make a move immediately by pressing the
ESC key while NOW is calculating.


SAVING A GAME (POSITION)

     To save a current game position, type:

     sg<Return>

You will then be prompted for a name to call the saved position.
sg is short for save game.  You will find that the game save
format is easy for a human to read, and can be imported into text
files or printed out for a record of your moves.  This format is
based on the format that a very powerful commercial chess program
called ZARKOV uses.


LOADING A GAME (POSITION)

To load back in a game, type:

     lg<Return>

then the file name.  'lg' is short for load game.


SETTING THE TIME

     With NOW, there are four different time modes.  You can set
the Average Time per move, play a traditional Tournament Time
controlled game, play with Equal Times or set the total Game Time
for each side.  The current default is 300 seconds for the entire
game--good for speed chess games.  Note that NOW will not call
for a win (or make obnoxious beeps at you), if you go over time.

     In each of these modes, you can enter times in seconds
(like: 36), or minutes and seconds (like 1:00) or hours, minutes
and seconds (like 2:00:00).

To set the average time per move, type:

     t<Return>

(or at<Return>) and enter the new time.


SETTING TOTAL GAME TIME

     You may also set the total time each side has for a game by
typing:

     gt<Return>

then entering the time like above.  For example, for a one hour
per side game, you could enter 3600 or 1:00:00.  For a 5 minute
per side game enter 300 seconds or 5:00.  NOW will try to play
all of its moves before this time limit expires (sudden death
mode).


EQUAL TIME MODE

     You can have NOW take approximately the same amount of time
to make its moves as you do by using the Equal Times command:

     et<Return>

NOW will try to match your time per move.  This is a good mode to
use if you are not sure how long you are going to take for each
move of the game.


TOURNAMENT TIME MODE

     To set tournament time control, use:

     tt<Return>

NOW will make its first 40 moves within 2 hours, and each
additional 20 moves within an additional hour.


SETTING THE CHESS CLOCKS

You can set the elapsed Human Time (chess clock) by typing
ht<Return>.  Then give the total human elapsed time.

You can set the current Computer's Elapsed Time using ct.


TURNING THE BEEPER/MUSIC ON AND OFF

To turn the Beeper on and off, type:

     b<Return>

If the beeper is OFF, NOW will make a quiet click instead of a
loud beep.

To turn the music on or off use the No Music toggle:

     nm<Return>


EXTRA INFORMATION

     To display or stop displaying the "Extra" information, type:

     x<Return>

This will show somewhat cryptic information about the computer's
search for a move, including its guess at the game continuation,
search depth, score for the position, number of positions (nodes)
examined and so on.  You may find this inside analysis useful in
examining master level games.

The score NOW shows is based on how well it thinks it is doing. 
A positive score means that NOW thinks it is ahead.  a Pawn is
worth about 1, and Rook about 5 and so on.  Score about 80 or
below -80 mean a mate is coming up soon.  M in 5 means NOW thinks
it can mate you in 5 or fewer moves.  You will find more about
the Extra command in the COMPUTER GEEKS section.


QUITTING OR STARTING A NEW GAME

To quit the game or start a new game, type:

     q<Return>

You will be asked if you want to save the current game.  NOW will
always save the current game to another file called NOW.GAM--
just in case you wish to continue the game again later.  You also
may use the - key to undo the last move, in case NOW has mated
you and you want to try another move.

You will then be asked if you want to play another game.  Y will
give you a new game, and N will stop the program.  


EDITING THE BOARD POSITION

To Edit a board position or setup a chess problem, type:

     e<Return>

You can move the bright square to the desired location using the
arrow keys or by clicking the mouse, then type the following to
place the pieces:

     p - pawn
     n - knight
     b - bishop
     r - rook
     q - queen
     k - king  (Note only one king per side)

You should always position the kings first.  NOW will warn you if
you try to put another piece on top of the king.

You can Switch to the other color by using s.  The last side
changed to will be the color you will have from then on in the
game, or until you switch sides.

     A SPACE will delete a piece on the board.

     Make sure the current displayed To Move color is set to the
color you want to move next  (you can use s on an empty square),
then press ESC to get out of edit mode.  When you exit edit mode,
NOW assumes you want to move next.  If you want NOW to begin
calculating, use the s-switch sides command described above.


TAKING BACK A MOVE

To take back a move use the - (minus) key or type:

  un<Return>

If NOW is calculating a move, you must first press ESC to force
it to move.  Then press - to undo NOW's last move, and - again to
undo your last move.  You can backup the game all the way to the
beginning, if you want.  The "tb" (Take Back) command will take
back a full move for each side.


THE GAMES FILE

     While NOW runs, it will store information about your games
in a file named 'GAMES'.  You can delete this file if you wish,
or use it to keep a record of your games against NOW.  To get a
printout of this file, from DOS type:

     copy GAMES prn
     
You can also get e printout of the current game from within the
program by using the save game (sg) command.  Simply save to the
printer by giving prn for the file name.


COMMENT MODE

     You can also add comments to the GAMES file while using
NOW.  Just type c<Return> and you will be prompted for your
comments a line at a time.  Just press <Return> on a blank line
when you are done entering comments.  The comments will be added
to the GAMES file.


NO COMPUTER RESPONSE MODE

If you do not want the computer to make a response to your moves,
then type:

     nc<Return>

for No Computer.  Another nc will reset the computer so it will
respond after you make a move, or type s to switch sides.

You can use this mode to have the computer act as a referee,
since it will not allow any illegal moves.  It is also useful in
entering a series of move, for example to have NOW analyze Master
games or games you have played.  Make sure to turn off No
Computer when you want NOW to play against you again.


SETTING COLORS

     You can set the colors of pieces and squares using the
following commands:

     wc<Return> - White Piece Color
     bc<Return> - Black Piece Color
     dc<Return> - Board Dark Square Color
     lc<Return> - Board Light Square Color

In each case, you will need to enter a number for the new color
you want.  Use 0-3 for CGA and 0-15 for EGA/VGA.  Some color
combinations may make pieces vanish so be careful.  The default
color set on EGA/VGA is the classic white and black pieces on a
green and beige board used in real tournaments--I can't stand the
purple and orange combinations used in some programs, but I give
you the choice to change them.  The changes are automatically
stored in the NOW.SET file, for the next time you run NOW.


THE OPENING BOOK

To turn on or off the opening book, type:

  ob<Return>

Unlike most commercial programs, NOW stores actual positions in
its opening book.  This lets NOW find all possible transpositions
very quickly.  You can't fool NOW by making the some position
using a different series of moves.

NOW has a very neat feature, where you can add more positions to
the opening book.  To do this, make the moves on the on screen
board (Hint:  the nc, no computer replay mode makes this easy). 
Next type:

  ap<Return>

to Add the Position.  You will be asked for a score for that
position.  Enter a number from -100 to 100.  Higher numbers mean
that the program will think the position is better for the side
which just moved.  You can change the score of a position in the
opening book by using cs (Change Score).
     By carefully changing scores, you can encourage the program
to play certain specific openings.  Just use the nc mode to make
the moves and change the score with cs.  
     NOW currently will store about 4500 positions in its opening
book.  Future version will allow bigger user books.  If you want
to delete a position from the book, use the dp command--but you
should make sure you keep a copy of the old book file (NOW.BOK)
just in case.


REPLAYING A GAME

     You can have NOW "rewind" and replay a game using the Replay
Game command:

     rg<Return>

The board will be restored to the starting position.  Each time
you press +, NOW will make one more move in the game.  You can
stop the replay at any time by pressing ESC.  You might want to
do this if you wish to play from one position in a different way
to see what would happen.

You can have NOW play each move in an animated fashion by
pressing a.


MAKING NOW PLAY WORSE

If NOW plays too good for you, you can greatly reduce its playing
ability two ways:

1. Set the average time (t command) to about 5 seconds or less. 
The less time NOW has to think, the poorer it will play.

2. Set the search depth to a small number by typing:

     sd<Return>

then enter a small number, like 1 or 2.  This will limit the
depth NOW searches.


MATE SEARCH MODE

     NOW has a special Mate Search mode.  This mode will force
NOW to look only for mates.  Turn on Mate Search by typing:

     ms<Return>

You will also want to set the time you want now to search using
the Average Time (at) command above.  To get NOW to begin
calculating, use the s Switch Sides command.  Make sure to use ms
to turn off Mate Search if you want to resume normal play.  NOW
will stop searching when its per move time limit is reached, or
when it Search Depth limit is reached, so to search for deep
mates, make these numbers big.


FOR COMPUTER GEEKS ONLY

     Warning!  This section goes into hairy technical detail and
may cause neural damage!  Read with care!

     For the computer chess geeks among you, NOW uses the
Alpha-Beta algorithm with selective search extensions.  On AT's
and faster machines, it typically searches 5-6 plies.  This
version of NOW includes more selectivity and extensions for
certain types of moves than earlier versions.  NOW is written in
Turbo Pascal, with a few lines in assembly for speed.

     Here is what some of the Extra info mentioned above means:

  5/03/35   - means that NOW has examined up to the third move
out of 35 in the fifth ply of its search.  Of course some moves
like checks and captures are examined more deeply than this.

   3567 n/s - means that NOW examined about 3500 nodes
(positions) each second while selecting its last move.

  34343     - means NOW examined about 35,000 nodes when making
its last selection.

 235456 mvs - means that NOW generated this number of moves in
its search (but only serached the number above).

  The line of moves found on the right edge of the screen on
EGA/VGA screens it the principal variation found the last time
NOW computed a move.  The current principle variation will be
found below the clocks, along with an estimate of NOW's current
score.

     The GUESS: e2-e4 line indicates that NOW thinks you will
play e2-e4 on your next move.  It tries out this move and
calculates a response for it while you are deciding on your move.

     You can help make NOW more powerful by using a secret
feature called "Auto Testing".  To do this, you must make a
special .BAT file like thise:

:START
NOW -z 10 -ds 3 -sm1 5 -sm2 10 -sm3 20
NOW -z 10 -ds 2 -sm1 10 -sm2 20
goto START

Don't worry.  I will explain all of these number to you.

This file should be called something like AUTO.BAT.  This file
will automatically start up the versions of NOW, one after the
other and have them play against each other.  The results of the
match will be put in the file CHESS.TST.  This file will contain
a listing of winners or DRAW for each game played.  By using the
USCF rating formula, you can calculate which program is
strongest, and by how much:

Rating = 400 * (# wins - # losses)/# games

Now for the numbers after NOW above:

  -z 10 means to autoplay with an average of 10 seocnds per move.
  -ds 3 means to use a selective depth of 3.  Higher this number,
the more moves that are thrown out, at the benefit of a deeper
search but at the risk of throwing out a possibly good move.
  -sm1 5 means use a Selective Margin of 5 for depth 1.  The
smaller this number, the more moves are thrown out.  The bigger
this number, the fewer moves are thrown out.

Here are some reasonable starting numbers:

  NOW -z 5 -ds 3 -sm1 5 -sm2 5 -sm3 50

If you come up with better numbers, let me know so I can improve
the program.  You should play at least 100 games in each round to
eliminate statistical variations.  You can get NOW to log all of
the moves in file by using the -lg command.  For instance:

  NOW -z 5 -lg FRED

will have NOW make a move, and store info about this move in the
file named FRED.

I want to thank the author of the wonderful program ZARKOV (John
Stanbeck) for his suggestions about auto testing.  Buy his
program!


QUESTIONS/COMMENTS/HOW TO SEND MONEY

     NOW is still under development.  To report a bug, give me
comments and program suggestions or make a contribution towards
its development, write to:

          Imagination Enterprises
          11877 Mintwood Ct.
          Orlando, FL  32837
          
Make checks payable to Imagination Enterprises.  The suggested
contribution is $20, or the entire contents of your wallet.   A
special, faster IBM-AT/386 version is available from the same
address.  Please specify 3.5" or 5 1/4" disk.

You can contact Imagination Enterprises with the address: IMAGINE
on GeNIE.
