Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: General efficiency question

Author: Daniel Clausen

Date: 08:09:25 04/23/02

Go up one level in this thread


On April 23, 2002 at 10:58:20, Russell Reagan wrote:

>On April 23, 2002 at 07:30:12, Uri Blass wrote:
>
>>It is not more complicated and it is faster to do the following:
>>
>>genallmove();
>>while (move left)
>>{
>>sortnextmove();
>>makeMove();
>>search...
>>}
>>
>>Uri
>
>How does this work? I don't understand what you mean by sorting a single move.
>If you could explain a little more how this works I would appreciate it.
>
>Russell

Instead of sorting the whole array, just find the move with the highest score,
remove it from the move list and return it. Finding the move with the highest
score is O(n).

Sargon



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.