Article View: gnu.chess
Article #3753Re: To sort or not to sort?
From: Marcel van Kervinck
Date: Fri, 20 Dec 1996 00:00
Date: Fri, 20 Dec 1996 00:00
40 lines
2505 bytes
2505 bytes
Robert Hyatt (hyatt@cis.uab.edu) wrote:
> Bruce pointed out one important thing that's been overlooked: After
> searching a move at any ply, the ordering information likely changes
> because the history values are modified by any search done below that
> move. As a result, the ply=N move list would have to be re-sorted each
> time, or else part of the benefit of the history heuristic would go
> lost.
Yes. That is correct. On the other hand, re-scoring each move every
time you select one makes selecting more expensive, since you have
to look up the history values over and over again.
As always in (chess) programming: it's a trade-off you have to consider,
and you have to try dozens of possibilities before you can select one. And
once you've made choice, it affects other parts of your program as well...
> That's one of the nice things about the history heuristic and selection
> sort approach... you search the first move, then when it's time to select
> the next move at that ply, the search below that move has updated the history
> counts for the moves that were good at deeper levels so they can be tried
> at this level also. Sorting up front misses this benefit.
You have to compare both before you can draw conclusions. Have you
done that?
> In any case, done as we are doing this, the difference in complexity is
> minimal... because we don't try every move via a selection sort, only the
> first 5 or so. When you look at the actual instruction counts, I suspect
> the selection sort actually executes fewer total instructions anyway, which
> is the main consideration. The selection sort doesn't contribute a significant
> amount to the total search time in profiling results...
If you suspect so, give instruction counts. It's easily quantifiable.
Marcel
-- _ _
_| |_|_|
|_ |_ Marcel van Kervinck
|_| buex95a@urc.tue.nl
Technical Details
Message-ID:
<59ec3f$dds@tuegate.tue.nl>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<59dusn$4n$1@mhafc.production.compuserve.com> <59e219$1hm@juniper.cis.uab.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 110df2,74603dfbdf933ad5 X-Google-Attributes: gid110df2,public X-Google-Thread: 10d71d,1d03c3c9facc2503 X-Google-Attributes: gid10d71d,public From: buex95a@asterix.urc.tue.nl (Marcel van Kervinck) Subject: Re: To sort or not to sort? Date: 1996/12/20 Message-ID: <59ec3f$dds@tuegate.tue.nl> X-Deja-AN: 205113744 references: <59dusn$4n$1@mhafc.production.compuserve.com> <59e219$1hm@juniper.cis.uab.edu> organization: Eindhoven University of Technology, The Netherlands newsgroups: gnu.chess,rec.games.chess.computer