Author: Gerd Isenberg
Date: 09:46:55 10/14/02
Hi all, as proposed some weeks ago, first conclusions of using Kogge-Stone and dumb7fill slideattack-generation with mmx-registers in IsiChess, which uses legal move generation with a kind of an infinite machine. IsiChessMMX is slightly but considerable faster on Athlon XP (but sucks on P4). Three steps so far: 1. I replaced all sliding Attack-getters (all with "int" square-parameter) by Kogge-Stone and/or dumb7fill mmx-routines. All this routines are compatible with the previous rotated bitboard ones, e.g. they return a bitboard in edx:eax with two rather expensive "movd"s. I threw out all the rotated bitboard stuff. As expected, this approach was a few percent slower in opening and middlegames. 2. I replaced the C-Version from getAttackedBy(int square) by a dedicated MMX-routine. This was mainly done to reduce the passing and returning (movd) bitboard overhead in internal used attack-getters. The two slide-attack getters are nicely combinable with mmx-getters for pawns, knights and kings. For the same reason i made a dedicated mmx-routine to detect pinned pieces and covered checkers. It's possible here to use dumb6fill only, to get a set of potentially pinned/covered pieces. The resulting executable was rather close to the speed of the initial rotated bitboard version. But so far i gained nothing from the ability to generate attacks simultaniuosly for multiple pieces. 3. I implemented an getAllAttacks-method for all pawns/pieces of one side. I call this routine utmost once per node for the side not to move, lately before generating king captures, and store and tag the resulting "tabu for king to move" bitboard in my recursive node-structure (class). Generating legal king-moves and castles becomes easier and faster now. Even if the king is not (double)checked by slider(s), i use getAllAttacks(other(color)) with temporary excluding the (checked) king (of color) from the set of occupied pieces. Previously i had special routines to generate king captures or moves with king in check - not longer necessary. Instead of calling getAttackedBy(int square) for several target squares, only one getAllAttacks(int side) call is necessary. This routine was the performance "winner" over the initial rotated bitboard version, even if i don't use the information yet for sorting moves, e.g. capturing not defended pieces and pawns before defended, what comes next. Cheers, Gerd
This page took 0.01 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.