> I probably go through my entire array 5 times per second during a UCT
> search. So far I have been relying on the hope that I do not come back
> to the beginning of my array at exactly the same position in a random
> playout which would cause a bad cycle. If I come back at a different
> position then I will not start replaying the same set of playouts in
> the search of that particular game position, and I will also play a
> different sequence of moves in this run through the array because I
> will "reject" different numbers I get because they correspond to
> illegal board positions but didn't last time through the array and
> vice versa.
>
> I think the chance of a bad cycle is very small.
Hopefully that is true.  

> I just did some more analysis of this just now and it got a little
> complicated, so I'll leave it out. However, I do think making a bad
> cycle impossible is important. Your idea of reinitializing some random
> positions in the array looks really good. Unfortunately there is no
> way I can do this each time through the array for any meaningful
> portion of the whole array...since just resetting my index to 0 when I
> get to the end is pretty expensive in terms of average cost, and if
> I'm going through the array a few times a second I can't do much more
> than that each time. What do you think of resetting my index to a
> random position between 0 and some small n every time to make the
> probability of getting stuck in a cycle forever go to zero, and then
> finding some free time to reset the numbers like right after playing a
> move and before starting to ponder for example?
Certainly that's better than nothing.   I assume you will use the random
number generator to do this?   If so, it will be an improvement.
>
> And about the cache...I've never really thought about it. How do think
> the cache would be affected? I don't really know much about cache's to
> be honest. Are you saying that the numbers in my array would get
> stored in the cache? Is this good or bad?
If you use a lot of memory to store something that could be generated on
the fly,  you could slow your whole program down due to caching issues
between the processor and memory.    When you use a piece of data for
the first time,  it is slow.   But after that it is much faster because
it is stored in super-fast memory.   But you only have so much of that
super-fast memory.     I don't think it's likely to be an issue for
you,  but it's something to keep in mind.      I have created cache
unfriendly software by going too crazy with tables but modern processors
are pretty well designed and generous.

- Don


>
> Imran
> ------------------------------------------------------------------------
>
> _______________________________________________
> computer-go mailing list
> [email protected]
> http://www.computer-go.org/mailman/listinfo/computer-go/
_______________________________________________
computer-go mailing list
[email protected]
http://www.computer-go.org/mailman/listinfo/computer-go/

Reply via email to