How to Use CamChess

I will describe the process of setting up CamChess process in later sections. In this section, I will assume that everything has been set up correctly, and that CamChess has just been launched.

When CamChess is launched, it sends a request for a picture to the camera server. The camera server responds by taking a picture and sending it back to CamChess. CamChess displays the picture. (If the board is not sufficiently well centred, see Setting up the Camera.) CamChess will show the message shown above when it successfully identifies the chess board. The OpenCV program that I use for that was not designed to identify chess boards with pieces on. (It was designed to identify checker patterns to calibrating lenses.) Nonetheless, with my set up, the program has never failed to identify the board with the pieces set up in the start position. If you are having trouble, it is best to start with an empty board, and then set up the start position. (CamChess uses the image of the start position to learn how to distinguish between a Black piece, a White piece and an empty square.) If everything looks good, you can click the Next>> button (or hit the space bar or Return key) to move to the next screen.

If the White pieces are at the bottom of the board image, you can simply click Next>> or press the Return key. You can achieve the same effect by pressing the space bar (unless you have moved the focus from the Next>> button by using the Tab key). If the White pieces are not at the bottom, press the Rotate button or hit the R key (without holding down the space key).

CamChess has now completed the initialisation stage. The default mode of operation is that you make to moves for both sides, pressing the space bar after each move. CamChess checks the moves for legality and records them. You can take moves back at any time by clicking the Takeback button or hitting the T key. When you have finished entering moves, press the close button on the CamChess window. You will then be asked whether you wish to save the game. (You can also start a new game at any time by setting up the start position again, in which case you will be asked if you wish to save the old game.) You can start the engine at any time by pressing Engine button or hitting the E key. The engine will then make a move and continue to make moves for that side until you press the Engine button or hit the E key again. The recommended chess engine is Stockfish, which despite having only one second to make a move is very strong. You can weaken it by setting a lower skill level using the Level button or L key. You can turn the diagram round to show Black at the bottom by pressing the Flip button or hitting the F key.

CamChess recognises all legal chess moves, including castling and en passant pawn captures. A special case occurs with pawn promotion. If you make a move that promotes a pawn, you can promote it to a queen, rook, bishop or knight. You will need to tell CamChess which piece you want to replace the pawn. In that case, a small dialog pops up. You can make your choice by clicking on one of the four buttons, or by hitting the corresponding key. (I have not followed the convention of underlining the shortcut characters, because the Q character looks a mess if I do that.) The default promotion on hitting the space bar is promotion to a queen.

It is important to understand that the chess diagram reflects the position on CamChess's internal electronic board, and not what it sees on the physical chess board. If you get into a mess (e.g. by making moves without pressing the Next>> button), CamChess will show "Illegal Move" and highlight the squares that are different from its internal electronic board. The easiest way to fix this is to put the pieces on the same squares as those on the diagram and press Next>>. CamChess should then respond with "No Move Found", which indicates that electronic and physical boards are in step.

Comments