SEEをbitboardで高速化します!
とりあえず決意表明だけ(^^;
- BonanzaはSEEをbitboardで高速化しているらしい
- Craftyのswap.cがSEEである
- SEEは試行回数も多く、ちょっとした改良でもパフォーマンスが大幅に向上する
このへんは前々から思ってましたが、misaki(MC)のあまりの激遅ぶりに踏ん切りがつきました。
BonanzaのSEE処理もおそらくCraftyを参考にされてるはずだし。
******************************************************************************* * * * Swap() is used to analyze capture moves to see whether or not they appear * * to be profitable. the basic algorithm is extremely fast since it uses the* * bitmaps to determine which squares are attacking the [target] square. * * * * the algorithm is quite simple. using the attack bitmaps, we enumerate all* * the pieces that are attacking [target] for either side. then we simply * * use the lowest piece (value) for the correct side to capture on [target]. * * we continually "flip" sides taking the lowest piece each time. * * * * as a piece is used, if it is a sliding piece (pawn, bishop, rook or queen)* * we remove the piece, then generate moves of bishop/queen or rook/queen * * and then add those in to the attackers, removing any attacks that have * * already been used. * * * *******************************************************************************