OSA for Arena
- 1 OSA for Arena - © 2012 A. Pietig
- 1.1 UCI-Engine implementation
- 1.2 OSA2UCI
- 1.3 OSA-Board
- 1.4 OSA-Book
- 1.5 OSA-Save
- 1.6 OSA-Load
- 1.7 OSA-Monitor
- 1.8 Installation under Arena
- 1.9 OSA2UCI as engine
- 1.10 OSA2UCI with playing module
- 1.11 General Arena settings
- 1.12 OSA-Board as engine
- 1.13 OSA-Monitor as engine
- 1.14 Using OSA engines
- 1.15 OSA-Board specifics
- 1.16 OSA-Monitor specifics
- 1.17 osa.ini
- 1.18 OSA-Book
- 1.19 OSA-Save
- 1.20 OSA-Load
- 1.21 Download
- 1.22 Contact
OSA for Arena - © 2012 A. Pietig
In 1986 SciSys announced the chess computer Leonardo. After changing the company name to Saitek, the computer was relaunched as Galileo in 1988. In 1989 the last model of this series appeared as Renaissance.
All this chess computers have a tournament size wooden chess board, a built-in program, the capability to add modules with different chess programs and a serial communication interface to computers, called OSA Link.
The serial computer interface was able to handle a printer and a home computer or PC with a standard terminal program. The DOS software INCHECK was sold a short time, but then Saitek stopped the development in this direction.
The serial interface was placed under the board as 5-pin-connector:
Several versions of communication cables were available for different computers, like the IBM PC:
Special information can be found in the manual 'Connection Cable for Leonardo Chess Computer', published from Saitek in 1987. It is available as download at www.zanchetta.net, look under Documentations and Saitek. The pictures above are taken from this specification.
The PC cable has an inbuilt electronic to convert the signals from the Saitek TTL-interface (5V) to the PCs RS232 (9V).
To use all of this boards and the available modules under the well known software 'Arena' (www.playwitharena.com), I have developed the following software under GPL (GNU General Public License). Other UCI (Universal Chess Interface) compliant GUIs (Graphical User Interface) can be used also.
UCI is a common protocol for chess software written by Rudolf Huber and Stefan Meyer-Kahlen. Because many chess software GUIs support UCI, I choose it for the development. The implementation is not complete, because the OSA-Boards have a specific behaviour and cannot simulate all of the possible UCI options. Many UCI commands from the GUI to the engine will be ignored, but have no effect on the play. The development is KISS (Keep It Simple and Stupid) based and runs well in most cases, but some specifics may crash the engine or the board software.
It is not possible to use opening books from a GUI, the OSA boards always use their own book (can be modified with OSA-Book). So please disable any book of the related GUI (like Arena, Fritz or Shredder).
If a GUI uses consequent FEN strings, it may slow down the play, because the new settings must be configured on the board every move (needs several seconds).
Disable time controls of the GUI, because the time information send to the engine are ignored and the result is a loss of the game in some cases.
Pondering is not possible at the interface, so please disable it (if send it will be ignored). The OSA boards/modules still do their own pondering (not visible to the UCI interface).
It is not possible to use an OSA engine for analysis.
Playing levels from the GUI are ignored. Set them manually at the board or send an Init-String, if the GUI supports this. It may be useful to choose a similar level at the GUI for internal purposes or other engines.
This is a software UCI-engine for Arena, that establish a connection to the chess board and uses the chess program of the board or the module as engine in Arena. The board itself and the chess pieces are out of function and you will play on the PC monitor. You can launch tournaments of the board chess software against other Arena chess engines and protocol and save all moves It is also possible to setup any chess position with Arena and start the calculation from this point.
If you use this software as engine in Arena, you can use the chess board and the chess pieces to input your moves into Arena. The chess software of the board or module is out of function and you can play with the board against other Arena chess engines. You do not need keyboard, mouse and monitor any longer and can play chess match against a modern chess engine on a sophisticated wooden chess board.
A stand-alone software to load your own opening book lines into a board.
A stand-alone software to save the actual game in the board to a PGN file.
A stand-alone software to reload saved PGN files with OSA format into the board.
An UCI engine for monitoring all moves done on any board between a player and the inbuilt software (basic software or module). Selfplay is also possible by pressing the “Play” button on the board repeatedly, this includes switching the side at any point. OSA-Monitor is an enhancement of OSA-Save, all games can be recorded directly under Arena and then saved there. During the calculation of the board software, all information are displayed in Arena, so OSA-Monitor extends boards and modules without display to the features of a Renaissance board. All settings are done on the board, OSA-Monitor does not send any commands from Arena. So it is not possible to set up positions in Arena, but “Analysis” mode can be used and openings or move lines in a game can be done and are monitored in Arena as well. The UCI protocol does not support takebacks, but with a special procedure it is still possible to do this.
Installation under Arena
To use the OSA software for Arena extract all files from the archive file OSA4Arena.ZIP to a directory of your choice under Arena\Engines:
OSA2UCI as engine
To use OSA2UCI as chess engine under Arena it must be configured as engine in the Engine Management.
A good idea is to name the chess board, module and game level as Arena name. So it can be used for all savings and reports. You can make entries for OSA2UCI several times with different values, e.g. several game levels that you use often.
Add the relevant COM interface of the OSA cable connection into 'Command Line Parameters'. If omitted, COM1: is used as default.
OSA2UCI supports the following optional command line parameters:
COM-Port baud-rate (divided by spaces). Syntax: COMx: number Baud-rate is always 2nd parameter, but can be omitted (then 1200 is used).
e.g. (valid for OSA-Board too) OSA2UCI COM2: 9600 OSA2UCI COM3:
Command Line Parameters can be omitted, if an osa.ini file is used.
To use a specific game level (e.g. 5 sec/move) you can enter it in the section 'Special':
The sections 'Books' and 'Information' should be left empty:
OSA2UCI with playing module
Adding an entry for a playing module in the board is simple. First make a new engine entry with remarkable information:
General Arena settings
To use the values from the examples mark 'Engine names replace player names' and disable 'Use internal name' (this will show the name and the version of the OSA software) in the section 'Options' of the Engine Management.
For the first steps it is useful to mark 'Start engines with debug-window', then you can see the communication between the board and Arena. If everything works fine, it can be disabled later.
In the 'UCI' section please mark 'Common 'own book' setting' and ' Engines use their own book'. Other values are not relevant for the OSA board. To give full control to the chess engine of the board disable 'Resign Settings'.
OSA-Board as engine
To use OSA-Board under Arena it must be configured as engine in the Engine Management.
You can add 'Command line parameters' as in OSA2UCI, if needed. There is a special command 'flip' as 'Init string', if you want to reverse the board while playing with Black. If left empty, the white pieces are always in front of you.
OSA-Monitor as engine
The setup of OSA-Monitor into Arena is identical to OSA2UCI. Except COM port and speed there are no additional Command Line Parameters. In the UCI options “Engines use their own book” shall be enabled and “Resign” should be disabled also. OSA-Monitor can be used only as Engine 1, Engine 2 shall be empty.
Using OSA engines
After configuring the new engines you can simply use them as new Arena engines. To start an engine tournament between a board engine and an Arena engine load both engines and start them. If the debug window is available, you can see the established connection. Be sure that the board is switched on before starting the engine.
To play with the board against an Arena engine, simply use OSA-Board as opponent and start the game. Now you can make your moves on the board.
After starting OSA-Board as White, Arena waits for your first move on the board. Move a piece and the movement is done on the monitor automatically.
If you are playing with Black, the Arena engine makes a move and you have to move the corresponding piece on the chess board, the LED of the piece lits orange. After lifting up the LED of the new field lits and you can push the piece down. It's like playing against the board without Arena. All further moves are done in the same matter.
Normally the white pieces are in front of you and the black pieces in opposition, even if you play Black. If you use the 'flip' command for OSA-Board, then the black pieces are in front of you, if you play black. Be sure to place all pieces correct before starting the engine.
Some moves have a special behaviour:
Castling: First the LED of a rock or king lits on. After lifting up the piece, the corresponding piece of the castling (king or rock) lits and you should remove this piece also. Now you can set down both pieces on the correct fields.
Capture moves: The LED of the piece that will do a capture lits on. After lifting off, the destination will NOT lit. Now you know that this is a capture move and you have to guess what pieces will be captured (it's logical in most cases). After lifting off the correct piece, the destination (same field) will lit and you can put the first piece down.
All GOOD moves lit in the colour orange, if you make a mistake, the wrong field lits in red colour and you can correct the move.
Special commands OSA2UCI accepts some special (not UCI) commands in the debug window or as parameter in an 'Init string': board – shows the positions of all pieces in OSA notation. setlevel – shows the current game level (without parameter) or set a new value (with parameter)
OSA-Board accepts the following commands: board – shows the positions of all pieces in OSA notation. flip – reverses the board (black and white) if you play with black
Both programs (engines) can be start in a console window and you can type in any of this or UCI commands. You can start the programs with the parameter /? or /h also and will get a simple help.
Because Arena cannot send commands to the board in monitor mode, is is necessary to start a game from the beginning or to setup a postion in Arena and on the board independantly. If you start OSA-Monitor with the “Demo” button, the positions must be equal, otherwise an illegal move may occur.
Arena will not recorgnise if the board is in “Analysis” or “Normal” mode, each move is simply displayed. So you can change to “Analysis” every time and make some moves on the board, e. g. to play a specific opening line. But you can move forward only, takebacks are not definied in the UCI protocol and will result in an error.
If you want to “Takeback” moves on the baord, you should stop the “Demo” mode by pressing the red cross left from the “Demo” button (marked yellow in the picture). Then you can go back to any previous position on the board. After this you have to play backwards to the same position in Arena too, for this you can use the green marked buttons. If the postion in Arena and on the board is equal, you can restart OSA-Monitor by pressing the “Demo” button again. After the first new move, Arena will ask if you want to overwrite the old moves or make a differrent line, best is to overwrite.
The latest versions of the OSA software support an osa.ini file. It shall reside in the same folder than the OSA-EXE-files. All command line parameters can be set in the INI-file, the following groups and parameters are defined (parameters shown are examples):
[COM] This group holds the communication parameters com=COM1: Sets the actual COM port baud=1200 Sets the actual baud rate
[BOARD] Here are parameters related to the board and/or modules name=Leonardo Sets the name of the board (shown in Arena) modul=Analyst Sets the name of a module (shown in Arena)
[GAME] Parameters related to a game ; comment Any lines with a “;” at the beginning are ignored level=e1 Sets the starting level of the board/module flip=1 Flips sides (black from line 1, white from line 8)
It is still possible to use command line parameters as before, they have higher priority than parameters in osa.ini. The OSA software first sets default parameters, if no command line parameters are given and no osa.ini is found. Then an osa.ini is evaluated, at last the command line parameters will be used if present.
OSA-Book is not designed for Arena, but is a useful stand-alone tool for the command line. With OSA-Book you can download your own opening books into the board and they will be used now with the other programs or during games against the board without OSA connection.
OSA-Book is started like the other programs, but the first parameter is a file name. Other parameters are optional, e.g. OSA-Book mybook.txt COM2: 9600
If no parameters are given, OSA book starts with a file dialog. There you can choose your book file. This works best with an osa.ini file, especially the connection parameters (COM port, baud rate) are taken from it.
Runtime can be several minutes, each move of a line is send separate and the board needs a a time gap of about 750 ms between the moves. Loading of a full book (383 lines) needs about 45 minutes on a Leonardo with Analyst module. Attention: All existing openings or positions in the boards will be deleted and overwritten. It is possible to store up to 383 opening lines with a maximum of 4000 moves.
The file announced in the command call or within the file dialog contains the opening lines. It is a simple ASCII file (e.g. can be edited with Notepad under Windows).
Every line contains an opening line in the format: e2e4 e7e5 g1f3 b8c6 etc. (always 4 characters per move). Castling shall be written as e1g1 or e8c8, O-O is not accepted. Promotion is not defined (Queen is chosen automatically), but this should be no problem for openings. Blanks between the moves are optional, also empty lines and lines with comments. All lines that do not start with the letters 'a-h' are treated as comments and will be skipped. Look into the example books for more information.
The last line of a file may contain the word 'delete', then all following memory banks in the board will be deleted. This is useful, if your board has a battery and you won't use older entries in the remaining memory banks. On the screen you see the move lines in progression and a status (OK or Error). After loading all openings the program announces “DONE”.
OSA-Save is designed to store the actual game in the board into a PGN-file. After playing a game against the board/module or setting up move lines in Analyst mode you can call OSA-Save and store the whole game into a file. Later the game can be restored with OSA-Load or you can load the PGN-file into Arena.
The PGN format is specific for the OSA interface and in some cases not fully compatible with the PGN specification, however Arena accepts the file without problems. But other PGN programs may reject the file.
After starting OSA-save you see the following screen with the actual game lines:
On the right side you see the content of the PGN header lines, only “Date” (current) and “Result” are filled. If you want to edit the content of the header lines press “E” on the keyboard. Then you can type in new content for each line (press ENTER to go to the next line). Pressing ENTER without typing retains the old content.
If all is sufficient you can press “S” to save the file, a file dialog will appear. You can exit the program without saving by pressing the “A” key or closing the window.
You can load PGN-files with OSA format into the board with OSA-Load. After starting the program (parameters in osa.ini or the command line) without a file name, a file dialog will appear and you can choose the PGN-file to load. You can control the received moves on the screen, after finishing the word “DONE” appears.
Please report any bugs or ideas to firstname.lastname@example.org
© 2009-2012 A. Pietig, Detmold, Germany