File: CHEKMO.WU of Tape: Various/ETH/fc-files
(Source file text) 






        ABSTRACT
        --------

        CHEKMO-II is a chess playing program which will run on any PDP-8
        computer.  The program will play either the White pieces or the Black
        pieces and will play and accept all classes of legal moves, including,
        castling both short and long, en-passant pawn captures, and pawn pro-
        moting moves to any legal promotion piece.  The program prints out its
        moves in Algebraic Notation, and accepts moves using this Notation.

        Included in the command structure of the program are commands which
        allow you to input board positions using Forsyth Notation, and get a
        printout of the board at your terminal.

        EQUIPMENT
        ---------

        CHEKMO-II will run on any PDP-8 family computer with a minimum of 4K
        of memory and an ASR33 Teletype (1), or equivalent terminal.

        EXECUTION TIME
        --------------

        The time that CHEKMO-II takes to calculate a move is highly dependent
        upon the position of the pieces, but it is generally within the range
        of 20 seconds to 2 minutes per move.  In "blitz mode"  (see the "BM"
        command), CHEKMO-II makes its moves much more quickly, but at the cost
        of reduced playing strength.

        Note:  All times quoted are assuming that CHEKMO-II is being run on
        a PDP-8/e (1.2 us cycle time).

        LOADING AND STARTING CHEKMO-II
        ------- --- -------- ---------

        The CHEKMO-II binary tape is a standard binary tape and can be loaded
        using the BIN Loader program (DEC-08-LBAA-PM), or the OS/8 "ABSLDR"
        program.  The starting address for CHEKMO-II is 0200.  CHEKMO-II can
        be halted and restarted at location 0200 at any time.


        (Note for OS/8 users:  A short patch to the input routine is available
        which allows CHEKMO-II to respond to CTRL/C (^C) by returning to the
        monitor system.  Play may be resumed simply by typing ".ST" followed
        by a carriage return.  Specify '/S' to ABSLDR to include this patch.)




        (1) Teletype is a registered trademark of the Teletype Corporation.


        CHEKMO-II  Chess Program for the PDP-8               Page 2




        ON LINE OPERATION
        -- ---- ---------

        Before continuing please note that all lines of input to CHEKMO-II
        must be terminated with a carriage return.  Typing a CTRL/U character.
        echos "^U" and erases anything typed so far on a line.  Typing a RUBOUT
        character deletes the last character typed and prints a "\" character
        to indicate the deletion.  CHEKMO-II has an input buffer with room for
        24 characters.  If more than 24 characters are typed on a line (exclud-
        ing rubouts and the "rubbed out" characters), a "^U" is printed and the
        entire line is deleted.

        When CHEKMO-II is started at location 0200 it will print. . .

        CHEKMO-II

        To identify itself and setup the pieces on its internal board to their
        original squares.  Then it will ask. . .

        W.  YOUR MOVE?

        The "W. " at the beginning of the line is to indicate that it is whites
        move.  The "YOUR MOVE?" indicates that CHEKMO-II is waiting for you to
        input a move for white, using modified Algebraic Notation (described on
        P. 6).  If the move that you type in is illegal or impossible CHEKMO-II
        responds with. . .

        ?
        W.  YOUR MOVE?

        asking again for you to type in a legal move.  If a legal move is typed
        CHEKMO-II will make the move on its internal board, then ask. . .

        B.  YOUR MOVE?

        CHEKMO-II is now waiting for you to type in a move for black (note the
        "B.").  As before, typing in an impossible move causes CHEKMO-II to...

        ?
        B.  YOUR MOVE?

        ask again for a legal move.  A legal move causes CHEKMO-II to make that
        move on its internal board, then ask for a move for white.


        CHEKMO-II  Chess Program for the PDP-8               Page 3



        Play continues in this manner until a move is made that checkmates or
        stalemates.  At that time CHEKMO-II will print. . .


        CHECKMATE

        or

        STALEMATE


        In either case the final position is then printed

                    -- ** -- BK -- ** -- **
                    ** -- ** WQ ** -- ** --
                    -- ** -- ** WK ** -- **
                    ** -- ** -- ** -- ** --
                    -- ** -- ** -- ** -- **
                    ** -- ** -- ** -- ** --
                    -- ** -- ** -- ** -- **
                    ** -- ** -- ** -- ** --

        CHEKMO-II now restarts itself at location 0200 and is ready to play
        another game.



        Codes:    B-  BLACK
                  W-  WHITE
                  P-  PAWN
                  B-  BISHOP
                  R-  ROOK
                  Q-  QUEEN
                  K-  KING
                  N-  KNIGHT
                  S-  ALSO A KNIGHT


        CHEKMO-II      Chess Program for the PDP-8            Page 4

        SPECIAL COMMANDS
        ------- --------

        Whenever CHEKMO-II is waiting for you to type in a move, you may
        instead type in one of the 10 special commands currently implemented.
        Each special command consists of 2 characters and is described below:

        PW -- CHEKMO-II is instructed to play the white peices.  Whenever it
              is whites turn to move CHEKMO-II will printout and make a move
              for white instead of asking "YOUR MOVE?"

        PB -- Same as "PW" except that CHEKMO-II makes a move for the black
              pieces every time it is blacks turn to move.

        PN -- CHECKMO-II plays neither white nor black.  This cancels previous
              "PW" and "PB" commands.

        BD -- CHEKMO-II will print out the current board position.

        MV -- Causes CHEKMO-II to printout and make the next move for the side
              whose turn it is.

        SK -- Skip the move that CHEKMO-II is asking for, and make it the other
              sides move.

              Note:  According to the laws of chess, "The 2 players must alter-
              nate in making 1 move at a time".  The SK command is included be-
              cause it can sometimes be fun to use in "non-serious" games.

        RE -- Stands for "Reset" (or "Resign").  It resets CHEKMO-II's internal
              board to the initial starting position and begins a new game.

        BM -- Puts CHEKMO-II into "Blitz mode".  In Blitz mode, CHEKMO-II does
              not think very deeply about its moves, but instead, makes them in
              3 seconds each on the average.

        TM -- Resets CHEKMO-II to its regular "thoughtful" mode of play.

        IP -- Instructs CHEKMO-II to accept the input of a position using For-
              syth notation (described on Pg. 6)  CHEKMO-II prints a ">" to in-
              dicate that it is ready for you to enter a line.  If you violate
              the rules of Forsyth notation, an error message is printed, and
              CHEKMO-II waits for you to enter the error line again. If you en-
              ter in a good line, CHEKMO-II prints a ">" and waits for the next
              line.  When all 8 ranks are entered successfully, the board posi-
              tion just input gets printed out.  Possible error messages and
              their causes are described below:

              Message               Cause

                 1?        More than 8 squares specified
                 2?        Less than 8 squares specified
                 3?        Piece color not "W" or "B"
                 4?        Unknown piece letter


        CHEKMO-II     Chess Program for the PDP-8          Page 5

        ALGEBRAIC NOTATION
        ---------- -------

        Algebraic Notation is the system recommended by the International
        Chess Federation (F.I.D.E), for the recording of chess moves.  Since
        in regular Algebraic Notation, both upper and lower case letters are
        used, and since most teleprinters output only upper case letters,
        CHEKMO-II uses a modified form of algebraic notation to accept moves,
        and to print out its own moves.  This modified Algebraic Notation is
        described here.

        The ranks (horizontal rows of squares) are numbered from 1 to 8 start-
        ing from whites side of the board. The files (vertical rows of squares)
        are numbered from A to H starting at the left (blacks right) hand side
        of the board.  The intersection of the file letter and rank number
        gives each square a unique name, for example, in the initial position,
        whites king occupies square E1, blacks king occupies square E8, and
        the pawn in front of blacks queen occupies square D7.  Whites Knight
        is on square B1 and can move to squares A3 and C3.
 
            A8 B8 C8 D8 E8 F8 G8 H8    BR BN BB BQ BK BB BN BR
            A7 B7 C7 D7 E7 F7 G7 H7    BP BP BP BP BP BP BP BP
            A6 B6 C6 D6 E6 F6 G6 H6    -- ** -- ** -- ** -- **
            A5 B5 C5 D5 E5 F5 G5 H5    ** -- ** -- ** -- ** --
            A4 B4 C4 D4 E4 F4 G4 H4    -- ** -- ** -- ** -- **
            A3 B3 C3 D3 E3 F3 G3 H3    ** -- ** -- ** -- ** --
            A2 B2 C2 D2 E2 F2 G2 H2    WP WP WP WP WP WP WP WP
            A1 B1 C1 D1 E1 F1 G1 H1    WR WN WB WQ WK WB WN WR

        A move is specified by the square number of the piece that is moving,
        an optional "-" or ":", and the square number that the piece is moving
        to.  Using this notation, the 2 possible moves for Whites Knight on
        square B1 would be: B1-C3 and B1-A3.  The symbol "O-O" is used to spec-
        ify king side castling and the symbol "O-O-O" is used to specify queens
        side castling.  Pawn promotion moves are printed out in the same manner
        as any other pawn move, except that they are followed by a "=" and
        the initial of the piece the pawn is promoting to.  For example, on
        an empty board, a pawn on A7 would have 4 possible moves:

            A7-A8=N    A7-A8=B    A7-A8=R    A7-A8=Q

        On input, if no equal sign and initial are specified, the promotion
        is assumed to be to a queen.



        (Note: CHEKMO-II uses the ':' symbol to indicate that a piece was taken
        by that move.  You may wish to type your moves in the same way.)



        CHEKMO-II      Chess Program for the PDP-8          Page 6


        FORSYTHE NOTATION
        -------- --------

        Forsythe Notation uses the 2-letter codes shown on page 3 (and used
        throughout this discussion) to specify the pieces and numbers to in-
        dicate how many spaces occur between pieces.  When entering a board
        configuration each position in every row must be accounted for -
        see the error message summary on page 4.

        Example:  BR4BK2 looks like:  BR ** -- ** -- BK -- **


        ERROR HALTS
        ----- -----

        There are 2 legitimate error halts possible with CHEKMO-II

        Address               Explanation

        5004    An unexplained interrupt has occurred.  Press the CLEAR
                and CONTINUE keys (START on a non-PDP-8/e).  If the error
                persists, try to find its cause and eliminate it.  A likely
                cause is a DF32 Disk Unit set to the OFF position.

        1761    The position has gotten too complex and CHEKMO-II's push
                down list has overflowed.  You Win!!  Just before halting,
                CHEKMO-II will print out. . .

                I RESIGN


                This error can probably only occur if one or both sides has
                queened several pawns.

        Halting at any other address is extremely unlikely, and is caused
        either by a hardware failure, or an as yet unknown program bug.

        KNOWN BUGS
        ----- ----

        There are no known "bugs" in CHEKMO-II Rev #62.

        KNOWN DEFICIENCIES
        ----- ------------

        CHEKMO-II as of Rev. #62 does not recognize the value of passed pawns
        until they reach the 6th or 7th rank.

        CHEKMO-II has been programmed to use the same strategy throughout
        the game.  This strategy has been optimized for good play in the
        Middlegame and Opening.  As a result, CHEKMO-II plays poor moves
        in some Endgame positions.