Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: MVVLVA sorting does not help for move ordering

Author: Ricardo Gibert

Date: 12:11:13 09/21/02

Go up one level in this thread


On September 21, 2002 at 12:20:24, scott farrell wrote:

>I was just fiddling with my move ordering (as we all do from time to time).
>
>I found that my MVVLVA code worsened (is that a word?) my move ordering, and
>slow my searches significantly.
>
>I altered it to just simply ordering the capture by the size of the material it
>is to take, disregarding the size of the piece to perform the capture.
>
>As far as I know current wisdom for move ordering is something like this:
>1. from hastable first
>2. killers next
>3. winning captures ordered by MVVLVA


Your take on MVV/LVA is not correct here.


>4. other moves
>5. losing captures
>
>My updated move ordering is:
>1. from hastable first
>2. killers next
>3. all captures, ordered by the size of the captured piece (largest first), and
>ties broken by size of attacker only


This is MVV/LVA. See http://www.seanet.com/~brucemo/topics/quiescent.htm#MVVLVA


>4. other moves
>5. losing captures
>
>I havent looked into to hard just yet, but I am pretty sure its got something to
>do with search extensions, and recapture extensions. Running all the captures
>first allows the extensions to kick in quickly and cause lots of nice cutoffs.
>
>The other thing it might be is a bug in my code - and turning off the MVVLVA
>ordering of capture bypassed the bug, but its only a few lines, and I dont think
>there is any bugs.
>
>What do you all think? am I crazy, do I have a bug, or are some programs already
>doing this?


I think you have misunderstood and rediscovered on your own the way MVV/LVA
actually works.

The jury us still out as to whether you are crazy ;-)

BTW, Don't think of your time spent on this as wasted. You surely understand
things better now than you would have otherwise.


>
>Scott
>
>Here is my old code:
>
>        if (moves[depthTree][i].capture > 0)
>            {
>            //black is capturing a white piece
>            if (b.isAttacked(moves[depthTree][i].s2, Board.WHITE))
>                moves[depthTree][i].searchOrder
>                    += (Board.pieceValues[moves[depthTree][i].capture]
>                        - Board.pieceValues[
>                        - moves[depthTree][i].piece])
>                    * 100000 ;
>            else
>                //enpris
>                moves[depthTree][i].searchOrder
>                    += Board.pieceValues[moves[depthTree][i].capture]
>                    * 100000 ;
>        } else if (moves[depthTree][i].capture < 0)
>            {
>            //white is capturing a black
>            if (b.isAttacked(moves[depthTree][i].s2, Board.BLACK))
>                moves[depthTree][i].searchOrder
>                    += (Board.pieceValues[-moves[depthTree][i].capture]
>                        - Board.pieceValues[moves[depthTree][i].piece])
>                    * 100000 ;
>            else
>                //enpris
>                moves[depthTree][i].searchOrder
>                    += Board.pieceValues[-moves[depthTree][i].capture]
>                    * 100000 ;
>        }
>
>
>and my new code that is much much better at ordering:
>
> if (moves[depthTree][i].capture > 0)
>            {
>            moves[depthTree][i].searchOrder
>                += (Board.pieceValues[moves[depthTree][i].capture] +
>moves[depthTree][i].piece)
>                * 1000;
>        } else
>            {
>            moves[depthTree][i].searchOrder
>                += (Board.pieceValues[-moves[depthTree][i].capture] -
>moves[depthTree][i].piece)
>                * 1000;
>        }



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.