Roce is yet another chess engine that probably no one needs. Still it's a lot of fun to work on it. I started writing Roce around christmas time in 2003. At first it was supposed to be a weeks or month project mainly intended to improve my knowledge of the C programming language. But the project turned out to be much more challenging and timeconsuming than I ever thought it would be.
If you intend to play against Roce you should get a nice GUI like Arena or something else that supports the UCI protocol. Roce should also work under the Fritz 8 Interface.
Roce is based on the rather old fashioned 10x12 board representation. To the 8x8 board are two additional rows added at the bottom and at the top and to each side is one additional columns added. That results in a 10x12 sized board which is represented as int board[120] on the computer internally. The 10x12 board representation has the advantage that illegal moves are easy to handle. So the knights don't 'jump off the board' (i.e. easy to check for array over- or underruns). The square A1 is represented by board[91] and the square H8 is adressed with board[28]. The pieces are represented by integer values {K=6, Q=5, R=4, B=3, N=2, P=1, k=-6, q=-5, r=-4, b=-3, n=-2, p=-1}. If the white knight jumps from B1 to C3 this is performed as 'board[b1+offset_knight] = white_knight' which is translated by the compiler/preprocessor to 'board[73] = 2'. Valid offsets for the knight on the 10x12 board representation are: 21, 8, 12, 19, -21, -8, -12, -19. The white pieces can only move to a target square if this square is either empty or if an opposite colored piece is on this square. Empty squares are marked with the integer value 0 (board[C1] = 0).
Roce uses a legal-move generator instead of a pseudo-legal generator which means that only legal moves are created. In general legal-only-move generators are considered to be a tad slower than pseudo-legal move generators but when I simplified my move generator to generate pseudo-legal moves I didn't got much of a speedup, so I changed that back. Currently Roce isn't doing much beside generating all the legal moves from a certain position. There is a search (NegaMax with alpha beta cutoffs) and a simple evaluation function which evaluates only material and squares implemented and it doesn't work very well yet. There is a simple move ordering sheme based on squares and material gain present as well. Roce doesn't search very deep and has no extensions currently. That means Roce isn't aware of the danger of checks/recaptures and is badly suffering from the horizon effect therefore.
If you are writing you're own move generator/chess engine you might be especially interested in the commands divide, divide2. 'divide #' gives the number of child moves at a certain depth while 'divide2 #' sums them up to the given depth. 'perft #' gives the sum of legal moves at a certain depth while 'perft2 #' sums them up to this depth. The divide(2) # command is a nice feature if your movegenerator comes up with different numbers and you need to track down the bug. Currently Roce supports most parts of the UCI protocol and fractions of the winboard protocol but I'm planning to fully support both UCI and Winboard.
The binary of Roce is currently available for free but I preserve the right to change that at any time (although it's very unrealistic that Roce ever will go commercial, of course). The source code won't be released most probably as there are already more than enough engines released under the GPL. If someone wants/needs for some reasons the sources of Roce he/she can drop me an email.
The file consists of a testsuite of positions which are usefull to check if the movegenerator works properly. The test can be started by entering the command 'testmovegen' and takes -depending on the speed of your computer- a few minutes to hours to finnish. Don't edit the content of the file if you're not sure what you're doing.
Roman Hartmann