Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Fast way to sort moves in movelist ?

Author: Heiner Marxen

Date: 11:51:21 10/17/99

Go up one level in this thread


On October 17, 1999 at 11:52:28, Jeremiah Penery wrote:

>On October 17, 1999 at 08:07:01, leonid wrote:
>
>>On October 16, 1999 at 19:26:57, Jeremiah Penery wrote:
>>
>>>On October 16, 1999 at 17:51:46, leonid wrote:
>>>
>>>>To put in the chain of moves first the moves that give the check is simple -
>>>>those moves can lead to the mate. Mate stop all the thinking, once the highest
>>>>possible value is achieved.
>>>
>>>
>>>It is true that these moves can lead to mate, but not very often.  In fact, most
>>>of these moves will be useless.  Take this example:  1. e4 e5 2. Bc4 Nf6, then
>>>the move Bxf7 is a check, but it is completely useless.  I suspect this will be
>>>the case for most checking moves.
>>>My guess is that sorting moves first because they give check probably won't give
>>>good results compared to other orderings.

You could try to merge in the capture logic here, to avoid check moves,
which achieve nothing but immediately loose material.

[SNIP]
>The idea with move ordering is that you want to be searching the "best" move
>first.  A checking move can be very good, but _most of the time_ it will not be
>the best move.  If you search a checking move, you must take the time to do the
>full search on it.  If it is a bad move, you will have to find a better move,
>and then do another full search, which can end up taking twice as long.  With
>better move ordering, you can be searching the better move first, and so you
>will not have to re-search on as many positions, because you can get faster
>cutoffs.  This will save time and lower the effective Branching Factor.
>It is possible that searching checking moves first does help you - I am
>interested to see results. :)

The tree/search spanned by a checking move often is smaller than
the tree/search spanned by other moves.  IF it really is significantly
smaller, it is not that bad, to do it first, since failure to cut off
with it, in the end did not much increase the overall work.
And if the check move DOES cutoff... is even better.

In my chess problem solver I do nearly always start with check moves.
Moves that win big material are sometimes preferred over checking moves.
While this may frequently look stupid, it most often does not hurt my
search, because the "stupid" searches often are small, and sometimes
are sufficient for a cutoff.

I also observed that a less accurate, but more scematic move ordering
leads to better hit rate on the transposition table, which sometimes
compensates the "stupidity" so effectively, that a better move ordering
in the end was not significantly faster (big sigh).

Summary: a seemingly stupid move first will not hurt much, IF it spans
a comparatively small tree.

Heiner



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.