Computer Chess Club Archives


Search

Terms

Messages

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

Author: Sven Reichard

Date: 20:04:05 10/15/99

Go up one level in this thread


>sure, but he generates moves in random order and attaches a 'priority' to each
>one.  You have to either (a) scan the entire list and pick the remaining move
>with the highest priority or (b) know which priority you are looking for and
>scan (on average) 1/2 of the list to find it, assuming there is a move with such
>priority.
>
>still N^2 basically... no matter how you cut it...

... or (c), remembers where his last move was, and looks from there for the next
move of the same priority. Passes 7 times over the whole list. Looks pretty
linear to me...

Sven.



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.