On Tue, 2007-06-05 at 15:18 -0400, Jason House wrote:
> Do you eliminate all illegal/stupid positions?  Filling eyes? Suicide
> plays?  Disallowing suicides likely means you need a list for each
> color.  Sadly, if a move was rejected because it was an illegal
> suicide and then the enemy chain puts itself in atari, the simple
> capture move would have been pruned. 

There is just 1 physical list, but I maintain (with indices) 3 sublists:

   1) occupied points
   2) non-occupied points
   3) untried non-occupied points 

So if a point is not occupied but is not legal either,  I "put it behind
me" so it's not considered on this move.  Whenever a move is "put
behind" it is swapped with the current "cursor" and the cursor is
bumped.  So it stays in the non-occupied points section of the list but
still behind the untried section. 

When the move is found to be legal, it is put into the occupied points
section of the list with a swap operation and the index to the first
non-occupied point is incremented.  

When it's time to find the next move,  I start right at the non-occupied
point
section and essentially start rebuilding the short illegal move
section.  

Think of it this way:


| o o o o o o o | i i i | c c c c c c |

o = occupied points
i = illegal moves  (also non-occupied)
c = candidates     (also non-occupied)

Both i and c are unoccupied points.

The counter for i and c are the same at the beginning of a search
for a new move.  The "i" list is often null.    After a few moves
are played in a game, most of the illegal moves are probably near
the front of the non-occupied points.


It's simpler than my description sounds.   

- Don


_______________________________________________
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/

Reply via email to