Chenard
a freeware chess program

by Don Cross

knight image

Introduction

I have written a freeware chess program called Chenard. Although it is not in the same league as commercial programs, it plays a fairly strong game. Chenard is written totally in C++ and the source code is portable to just about any operating system. The code has a built-in opening library, special endgame tactics, and the usual min-max search algorithm. One of the more interesting features of Chenard is that it automatically learns new openings and does not have to spend time thinking when it re-encounters any position in the first 15 moves of a game.

Versions of Chenard that you can download

Quick jump to download section on this page:

All of the following versions of my chess program are freeware. This means that you may use these programs for free on your computer. Also, it means that you may distribute the original, unmodified zip files to other people.

Revision history - Tells what has changed recently.

MD5 checksums and file sizes - Verify that your download is not corrupt.


Microsoft Windows XP/NT/98/95 (not yet tested with Vista)

Here are ZIP files (compressed archives) that you can download and decompress into a directory on your computer (I recommend something like C:\CHENARD).

winchen.zip
This zip file contains a version of Chenard for 32-bit versions of Microsoft Windows. It also contains documentation for installing and using Chenard (mirrored here).

endgame.zip
This optional zip file contains endgame databases for Chenard to instantly figure out the ideal move in certain endgame situations. Without this download, in these situations Chenard can blunder a won game and end up with a draw. Unzip the contents of endgame.zip in the same directory where you run winchen.exe, xchenard.exe or the Linux versions of xchenard or chenard. After unzipping, these files will consume about 16MB of disk space.

chenwav.zip
This zip file contains some WAV file recordings of my voice which the Windows graphical version of Chenard (winchen.exe) can use to say the notation for each move played in the game. Enable this with the View|Speak option in Chenard. If you don't want to enable the View|Speak option, there is no need to download this file. This download works only with the Windows graphical version; the other versions of Chenard do not support speaking the moves.


WinBoard version

You can use this version of Chenard as a plug-in chess engine with WinBoard:
wxchenard.zip
Just download and unzip the file xchenard.exe to the directory c:\chenard. Open up WinBoard, select the Help option, then select "Help Contents", then click on the link that says "Installing Chess Engines". Use xchenard.exe as the first and second chess engines. For example, your Windows shortcut target might look like:

"C:\Program Files\WinBoard-4.2.7\winboard.exe" /cp /fcp=xchenard.exe /fd=c:\chenard /scp=xchenard.exe /sd=c:\chenard

You will need to adjust the 4.2.7 to match whatever version of WinBoard you actually have installed.


Source code for Chenard

chensrc.zip - This is the complete C++ source code for Chenard. This source code is public domain. All I ask is that my name (Don Cross) and the Chenard web site address (http://cosinekitty.com/chenard/) remain intact in any distributed works. I would also like to hear of any interesting uses you have made of the source code. Please email me: cosinekitty {at} hotmail {dot} com.

The chensrc.zip file contains all the source code for building the following versions of Chenard:


Linux graphical version for xboard

Screen shot of xboard and xchenard
Screen shot of xboard running xchenard as its chess engine on Ubuntu Linux 8.04. (Click picture for full resolution image.) Note that I ran xboard with the -debug option so that I could see all the messages going back and forth between them.

This is an xboard compatible version of Chenard I started in November 2008. You must install xboard version 2 or higher, then download and compile the xboard version of Chenard, called xchenard. Here are instructions (tested on Ubuntu 8.04):

  1. You will need to open a terminal window to perform most of the following steps.
  2. Execute the command sudo apt-get update to make sure you have the latest information about software installs.
  3. If you have never done so, you will need to install the GNU C++ compiler (g++), using the command sudo apt-get install build-essential
  4. Install xboard using the command sudo apt-get install xboard
  5. (Optional, but recommended so you can test xboard with another chess engine:) Install gnuchess using the command sudo apt-get install gnuchess
  6. Install the source code using these commands:
    	mkdir chenard
    	cd chenard
    	wget http://cosinekitty.com/chenard/chensrc.zip    (Or use your browser to download chensrc.zip)
    	unzip chensrc.zip
    
  7. Enter the following commands to build the xchenard executable:
    	cd linux
    	chmod +x xbuild
    	./xbuild
    
  8. If everything went well (basically meaning: you don't see any error messages), you will now be able to run xboard with xchenard as its first chess engine using the following command:
    	xboard -fcp ./xchenard
    
I am by no means a Linux guru, and I tested this only on Ubuntu 8.04 (Hardy Heron). Let me know if you are running into problems and I will do my best to help. Contact me by email at cosinekitty {at} hotmail {dot} com.


Linux cheesy text-only version

Linux users can also compile a cheesy, text-only version of Chenard using the file chensrc.zip above. I would recommend trying the xboard version above first. However, some researchers and experimenters may prefer this version for hacking, since the code may be easier to port as a standalone application. Maybe you are building your own Linux-based chess robot, and you just need a chess engine whose source code is (relatively) easy to tweak? This version might be just the thing.

Here are the instructions (tested under Ubuntu 8.04):

  1. Execute the command sudo apt-get update to make sure you have the latest information about software installs.
  2. If you have never done so, you will need to install the GNU C++ compiler (g++), using the command sudo apt-get install build-essential
  3. You will need to open a terminal window to type in some commands now.
  4. Install the source code and compile it using these commands:
    	mkdir chenard
    	cd chenard
    	wget http://cosinekitty.com/chenard/chensrc.zip    (Or use your browser to download chensrc.zip)
    	unzip chensrc.zip
    	cd linux
    	chmod +x build
    	./build
    
  5. If everything went well (basically meaning: you don't see any error messages), you will now be able to run the text version of Chenard by entering the command:
    	./chenard
    


$Date: 2008/11/27 17:26:56 $

Visits to this page since 5 November 2008:
Hit Counter by Digits