Comments/Ratings for a Single Item
The best place to discuss about Chessprogramming is the programming section of the TalkChess forum. I posted a tutorial for interfacing engines with WinBoard on WinBoard Forum.
If your main interest is in large variants, it is probably best to use a mailbox representation of the board. Mij preferred way for generating moves is to associate a 0-terminated list of board steps with each piece,one for every direction it moves in. A move generator can then for each piece loop over these directions, and for each direction loop over distances if teh piece is a slider.
Fairy-Max it also keeps a secondary step and primary and secondary 'move rights' for each such direction, to allow for bent moves like those of the Griffon or Xiangqi Horse. This limitation to two legs is not completely general, however. For the diagram I therefore expanded this system to a sort of interpretable intermediate code, where each direction can consist of an arbitrary number of (boardStep, range, rightsFlag) triple,which each in addition list how many legs of the move in this direction still follow (so they can be skipped if the move fails to meet the reqirements indicated by the rightsFlag in an earlier leg, e.g. if the XQ Horse finds its first square blocked). So there really is a 0-terminated list of (boardStep, range, rightsFlag, remainingLegs) quadruples, where each direction first loops over legs (until it finds remainingLegs = 0), and each leg then loops over distance if the range fieldfor it specifies so.
In the diagram script I compile the Betza move descriptors to such lists, writing a separate description for each allowed direction (or combination of directions, if it is a multi-leg move) of an atom. E.g. the XQ Horse, afsW, would get 8 moves each consisting of two legs, because the first leg allows all four W steps, and the second step doubles the number of paths by allowing two different continuations through the s = l + r specification. For each of the 16 legs the step direction is then unique, and the step can be obtained by rotating the basic atom step in that direction.
H.G.,
I took notice of talkchess.com and I'll start talking fairy chess there too.
Now I must ask. For bend riders I was generating moves in one bitset<s> (where s stands for board size). So, bottom line I was having on bitset for each piece's moves and one bitset for each piece's captures. I mean all moves not just one leg. I think this way information is more dense. But is that worse that looping for each direction of a piece. Also my bitsets were not null terminated but had a fixed size- the size of the board. So bottom line every piece has a bitboard with availeble moves and a bitboard with availeble captures. Is that ok? Is that recomended?
H.G.,
I have made an account on talkchess.com but it did not get activated, I've noticed you are an moderator there, too. Can you help me activate it . It says I have to wait for someone to aprouve, but there has been half a week by now.
Activating accounts is not a power that moderators have.But I will send the board admin a PM to urge him on.
@ Greg Strong, I've just send you an email, Have you seen it?
@Greg Strong, I have sent you an even more detailed email!
Thanks Greg!
@Greg Strong,
I hope you read this, I really need to speak with you!Please!!!
11 comments displayed
Permalink to the exact comments currently displayed.
Hello,
After toying a bit with fairy-max, chessV, and sjaak 2, I have decided to write my own c++ code that will support many chess variants. I am aware of the chess programming wiki but I am also aware of experienced chess programmers roaming this website, so I hope for interactive Q&A in the limit of possibilities for people like H.G.Muller, Greg Strong or others. The main purpose is though that those games will play my own very large board variants, so the program will be optimized for that.
Thanks for all your contributions.
Some technical stuff:
The program will be written in c++ with lots of polymorphism and late binding in the desire for flexibility. It is also supposed to be fast so it is really difficult to program that all. The AI will use machine learning in the way DEEP PINK works, as I took inspiration from there. All this I deem it doable but it is difficult as this is my first chess variants program. The AI is meant to be strong.
I also need help for technical stuff like interfacing with WinBoard, but everything in their own time.
Thanks for all your help!