Author: Vasik Rajlich
Date: 05:36:18 03/25/04
Go up one level in this thread
On March 24, 2004 at 18:59:02, Gerd Isenberg wrote: >Some minor changes because inOne == inThree is not general enough. >Better to look for no further growing: >if ( (inThree & ~(fromBB|inOne|inTwo)) == 0 && ... > > >// fixed is subset of tabu (may be equal), the set of all own blocked >// and backward pawns. >// tabu may contain enemy pawn attacks which don't terminate the attack ray > >BitBoard getTrappedBishopSquares(BitBoard fixed, BitBoard tabu, int n) >{ > BitBoard trappedBishopSquares = 0; > BitBoard potb = ~tabu; > while ( potb ) { > BitBoard fromBB = potb & -potb; > BitBoard inOne = fillBishopAttacks(fromBB, ~fixed) & ~tabu; > BitBoard inTwo = fillBishopAttacks(inOne, ~fixed) & ~tabu; > BitBoard inThree = fillBishopAttacks(inTwo, ~fixed) & ~tabu; > // tag all reachable in up to three moves as done > potb &= ~(fromBB|inOne|inTwo|inThree); > inThree &= ~(fromBB|inOne|inTwo); // growing? > if ( inThree == 0 && popCount(inOne|inTwo) < n ) > trappedBishopSquares |= (fromBB|inOne|inTwo); > } > return trappedBishopSquares; >} > >popCount > n considers the whole fill area reachable in two moves. Gerd, thanks, I'll try it in Rybka. As you mentioned earlier, it would be very interesting to play with "fixed", ie absolutely fixed (for totally trapped bishops), semi-fixed (more common, for bad bishop scoring), etc. It's not so easy to come up with a good algorithm for semi-blocked pawns, even if the hash table gives you room to waste some cycles. Vas
This page took 0 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.