Chenard Revision History

Here is a revision history of the Microsoft Windows versions of Chenard, my chess program, starting with version 1.020. You can tell what version number of Chenard you have by looking in its Help|About.

version date description of changes
2023.06.23 Fixed a bug in Windows GUI's edit mode. If the board was edited such that the game was over (stalemate, insufficient material, etc.), the editor would stop working. Now while still editing, the board editor is still functional until the user leaves edit mode. At that time, Chenard detects if the game has ended and reports the result as needed.
  • Fixed Issue #35: Fixed crash that sometimes happened in tactical benchmark.
  • Fixed Issue #37: Include chenard_readme.txt in Windows binary zip files.
2021.11.06 Fixed Issue #31: xchenard was not showing correct move analysis when used as a plugin engine within the program SCID vs PC.
2021.05.03 Some user interface improvements regarding pawn promotion.
  • Fixed Issue #27: do not ask for pawn promotion piece when promotion would leave the mover in check.
  • Fixed Issue #28: When waiting for promotion piece selection, display a pawn with a question mark next to it.
2021.05.02 Overhauled the graphical display in the Windows GUI. The pieces are much larger and crisper now.
2018.03.06 Fixes in the Windows GUI version of Chenard:
  • Fixed Issue #23: When the game ends, display standard symbols like "1-0" rather than English phrases like "White wins". Exception: still indicate resignations with English phrases, so it is clear when the computer resigns.
  • Fixed Issue #19: Undo/redo were not working right when the game ended in a non-stalemate draw. Chenard was not clearing the game-end text on undo, and was not re-detecting the end of game on redo. Both problems have been fixed.
2018.03.05 Fixed a bug in all versions of Chenard that caused it to incorrectly declare a draw by the 50-move rule in positions where only 49 moves without a capture or pawn advance had been played. See the issue on GitHub.
2015.08.14 Added option in ttychess.ini:
  • CRDELAY: How many milliseconds to wait after sending each carriage return.
2015.08.13 TTYCHESS now has 3 extra configuration options in ttychess.ini:
  • BYTESIZE: How many data bits to send per character (4..8).
  • PARITY: 0=none, 1=odd, 2=even, 3=mark, 4=space.
  • STOPBITS: number of stop bits to send: 0 for 1 bit, 1 for 1.5, 2 for 2.
2015.08.04 Portable version of Chenard prints an error message that explains any problems it finds when loading a PGN file. Before this fix, it would just stop loading the file at the point where an error was detected, and start playing the game from the last valid move, as if nothing was wrong. Removed support for obsolete GAM and Yahoo chess file formats. Chenard now supports PGN only.
2015.07.04 Added endgame database tables for K+Q vs K+N, K+P vs K+N, K+P vs K+B. Download the new version of along with this version of Chenard to use these new tables.
2015.07.01 Updated chess engine with latest changes from the Chenard GitHub release.
  • I found out that there are contrived chess positions that can have as many as 218 legal moves. Increased size of MoveList array from 200 to 220 to be on the safe side (avoid risk over buffer overflow).
  • Fixed misbehavior of move parser functions — used only by command-line versions of Chenard.
2015.06.14 Fixed bug where Chenard could theoretically fail to notice a draw by repetition.
2015.06.03 Fixed build errors under Mac OS X. Now you can use the Linux build scripts to build the portable and the XBoard versions of Chenard.
  • Updated Linux build scripts for executables chenard and xchenard to enable more C++ compiler warnings.
  • Fixed some resulting build warnings, but with no algorithm changes.
2015.04.08 Minor fixes to the portable console-mode version.
  • No longer delete existing game file when command line options are absent.
  • Report error if explicit game file on command line is absent, instead of just continuing.
  • Added --combat command-line option for assisting in game analysis.
2014.07.11 Published first version of TTYCHESS.
  • Fixed subtle problems in position evaluator: was not correctly giving a bonus for having rooks/queens behind passed pawns, and was missing penalties for doubled pawns that had one or more enemy pawns between them on the same file. In theory, both changes should improve positional play, but the effects are hard to quantify.
  • Increased to maximum compiler warning level for Linux builds and fixed all resulting warnings.
2013.02.26 Fixes for problems that had crept into the Linux versions of Chenard.
  • Fixed C++ compiler errors in the source file lichess.cpp.
  • Fixed segmentation fault crash in Linux version of xchenard caused by incorrect initialization order of global C++ objects.
  • In a blunder alert, display the numeric evaluation score for both the blunder move and the better alternative offered by Chenard. If you think the blunder alert is too sensitive, you can use the difference of these scores to adjust the blunder alert threshold (see next item).
  • Added menu command Game / Edit Blunder Alert Threshold. It allows you to adjust how severe a blunder is before Chenard warns you about it. The threshold value is used only if you select the Blunder Alert check box for either or both human players when starting a new game. The threshold is expressed in hundredths of a pawn, and must be in the range 50 to 1000.
(Thanks to Tim Tennyson for these feature ideas.)
  • In Game / Suggest Move command, added a checkbox to enable/disable making an attention sound after analysis is complete.
  • Added a Game / Suggest Move Again command, which is the same as Suggest Move, only it repeats the think time and attention sound options used for the previous move suggestion without first displaying a dialog box to edit them.
(Thanks to Tim Tennyson for these feature ideas.)
2013.01.20 Blunder alert sometimes missed detecting a player's blunder if the player's opponent had only one legal move. This has been fixed.
2013.01.08 Emergency fix for crash that could occur if the following three features were all enabled at the same time:
  • Thinking on opponent's time (pondering)
  • Blunder alert
  • View / Analysis / Current Path
This bug exists only in the previous version (2013.01.06). When the bug happened, you would see a dialog box pop up that said "Chenard fatal error" immediately after you made a move, and the program would close.
  • Added "Blunder Alert" feature. (Thanks to Tim Tennyson for the idea.) When defining players at the beginning of a game, there is a new check box for each player. If Human is selected for a side, the check box enables a warning if the player makes a blunder. The warning prevents the move from taking effect and shows analysis of what is wrong with the move at the bottom of the window, along with a better continuation. Once warned for a given position, the player can make any move without being warned again, including the original move (in case the player disagrees with the warning).
  • Fixed a problem that prevented loading PGN files generated by other programs that contained annotations of alternative moves in parentheses. Before this fix, Chenard would display an error message that said "Problem loading pgn file: unknown state".
  • When the game ends, display red text right on top of the board that makes it immediately obvious, e.g. "White wins".
  • Fixed a crash due to a change in the previous version that could happen after a game ended. Sorry about that!
  • Disable thinking on opponent's time (pondering) when user asks for move suggestion. This prevents the CPU from being burdened by two AI instances running at the same time.
  • If the thinking on opponent's time menu item is unchecked, now it will immediately stop any pondering in progress, instead of having to wait until the next move.
  • When starting a new game, display the dialog box for creating players again, instead of using the same settings again. The dialog box is filled out with the same settings as the previous game, but allows you to change sides and adjust computer think time without having to close Chenard and open it again.
  • Fixed bug: when the game has ended, disable the Suggest Move and Resign commands.
  • Fixed spelling of View/Highlight menu option.
  • (Thanks to Tim Tennyson for this idea.) Typing the coordinates of a square on the chess board now acts the same as clicking on the square with the mouse. This allows moves to be made using software that feeds chess moves through the keyboard. For example, typing "g1f3" moves the piece in g1 to f3.
  • When promoting a pawn, the dialog box that asks which piece to promote to now allows you to use the keyboard: you can press Q (queen), R (rook), B (bishop), or N (knight), followed by the Enter key.
2010.08.23 Changes in the Windows graphical versions of Chenard:
  • In the analysis window, display the eval/sec and total visited node count with commas, to make them easier read when these numbers get large.
  • Display a running clock of the time spent thinking so far.
  • Chenard remembers your most recent think-time setting for suggesting a move, even after you quit out of Chenard and run it again.
  • A minor user interface tweak: when you press F1 to suggest a move, you no longer have to click on the text box to edit the time. It is now in focus and highlighted by default, so you can just start typing the number of seconds you want Chenard to think. Or you can just press Enter to leave it alone, as always.
  • Now you can use the Game menu's "Force computer to move now" (Ctrl+F12) option to force the move suggester to stop thinking immediately, just as always worked when it was the computer's turn to move. Before this fix, that menu option was grayed out when the move suggester was thinking.
  • Fixed a bug that caused the learning algorithm to weigh the computed move based on the amount of search time requested, not the actual search time. The actual search time could be quite a bit less than the requested time when the user forces the computer to move immediately, resulting in the move being offered immediately later for a much longer requested search time.
2010.04.18 A long time ago, Chenard saved games in a proprietary binary file format with the extension .gam only. Although I recommend using .pgn (Portable Game Notation) from now on, it is possible to load the old .gam files. I have changed the File Open dialog box so that it shows both file formats in the same window. This makes it easy to open files that were saved in the old format. (Before this change, the user would have to know to enter *.gam to even see the files inside the File Open dialog box.)
2010.01.04 Some people (e.g. Netbook XP users) were unable to run the Windows version of Chenard: when they tried to run winchen.exe, they would see an error message that said:
This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.
This has been fixed in both the 32-bit and 64-bit versions of the Windows graphical version of Chenard. (There was no problem in the WinBoard version, XChenard, so no changes have been made there.) The problem was that winchen.exe was assuming that the C runtime library file msvcr90.dll was available on the user's computer, but this not always the case. From now on, Chenard will have the runtime library statically linked in, meaning that when you download it, the program will be slightly larger than before, but will run on any version of Windows because it will include a copy of all the code it needs.
2010.01.01 New features for Windows GUI versions of Chenard:
  • In the Help menu, I replaced the old option for copying the Chenard web page URL with a new option that directly opens that page with the default browser.
  • Now it is possible to directly open a PGN file using Windows Explorer: Right-click on the PGN file, say Open With..., and choose winchen.exe as the program to open it with. This causes the filename to be passed to Chenard, which now knows to look for it and open it. The game will be loaded. If Chenard created the PGN file, it will show the initial dialog box for creating the players as White/Black being human/computer the same way they were when the PGN file was saved. Otherwise, the old behavior of suggesting the player sides randomly will remain in effect.
2009.12.31 The Windows GUI versions of Chenard (WinChen.exe and WinChen64.exe) were not saving user options in Windows Vista and Windows 7. My code was saving options in an "ini" file, a method that is no longer supported by Microsoft. Now the user options are saved in the registry under HKEY_CURRENT_USER/Software/Chenard. Note: if you are using an older Windows verison like XP, and you upgrade to this version of Chenard, the first time you run the program it will not load your existing settings (board size, piece style, etc.), but after that, all your options will be remembered, just as always. This is because Chenard no longer attempts to read from the "ini" file where your old options were stored.
2009.12.20 Fixes in WinBoard/xboard versions of Chenard:
  • Corrected a problem when the user edits the board position and the side to move is Black afterward: the ply counter would be off by one, causing XChenard to be wrong about how many moves were left in a timed period. This could cause XChenard to run out of time and lose.
  • When the WinBoard/xboard client supports debug output, XChenard will log whether it is a 32-bit or 64-bit build.
2009.12.18 Added 64-bit Windows (x64) builds of WinChen (in and XChenard (in These builds appear to be about 25 percent faster than the 32-bit builds when running on my 64-bit Windows 7 laptop.
2009.12.08 Fixed bugs that could cause XChenard to run out of time in a timed game:
  • XChenard was occasionally profoundly confused about how many moves remained in the current time period because it was using a chess board object that was still in the middle of a line of analysis, and therefore it could randomly think either White or Black had the move.
  • It was not resetting the move counter when it received the "new" command from WinBoard/xboard.
  • It was calculating the number of remaining moves when WinBoard/xboard sent the "time" command, not when the opponent's move had been received. This affects whose turn it is, and therefore the number of remaining moves. Now XChenard records the time when the "time" command arrives, but waits until it is just about to start thinking before doing the math to calculate how much time to think.
  • Fixed compiler warnings in the Linux text-only version of Chenard. There were no algorithm changes, just minor tweaks in the file uistdio.cpp that make the warnings go away.
  • Fixed a bug in XChenard that happened when WinBoard, xboard, or a compatible host was configured to supply moves from an external opening book. The problem was that XChenard did not properly follow the protocol for tracking how many moves were left in a given time period when some of those moves were fed in from the hosting software, instead of being computed by XChenard. See this forum discussion about this common timing bug for WinBoard and xboard chess engines for an in-depth technical explanation.
  • Implemented the WinBoard 4.4.0 "option" command in XChenard. XChenard uses this command to provide a check box in WinBoard 4.4.0 (and above) to enable/disable XChenard's built-in opening book and training file chenard.trx.
  • If you are using XChenard with WinBoard or xboard that does not support the "option" command, you can still disable XChenard's built-in opening book by creating a text file called xchenard.ini and putting the following exact line of text in it (note that this is case sensitive):
    Use opening book=0
    Use your favorite text editor to change the 0 to 1 if you want to enable the opening book instead, or just delete the file xchenard.ini, since enabling the opening book is the default. The file xchenard.ini must be placed in the same directory as the chess engine executable xchenard.exe.
  • Implemented the WinBoard/xboard "memory" command. By default, XChenard uses about 800K (0.8MB) of hash table memory. However, using this option it can be increased to any number of megabytes from 1 to 1024. Any value larger than 1024MB (1GB) will cause Chenard to use 1024MB.
  • Made WinChen.exe pondering algorithm work more like XChenard's: favor moving faster over thinking longer when it correctly predicts the opponent's move.
  • Fixed a bug where Chenard would report a draw by repetition when the position had repeated only 2 times, not the required 3.
  • Made minor tweaks in the source code so that people using Microsoft Visual C++ Express Edition (the free download version of Microsoft's C++ compiler) to compile the Windows GUI version of Chenard (winchen.exe) will no longer get compiler errors about missing header files in winchen.rc. It turns out the free version of the compiler doesn't ship with the header file afxres.h like the professional version does. This change has no effect on the behavior of the engine. If you are not a computer programmer who is trying to compile my source code, you can safely ignore this change!
  • Fixed a minor bug in the WinBoard/xboard version of Chenard (xchenard.exe) that could theoretically cause it to let its flag drop in a timed game, when there was less than 2 seconds left on the clock. I say "theoretically" because I have not experienced this bug myself, nor have I had any reports of it. I discovered the issue while reviewing the source code.
  • Fixed a bug in the chess engine that could cause the program to crash in extremely rare circumstances. Most people would never encounter this, but it is a good idea to upgrade to this version, just in case.
  • WinBoard/xboard version of Chenard now supports pondering, which means the option of thinking while it is the opponent's turn.
  • WinBoard/xboard version of Chenard now has a better understanding of time controls for tournament games. It will move faster as its clock runs lower. Before, it would keep spending the same amount of time thinking about each move, often causing it to run out of time and lose.
  • Bug fix (problem in new WinBoard/xboard code only): Whenever the opponent played Black and tried to promote a pawn, the move would always be rejected as an illegal move.
  • Support display of thinking to WinBoard/xboard via the commands post and nopost.
2008.11.17 Changes in the Windows GUI version of Chenard (winchen.exe) only:
  • Under the Edit menu, there is now a command for setting the board position using Forsyth Edwards Notation (FEN).
  • The URL listed in the Help/About box was wrong! Fixed it.
  • Because computers are so much faster these days than when I started Chenard, the first time someone runs winchen.exe, the default think time will be 3 seconds instead of 10 seconds. As always, the program will remember whatever settings were used the last time, so people upgrading will not see any difference.
  • The WinBoard version of Chenard ( now supports the Move Now command for interrupting the search and making a move immediately. (This was already correctly working for the Linux/xboard version of Chenard.)
  • Added a new endgame database (optional download) for King and Queen versus King and Bishop. To use this new endgame database, you must download this version of the software, and download the file, and extract the zip file to the same directory where you run the software.
  • Improved the endgame databases: corrected some inaccurate estimates on how many moves away from forced mate a given endgame position is. This also fixed issues with sometimes playing less than optimal moves, meaning moves that minimize how long the opponent can postpone checkmate.
  • Chenard now writes a game result token to the end of a PGN file, as is required by the PGN spec.
  • Fixed bug that would erroneously report syntax errors in PGN files that were created by other software. Specifically, Chenard did not know about "*" at the end of a listing for an incomplete game, and did not understand braces or semicolons as comments.
  • Chenard can now load/save PGN files for edited board positions.
  • Fixed a bug that prevented the Move Undo and Move Redo commands in WinChen.exe from working after loading a game from a PGN file.
2008.11.11 Added a new endgame database (optional download) for King and Queen versus King and Rook. To use this new endgame database, you must download this version of the software, and download the file, and extract the zip file to the same directory where you run the software.
2008.11.08 Fixed the following bugs in the Windows GUI version of Chenard (winchen.exe):
  • When View|Analysis was enabled, the eval/sec numbers on very lengthy searches could jump to a faulty value. This was due to overflowing a 32-bit integer. This calculation is now done internally using floating point math, which eliminates the problem.
  • When thinking on opponent's time was enabled (called pondering), and the opponent resigned, the pondering would continue even though the game was over. Now pondering is stopped as soon as the opponent resigns.
  • Updated Windows code to use QueryPerformanceCounter instead of GetTickCount for internal timing. This postpones a theoretical problem with integer overflow after 49 days to instead happen after 248 days of continuous run time. The 248-day limit is inherent in Chenard's use of 32-bit signed integers to represent time to centisecond (0.01 second) precision. If this becomes a problem (someone running the program continuously for a good fraction of a year) I will have to convert to using 64-bit integers for timing.
  • My build process was not packaging the Linux files build and sourcefiles. This has been corrected.
  • Windows was causing uppercase and lowercase versions of the same directory to appear as separate directories in the zip files, when unzipped in Linux. Fixed the build process to rename important files and directories to all lower case before zipping them up.
  • Automatically correct Linux script files for Linux text format: remove extraneous '\r' characters.
  • Text-only, portable versions of the chess engine now support PGN and longmove notation (e.g. e2e4 or e7e8q). Nonstandard formats that I made up are no longer supported.
  • Note that from now on, I am changing my version numbers to be the same as the calendar date of publication, in format. This will be applied consistently across all Windows builds. If you build the code yourself, most of the executables will contain the date and time that you built the code. However, the Windows GUI program winchen.exe will say "unofficial build".
1.052 3 Nov 2008 Added xboard/WinBoard support to the source code, called xchenard in Linux and xchenard.exe in Windows. Allows the board to be edited in xboard/WinBoard. Crude support for time controls, but this needs help.
1.051 27 Oct 2008 Minor source code tweaks to fix errors building under Linux that had crept back into the code. Added a new script to build text-only version of Chenard under Linux.
1.050 03 May 2008 After a long hiatus, Chenard has returned to the web, this time on my new web site This newer version supports displaying PGN move notation, as well as saving/loading PGN files.
1.040 06 Aug 1999 Fixed a couple of bugs that on rare occasions would corrupt the board (mostly disappearing pieces).

There was a bug that caused Move Undo to not work right after a game file was opened. Before, you would have to make a move before Undo started to work again. This has been fixed.

Fixed a bug that caused Move Undo to not work when the game was over.

Now you can press F1 as a keyboard shortcut for Suggest Move.

1.039 13 Mar 1999 Fixed a bug in the Game | Suggest Move command. For arcane reasons, Chenard was getting confused when the suggested move was accepted by the user AND that move caused check, was a pawn promotion, was an en passant capture, or was a castling move.
1.038 14 Feb 1999 I believe I have fixed a bug which caused Chenard to crash in extremely rare circumstances, but I'm not sure because I have not yet been able to reliably reproduce the bug in the first place.

Improved the search by making it pretend that any position which is repeated at all during the search is a forced draw. This will make Chenard avoid wasting time when it should be avoiding a draw, and will increase the likelihood of finding a forced draw when that would be in its favor.

1.037 05 Feb 1999 Fixed a problem with the computer search not always seeing a forcible draw by repetition.
1.036 31 Jan 1999 Added the new command Suggest Move under the Game menu. This allows the user to ask the computer to suggest a move to make.
1.035 28 Jan 1999 Found one more bug in draw-by-repetition detector. Okay, this time I really really think it works!

Added new evaluation heuristics for attacking squares in front of the enemy king that are not protected by an enemy pawn.

Improved search efficiency by using transposition tables.

1.034 24 Jan 1999 Fixed a bug where the draw-by-repetition detector (added in v 1.033) was falsely reporting a draw.

More minor additions to evaluation heuristic: refined bishop pin detector, and added a rook pin detector. Also added a queen position table to try to keep computer's queen out of corners.

1.033 20 Jan 1999 Now Chenard observes the draw by repetition rule and the 50-move rule.

New option "automatic singular move" allows Chenard to make your move for you when you have only one legal move anyway.

Minor enhancement to evaluation function: computer looks for veiled bishop attacks and pins.

"Copy game listing" command now uses a 64K buffer instead of a 4K buffer.

Added a program icon (finally!).

1.032 14 Jan 1999 Fixed a bug: increased move list array size from 80 to 200, because sometimes it was overflowing and causing Chenard to crash in the middle of the computer thinking. If you have experienced an "illegal operation" error with earlier versions of Chenard, this should fix it right up!
1.031 03 Jan 1999 Now display algebraic coordinates (rank numbers and file letters) around the board.

When the computer is considering its move, "< thinking >" is displayed below the board.

1.030 15 Nov 1998 Minor user interface bug fixed: the Game|Allow Computer to Resign option was working, but the checkmark state wasn't being updated until the user quit and reloaded Chenard.

Now the user may enter a non-integer number of seconds for the computer's think time. The minimum think time has been decreased from 1 second to 0.1 seconds.

The default piece style is now "Skak" instead of "Tilburg".

1.029 18 Aug 1997 Now the View|Analysis|Best Path menu option displays both the the total number of nodes evaluated and the search speed expressed in nodes per second. Both are updated about twice a second during the search.
1.028 22 Jun 1997 I have made some improvements to the move ordering rules that resulted in a 15 percent increase in search efficiency. Other minor changes, such as alternating colors in the best path display (View|Analysis|Best Path).
1.024 06 Feb 1997 I have decided to split the distribution of WinChenard into two zip files: one containing the executable and readme file, the other containing just the WAV files needed for the View|Speak menu option (introduced in version 1.022). I made some changes to the code so that Chenard can detect when someone is trying to enable the View|Speak option without the necessary WAV files, and tells them how to get here.
1.023 03 Feb 1997 Due to popular demand, I finally caved in and added a help file to the distribution file called readme.txt in ASCII format. [Note: There is no change in version number because the Chenard program itself has not changed in this revision.]
1.023 02 Feb 1997 Fixed a bug: was hanging the program when speak option was enabled and a computer player predicted "mate in n".
1.022 01 Feb 1997 The Windows 95/NT version of Chenard can now speak! By enabling the new View|Speak option, you can tell Chenard to say every move through your sound card. The WAV file recordings of my voice are played in the correct sequence to say the move notation. By default, the View|Speak option is turned off, because I figured more people would be annoyed by this option than would like it.
1.021 30 Jan 1997 Added the new font style called "Skak" from Alastair Scott's Free Chess Fonts page.
1.020 30 Jan 1997 Added support for move undo/redo. Now you can take back a move by either selecting Edit|Undo Move or pressing Ctrl+Z. You can redo a move with Edit|Redo Move or Ctrl+D.

Chenard Windows GUI Wish List

This is my list of things to do for Chenard. Send me email (cosinekitty {at} hotmail {dot} com) if you have any suggestions for additional or changed functionality in Chenard, or other comments about this list.

[ Don Cross home page | Chenard page ]