My A, B, C, D list is about chess on 8x8 boards only. Classical bitboard techniques are mainly out of scope for other board sizes, so bringing those into the discussion does not help. For a general-purpose engine that is able to play many different variants I would certainly agree that non-bitboard engines are superior. However, there is also a lot of interest in competetive 8x8 chess, and I would consider it counter-productive to discuss about two very contrary goals at the same time: competetive 8x8 chess vs. other board sizes.hgm wrote:Well, not necessarily. There are other representations, like storing individual ranks, files and diagonals in memory cells. Very competitive for 16x16 boards, for instance.Sven Schüle wrote:But even an "attackers-set engine" uses either of the two main board representations: mailbox or bitboards.
You seem to ignore the need to know which squares are occupied by which color and piece type in order to update *anything*, even for updating attackers-sets you need that information. So why that talk against board representation? You simply won't do without it.hgm wrote:Well, if the board representation is hardly ever used for anything, it should not be very important what it is. I hope you agree with that. If captures and mobility are directly done from the attackers set, Pawn structure from the Pawn hash, material eval from a material table indexed by the material key... Well, not much use for any board, so far...First thing is, your last remark sounds as if you would not see a difference between B and D, I hope I misunderstood that since board representations are still a big difference which I believe to be crucial for certain parts of the engine.
Why is the order so important? Each move gets a score for move ordering (MVV/LVA etc.), so the generation order is mostly irrelevant, except for identical scores. Generating moves in the "correct order" is not a hard requirement. In many cases (in a mature engine) move ordering is also done on a very different level: you start with the hash move provided it is a legal move, without even generating a single move, and only if you don't get a cutoff from it you generate captures, of which there are only relatively few ones so retrieving them one at a time based on their move score is still a cheap operation.hgm wrote:As Bob pointed out, you are not nearly there, after that. After this retrieval you would have the moves, but you would not automatically have them in the correct order. So you would have to sort them in a different order. Which cannot be done with shifts and bitwise boolean operations. So you would have to extract them into a move list...Now my claim, and I think also Bob's, is that it is hard even for an optimized implementation of D to be superior to C, mostly due to the inherent redundancy of maintaining all existing attackers-sets where you can always retrieve the few relevant ones very cheaply with common bitboard technology.
Our experiences about superiority of generating pseudo-legal vs. legal moves differ, that's ok for me and also does not matter here. I would always vote for measuring both perft speed and engine search speed. Including mobility would be ok for me, obviously, since it favors the bitboard fans even more - see Bob's replyhgm wrote:Well, perft is not a realistic measure of engine speed, as too much emphasis is on checking legality of the moves in the final ply, while engines usually do better with pseudo-legal moves. (b) is unrealistic because it leaves out mobility, which is one of the most expensive evaluation terms. So I would go for an engine with material + PST + mobility. Writing that based on incremental attackers sets (and whatever board representation is most convenient; I don't expect it to matter much) is on my to-do list.We should not forget that we would need clearly defined measurement rules. We could measure:
a) perft speed (same hardware, single-threaded, with bulk counting, no hash table);
b) NPS of a material+PST only tree search (same hardware, single-threaded, no hash table, no pruning etc.);
both for a variety of positions with given depths.
But unfortunately that list is rather long...