I use the Umko/DoubleCheck GPLv3 Magic bitboard generator, and this seems to be the problem, as GDB reports that it oddly segfaults at a certain call to bishop_attacks(), coincidence hmmm?
At the moment it is only used for sliding piece mobility evaluation, but I did say extreme barebones.
Now I know that this is extremely ironic, what with the Rybka/Fruit debate, but hey, I get public domain "might have been" snapshots, such as:
And, oddly, my implementation looks like this:Robert Hyatt wrote:Code: Select all
attacks = bishop_attacks(square); mob = popcnt(attacks & ~own_pieces); opening += mob * BishopMobOpening; endgame += mob * BishopMobEndgame;
Code: Select all
attacks = bishop_attacks(from,1ULL << from);
mob += population_count(attacks & -board->bitboards[(colour) ? 2 : 1]);
op[me] += mob * BishopMobOpening;
eg[me] += mob * BishopMobEndgame;
Code: Select all
attacks = bishop_attacks(from,1ULL << from); // Umko bishop magics take (square, bitboard)
mob += population_count(attacks & -board->bitboards[COLOUR_IS_BLACK(colour) ? BLACK_PIECES_BB : WHITE_PIECES_BB]);
op[me] += mob * BishopMobOpening;
eg[me] += mob * BishopMobEndgame;
Download here.
Matthew:out
Note to mods: watch very carefully.