Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: and finally?

Author: Sune Fischer

Date: 07:19:16 03/25/04

Go up one level in this thread


On March 25, 2004 at 09:06:50, Anthony Cozzie wrote:

>Of course, rather than starting from the outside, its far easier to start from
>the inside!!

I think it is, otherwise you have to handle each corner seperately.

>note: This has been bothering me.  'Taboo' is spelled with two o's rather than a u.

Yes now that you mention it. :)

>So why not do something like this:
>
>for(i = 0, a = {D4, E4, D5, E5}; i < 8; i++)
>{
>  a1 = ((a & edgemask) << 9) & ~taboo;
>  a2 = ((a & edgemask) << 7) & ~taboo;
>  a3 = ((a & edgemask) >> 9) & ~taboo;
>  a4 = ((a & edgemask) >> 7) & ~taboo;
>  a  = a | a1 | a2 | a3 | a4;
>}
>
>store a in pawn hash;
>
>The whole thing will execute with an average time of 1 cycle per evaluation!!

I use the Kogge-Stone floodfillers, e.g.

inline BitBoard FillDownRightOccluded(BitBoard g, BitBoard p) {
	p &= 0xfefefefefefefefe;
	g |= p & (g >> 7);
	p &=     (p >> 7);
	g |= p & (g >> 14);
	p &=     (p >> 14);
	return g |= p & (g >> 28);
}

inline BitBoard FillBishopsOccluded(BitBoard b, BitBoard o) {
	BitBoard t;

	o = ~o;
	t = FillUpLeftOccluded(b,o);
	t |= FillDownLeftOccluded(b,o);
	t |= FillUpRightOccluded(b,o);
	t |= FillDownRightOccluded(b,o);

	return (t);
}

Expensive as H*ll if used at all nodes, but almost free in the pawn hash :)

>If a bishop is not on 'a', it cannot reach the center, and is considered
>trapped.
>
>I think it is better to have a single taboo bitboard.  This reduces space
>consumed by the pawn hash.  Now, the problem is, how to compute the taboo
>bitboard.

I'm not sure a trapped square for a black bishop is not necessarily a trapped
square for a white bishop. The white bishop can sometimes eat it's way out if
the entombment if it is made of black (unprotected) pawns.

But there is no reason to store this board in the hash, its main use is for the
calculation of the trapped squares. Those you want to store.

So in the evaluation I can do something simple like
if (white_bishops & pawn_hash->white_bishop_trapped) score -= trapped;

I don't think it can get much simpler than that :)

>I am going to go a bit out on the limb here and propose taboo = w_pawns |
>b_pawns (and their attacks (?)).  This relies on the search a bit, but it also
>covers the most important case: Bxa2 with pawns on A2, B2, C2, K at C1.  The
>only problem is that it will screw up the opening position.

Yes there is lots of room for experimentation. I have included protected pawns
of the opponent to get more hits. As a result the bishop on b3 gets detected as
being trapped:
[D]r2qk2r/4bppp/p3b3/np1pP3/P1p5/1BP1QN2/2P2PPP/R1B2R1K b kq - 0 1

(of course the bishop is a gonner after cxb, but positionally speaking)

>OTOH, this is more true to the original idea.  We have eliminated 99% of all
>pieces, now we have the time to do a more complicated calculation.
>
>Another interesting question: can we extend the idea to rooks? This requires
>some extra work, I think . . .

About the same work for rooks I think.

But I'm not getting that many hits on trapped bishops, they appear to be quite
rare even in large search trees.

On the other hand once the theme is present it can become game deciding
knowledge, I hope.

-S.
>anthony



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.