That's great news! We need more universal chess engines. ChessV and Fairy-Max are lonelyDaniel Shawul wrote:Thanks. I have given it some thought and decided to start from scratch. There is a lot of orthodox chess specific code in Scorpio which would make
things a real mess. I am gonna start coding for a general board game where you can define the rules ,i.e how the pieces move, in a templatized code. Piece lists seem natural data structure for supporting many variants but it seems the board representation should be the simplest one(not even 0x88)
,to support smaller or larger size board games or something alien like checkers ?. I need to figure out what I want and how to go about it.
Daniel

With ChessV I use a combination piece list/bitboard approach. ChessV has some unfortunate design elements, though, because I had never even written a "normal" chess engine before and didn't really know what I was doing. I think the combined piece list/bitboard approach is still reasonable, though. It maintains bitboards that indicate the location of each pieces of each piece-type & player. It also activates bitboard move generation for those variants where it's feasable using old-style rotated bitboards (although Kindergarten would be much better.) When bitboard movement is not enabled for a variant, it falls back to step-wise table lookup with no "virtual" off-board squares (a 10x10 board is really 10x10.) The source code might be worth a look to you. Some aspects of it worked out quite well. For example, a list of moves is a internally a list of pickups, a list of drops, and a list of move info structs which contain, among other things, indexes into the pickup and drop lists. You can represent any type of move this way. Each move has zero or more pickups and zero or more drops... A capture is two pickups and one drop; castling is two pickups and two drops.
My new engine, Quadrox, is pure bitboard with Kindergarten move generation. No piece lists at all. It makes super-heavy use of template classes to put together a variant, allowing for powerful optimizations of games that allow it. It'll probably never be as universal as ChessV, though...