About RDChess

Update: I have stopped the development of RDChess. The RDChess.exe file still runs under Windows 10, but I have not updated the installation process. This blog is kept online for historical reasons only!

One of my main interests in leisure time has been programming chess. Beside my job and my family I have written the chess program RDChess, spending many evening and weekend hours for this hobby. In the mean time I have stepped down development of RDChess. Anyway the current last version V3.23 works still under Windows 7 and is still freeware :-). You may try RDChess yourself and download a free copy. Or look at the RDChess User Manual (english) oder in die RDChess Bedienungsanleitung (deutsch).

Read a Technical Description of the RDChess program, describing shortly the architecture, data structures, search and evaluation routines of the program. Mostly the program follows the "main stream" architecture of brute force programs of the Northwestern University program CHESS 4.5 type, but has a few "proprietary" program technical features. RDChess is comparably in strength to other freeware programs like "GNUCHESS for Windows". I am not a good chess player and lose practically every time against my own program. Anyway RDChess loses regulary against commercially sold chess programs like Fritz. Read further about the strength of the program and how to test it.

If you are a chess programmer, interested in how RDChess works in detail, look into the source code. Remark: The source code (Borland Delphi, x86 assembler) is well commented but contains comments in a mixture of German and English language, so be aware you may not understand the source not knowing the German language.

Wednesday, January 13, 2010

RDChess User Manual

RDChess is a chess playing program for personal computers running under MS Windows. RDChess has a graphical user interface by its own, but interfaces also to Winboard, which allows RDChess to play by itself against a great number of other chess engines.
In Winboard mode RDChess is started from the program WinBoard or compatible programs (e.g. Arena,..).
When RDChess is started with the command line parameter "xboard" (without quotation marks), it assumes Winboard play and exchanges commands and moves over the Winboard interface. Opposite player moves are entered into the WinBoard window or received from other chess engines. The RDChess windows are for information only. Only a limited number of data may be entered or changed into the RDChess windows (Save, some config params, etc.). RDChess sends its calculated move to WinBoard (and updates the board and position in the RDChess windows).

In the standard (non-WinBoard) mode RDChess is controlled solely by its Graphical User interface (GUI).

The User Interface consists of a main window with menus and the chess board for entering and displaying moves.
Various other windows are for displaying and editing chess game data, move history, configuration parameters, chess watches, technical data etc.
Some windows have context menus, which pop up by clicking with the right mouse button on a sensitive object.


1. Main Window 



The main window displays the chess board  and controls the program with
  • a menu bar at the top,
  • a tool bar with shortcuts for often used commands,
  • the names of the white and black player and arrows for scrolling backwards and forward through the positions of the actual chess game,
  • a status bar at the bottom, displaying help and other useful information about the current game state.
Game Menu
    With the “Game” menu items you
    • start a new game from the initial position,
    • load or save a game,
    •  replay the current game, 
    • set up a specific board position manually or
    •  make test runs with pgn libraries like the Bratko-Kopec test suite and
    • end the RDChess program.




    Chess games are stored and loaded in the"portable game notation format" (.pgn). Piece symbols are in English  (K = king, Q = queen, R = Rook, B = Bishop, N = Knight, P = pawn).
    The start position of the chess game is stored in FEN-Format. A few "Extended position description" (EPD) tags are also stored (best move(s), principal variation, position id). 

    If a stored .pgn file contains more than one chess game, a dialog window opens and allows selecting a single game out from a list box for loading.



    Game related data like the event, site, date and result of the game, the white and black player names etc. are displayed and may be edited in an extra “Game Data” window (see below), but are stored together with the move journal in the .pgn file.

    Playing a game
    There are 3 playing modes

    • Player against computer (standard mode),
    • Player against player (player enters moves for both sides),
    • Computer against computer (computer plays both sides in an automatic mode) 
    which may be selected with the “Mode” menu items. 
    There are further a “continuous” and a “single step” mode. In the continuous mode the computer makes repeatedly a move if it is its turn or waits for the player to enter a move (thinking on “permanent brain”).
    In single step mode the computer is idle after each move (of which side whatsoever).
    Some functions (controls) of the chess program are available only in the program idle state!

    Entering a move
    A move is entered by drag and drop (clicking with the left mouse button into the "from" square and moving the mouse with still pressed left button to the move destination square and releasing it there), or by 2 clicks, clicking into the "from" square and afterwards into the "to"-square. A valid selected piece to move is highlighted with a hatched brush on the “from” square, indicating that the program is waiting for enter of the “to” square.
    For information purposes the target square of the last made move has a blue rectangle around it.
    A king in check has a red rectangle around the square he is sitting on (this feature may be deactivated with the board context menu). 
    Interrupting the move entering or a computer move search
    You may interrupt a move with the "Escape" key. Click on an invalid board square to abort move entering and return to the idle state.
    By clicking the “Abort move” icon on the tool bar a running computer move (“computer is thinking”) is interrupted.
    Undo / Redo a move (ply)
    With the appropriate move commands moves may repeatedly be undone or replayed.
    You may navigate through a whole chess game (going to the begin or to the end position, ...)  with help of the horizontal left and right arrow icons above of the board or with help of the Journal window.
    Changing the side to play
    In the idle state you can force the computer to play one ply with the menu command “Move->Computer 1 ply” (or shortcut Icon).
    In the idle state you can start a players move by clicking into the board (on a square with a valid to move chess piece) or with the menu command “Move->Play 1 ply” (or shortcut).
    Options Menu
    The “Options” Menu items allow turning around the board, switch the user language (English <--> German) and choose the colour of the black and white board squares and pieces.
    A tabbed control Configuration allows setting diverse parameters for the playing strength (level), kind of computer play (“Permanent brain”, “Mate search”, …) and debug data.
    The Transposition Hash Table size may be set to 24 MByte (standard), 48 MByte or 96 MByte
    The check box “Use hash table” may be switched off in case of to less available main memory.

    The playing strength of the program may be set to different levels

    • Tournament time control  (m minutes for the n moves; e.g. 120 minutes for 40 moves). If one player uses up his time, he looses by timeout. After n (e.g. 40) moves of both sides the time control is set new to m minutes for the next n (e.g. 40) moves
    • Incremental mode (lie used on the ICS Server): Each player is allocated a base time (e.g. 2 minutes)   and an increment of n seconds after each move
    • N seconds search time allocated for each computer move
    • Computer searches independently of time until the maximum search depth n
    • Time control giving the computer and player equal time spans
    • Unlimited search time (e.g. for solving mate puzzles).
    2. Additional windows and controls



    Windows of RDChess  (User language German above, English below)




















    The 2 screen shots above show a Windows Vista desktop with most of the RDChess program windows open in German resp. Englsh user language. To the left above is the Main window, on top of it a search watchdog and below the chess watches and Opening Library. 
    On the right above is the Journal (move history), below right the Info Windw and further below "Game Data" window.

    The “Windows” Menu items allow to open 6 additional windows for standard chess playing users.
     Even 7 more windows are for technical background /debug purposes and show program data like e.g. the usage of the hash tables, search statistics and other data.
     Data in all (13) windows are shown in different detail, depending on the configuration checkboxes “Test level 1” and “Test level2” in the tabbed configuration dialog box.


     The Journal Window



































    Displays the game history (moves with system or user entered annotations).You may scroll through the chess game positions in the move list with the cursor movement keys (up, down, page up/down, Pos1, End, ..) or by clicking to the line where you want to go in the journal.
    For each move is displayed the move number, move notation e.g. Bg1f3 (Bishop from square g1 to f3) in pgn format (there exists a configuration switch for long or short notation) and system or user move annotations inside the { } brackets. 


    Move annotation: Depending on the “Test level 1" and "Test level 2” configuration switches in the Configuration menu a move annotation looks like
    {C 1.48/ 218.888/MxViT:14/NSWh:15/NM#:6667/NM-ßCut:5732/HTU:6/Ha-ßCut:6550}
    and means

    C = computer move ( P = player move , B = book move from opening library , 1 = One move flag, D = Direct move from permanent brain)
    1.48 evaluation of current position (pawn value = 1.00, + is good for white; minus is good for black. Mxx means mate in xx.
    218.888 Number of nodes searched for the calculation of this ply
    MxViT: 14 maximal visited search depth = 14
    ... and further program technical data (NegaScout repetitions NSWH, Null move count NM#, Null move beta cut-offs NM-ßCut, Hash table use count (HTU), Beta cut-offs through hash table use, etc.
    By clicking with the right mouse button into a line with a move a popup menu appears and offers a move annotation, which may be edited in an edit control


    The Status Information Window




    Displays (read only) information about the actual current position like game state, position value, castling rights, 50-move repetition count, position repition count, computer search level of play, last move, opening type etc



    The Game Data Window




    The game data window displays and allows editing data related with the actual loaded chess game.
















    The window has 3 parts
    • standard pgn data fields (event, site, date, name of white and black player, ...) ,
    • EPD data fields (best move, ..) and
    • a large edit field for a comment to the chess game.

     The Opening Library Window




    Displays the status and information about the current opening library in use.  The RDChess opening library (RDCH_op.lib) has a proprietary format and has to reside in the default RDChess directory. If there is no opening library file found in the current chess directory, a new (empty) opening library is inserted.The program is usually “inside” the library when starting a new chess game from the initial base position and progresses the opening library state as long as the opponent makes moves which are stored for the actual position in the opening library. An entry in the opening library may contain 0 - 6 moves out of the actual chess position.  The computer chooses arbitrarily an opening move out of these 1-6 when it is to move.  A move may be marked “active”/ or “passive”.” Passive moves will be used from the computer only if there are no active moves in the current opening library entry for the position. One of the 1-6 stored opening book moves may be selected from the move list by double clicking the line with the wished move in the opening library window.The opening library may be extended by a user through going to a stored position in the opening library and then starting the “learning mode”. Playing a move on the board enters it automatically in the opening library. The program asks for an annotation for each newly entered position. Clicking the “Stop learning” button stops extending the opening library. 

    The Chess Watches Window



    Displays 2 digital watches for the times used so far by the black and white player. In the Tournament and the "ICS" mode the watches display the remaining time until the next time control/ end of game.
    The watches may be reset to zero with the "Reset" push button.
    When playing in WinBoard mode with use of the "tim/ otim WinBoard protocol commands" the time difference between the remaining times of RDChess and the opponent is displayed additionally.



    The Search Watchdog Window 

    Is a small window, usually sitting just above the main window. During a computer search it displays the number of visited nodes, the currently favored “best move” (mean continuation, “principal variation”), the evaluation (in centi pawn units) of this variation and some other data (current search depth, progress bar, ..).


    Debug windows

    There are currently 7 “debug” windows, which are not important for a user just playing chess with the program.
    The data may be interesting for users programming chess computers, although I am too lazy to describe here the meaning of all the displayed data.

    The “position hash table” window (see below) and the “king + pawn hash table” info window (not shown here) display information about the actual status of the hash tables and its usage within the last search.



    The iterative search overview window shows in detail the iterative search deepening process of the computer search with search depth, evaluation values measured in centi pawn units (Alfa, Best, Beta), search time, node counts and principal variation for every searched depth.  










    The Evaluation data debug window (not shown here) displays various data about the evaluation function values of the current position and the pawn structure.
    A Winboard connection debug window shows online all moves and data traffic sent and received over the Winboard interface pipes and logs the data into a Winboard log text file.

    Help

    The  Help menu offers 2 entries
    • Clicking "General help" opens a short user manual in English or German language (depending on the language setting in the Options Dialog box),
    • Clicking "About" shows a Dialog box with the current RDChess program version and the Copyright notice of the author.
    3. System requirements
    • Windows 95, 98, ME, NT, 2000, XP, Vista 
    • Windows desktop resolution at least 800 x 600. 1024 x756 or more are recommended.
    • Intel x86 or compatible AMD PC with MMX instruction set.
    • When using the hash tables at least 128 MBytes main system memory recommended 
    4. Program Installation and execution
    The program downloads freely from http://rdchess.com
    To install the program unzip the RDCHESSVx.zip file into a temporary directory and start the set up program setup.exe. Setup installs all RDChess program files into a default directory (c:\RDCHESS) or into a directory, which may be chosen at the installation process.
    The program consists of the rdchess.exe program file, a readme.txt file with a licence agreement, an opening library file (RDCH_op.lib), an English and German help-file in .txt format and a few example chess games in .pgn format.
    RDChess is executed with the command line ... path\rdchess.exe  [xxxxx.pgn] [xboard]
    The optional parameter "xxxxx.pgn" loads the chess game xxxxx at startup. When RDChess is known to MS Windows as program for executing .pgn files, a double click on a .pgn file loads automatically RDChess.

    The optional parameter "xboard" starts RDChess in WinBoard mode (see next paragraph). This parameter makes no sense when RDChess is called stand alone with its own GUI.

    The RDChess Delphi 
    source code can be downloaded separately and freely from http://www.rdchess.com  and installed with Installshield to a subdirectory ...\Source.


    Installing RDChess for use by WinBoard
    To install a chess engine to be called from Winboard see the WinBoard Homepage of Tim Mann .

    RDCHESS.EXE must be called with the parameter "xboard" (or /xb or /wb) in the "DOS" command line in order to run in Winboard mode.
    E.g. create a shortcut on the desktop calling the program winboard.exe with RDChess as the "first computer program (fcp)" with the following content:
    "C:\Program Files\WinBoard\winboard.exe" /cp /fcp="d:\rdchess\rdchess.exe xboard" /fd="d:\rdchess"
    c:\Program Files\WinBoard .... is the directory where winboard.exe resides,
    d:\rdchess .... is the directory where rdchess.exe resides
    Another example for playing Gromit Chess V3.82 as first engine against RDChess as second computer chess engine a match of 10 games :
    "C:\Program Files\WinBoard\winboard.exe" /cp /matchGames 5
    /fcp "c:\Program Files\gromit382\gromit382.exe xboard" /fd "c:\Program Files\Gromit382"
    /scp="d:\rdchess\rdchess.exe xboard" /sd="d:\rdchess" (input as a single line !)


    5. Known problems and hints

    E1) The RDChess windows positions on the desktop are optimally arranged for a screen resolution of 1152 x 864 or higher. On screens with smaller resolutions you may have to move the windows to a better position manually. (Sorry, I have not yet implemented a “Save/ restore RDChess desktop to disk”).
    E2) If your PC has less than 64 Mbytes main memory, there may be problems with using the hash tables (full standard hash tables use approximately 26 Mbytes).
    If your computer accesses at a computer move (search) frequently the hard disk and the program runs slowly, uncheck the “Use hash table” check box in the configuration control (Menu Option/->Configuration… ->Computer Search).
    E3) Not all user interface items are properly displayed in English or German language.
    The File Dialog Menu as well as buttons in dialog boxes use the language of the installed windows (.dll) and are not switched with the RDChess language configuration check box.
    The debug windows are mainly in English only.
    E4) RDChess (all versions) has a bug, playing sporadically a blunder move (e.g. giving away material for nothing). Despite eager long search I was not able to find this bug.