Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Fast BB move generation

Author: Robert Hyatt

Date: 07:04:50 05/08/00

Go up one level in this thread


On May 08, 2000 at 08:57:49, Bas Hamstra wrote:

>It seems that some (i.e. DarkThought) rotated BB programs use 1-at-a-time
>movegeneration, that generate just the best MVV/LVA move. I don't understand how
>they can make this work.
>
>Idea being that in many cases you only need the first capture, thus saving a lot
>of work. On average.
>
>However for this to make sense, it should cost you AT LEAST fewer ticks to
>generate the 1 best capture than to generate them all and do a sort.
>
>According to some quick & dirty measuring, in 75% of the cases the best capture
>is a knight- or pawncapture. So you should be able to generate these (1 by 1)
>faster than doing all captures.
>
>The point: I see NO way to fetch the 1 best capture substantially faster than
>doing all captures. So how do you do it?

You do it in two pieces.  First, you find the most valuable opponent piece
that is under attack (find-victim cycle).  Then you find the least valuable
piece of yours that is attacking this piece (find-aggressor cycle).  If you
have to do all moves, this is definitely slower than a full generate all-moves
case.  As a result, I think this is a 'break-even' proposition, since about
1/2 of the nodes are full-width (odd ply search) and 1/2 of the nodes are one-
move searches.  Since I don't like MVV/LVA on general principle (it will try
a move like QxR where the R is defended by a pawn, before it will try a move
like BxP where the pawn is free.)


>
>a) Doing for each enemy piece an AttackTo is very expensive
>b) Building a combined attackmap and finding the highest attacked victim
>   is basically the same as doing all captures.
>
>So: what am I overlooking here?

Note that generating the bitmap (all squares I attack) is far simpler than
generating the _moves_ from such a bitmap.



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.