Author: Gerd Isenberg
Date: 08:09:45 12/18/02
Go up one level in this thread
On December 18, 2002 at 09:50:03, Bas Hamstra wrote: >On December 17, 2002 at 20:30:49, Gerd Isenberg wrote: > >>Oups, sorry, not so easy... >> >>those were wrong again: >> >>openPawns[WHITE] = pawnBB[WHITE] & ~filldown(allPawns); >>passedPawns[WHITE] = pawnBB[WHITE] & ~filldown(allPawns|pawnAttacks[BLACK]); >>notDefendable[WHITE] = pawnBB[WHITE] & fillup(pawnAttacks[WHITE]); >> >>Both openPawns and passedPawns statements produce an empty set due to >>"allPawns" as filldown parameter, which is member of the filldown result. >> >>I'll hope this is it finally ;-) >> >>openPawns[WHITE] = pawnBB[WHITE] & ~filldown(allPawns >> 8); >>passedPawns[WHITE] = openPawns[WHITE] >> & ~filldown(pawnBB[BLACK]|pawnAttacks[BLACK]); >> >> >>The notDefendable-Statement was implemented as isDefendable of course. >> >>notDefendable[WHITE] = pawnBB[WHITE] & ~fillup(pawnAttacks[WHITE]); >> >>Gerd > >Interesting and clever as always, Gerd. Although I would rather expect fillup >where I see filldown in the above examples, but maybe I ordered my bitboards >differently. I use a lot of masks stored in tables. But that's for each pawn >seperate, your idea seems better. > > >Best regards, >Bas. Hi Bas, Thanks ;-) with the help of Steffan Westcott's genious Kogge-Stone routines. The square-bitindex mapping is as follows: a1-0 h1-7 a2-8...h7-63 Let's see: openPawns[WHITE] = pawnBB[WHITE] & ~filldown(allPawns >> 8); sample pawns: [D]8/1P4pp/3P1p2/4p3/1P5P/6P1/8/8 w - - after filldown(allPawns >> 8) each pawn/queen is a "one" in the bitboard: [D] 8/8/1P4pp/1Q1P1pQQ/1Q1QpQQQ/1P1QQQQP/1Q1QQQPQ/1Q1QQQQQ w if you and the complement with the white pawns, you get a remaining set with b7,d6. Currently thinking about pawn ilands and isolanis. Isolanis have the property, that there is no own pawn control (from neighboured file pawns) on the same file: isolani[side] = pawnBB[side] & ~FillUpDown(pawnAttacks[side]); noNeighbourFromLeft[side] = pawnBB[side] & ~FillUpDown(pawnAttacksAH[side]); noNeighbourFromRight[side] = pawnBB[side] & ~FillUpDown(pawnAttacksHA[side]); FillUpDown may be the FillUp|FillDown or a specialized version to gain more parallelism, specially with 64-bit mmx registers, which are rather great for Kogge-Stone and other fill algorithms. My question is, what's the smartest way to determine n-pawn ilands on consecutive files with n >= 1 (n==1 ==> isolanis)? Regards, Gerd
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.