Zach Wegner wrote:
What you could do is XOR the RDTSC into the seed (or array or whatever
your RNG uses) at the beginning of each playout. That adds to the
chaos but doesn't slow it down much at all.
I like your idea. Yes, you could probably use a really fast simple RNG
and do this. AnchorMan had a very trivial RNG and I noticed that if
you played enough games, you start getting the same games over and
over. So I could only play a few hundreds before this started
happening (for instance playing anchor vs anchor.) It seems like
with 4 billion possible seeds that this would not happen (each games
started with a seed based on the time() call.) But apparently
something was going on that I didn't understand because there seemed to
be only a few hundred games possible (at any fixed level.)
I switched over to Mersenne Twister and this problem went away. MT did
not improve the playing quality in any way I could notice, so I don't
believe MC in general requires a very good RNG.
I once built a card playing program, and while developing a playing
strategy I tested different versions against each other. But then I
tried as a sanity check, testing the same version against itself, and I
noticed a systematic bias, one particular side was winning something
like 53 or 54 percent of the games even though the conditions were
unbiased. I discovered the problem was with the RNG in the C library
(this was a long time ago.) I solved the problem by changing the way
I shuffled the cards. Originally I created a deck from scratch which
always had the same ordering, then I would apply the standard
Fischer-Yates shuffle. The fix was to reuse the deck from the last
game and shuffle THAT deck. Basically I grabbed up all the cards in
the players hands and on the "table" and put them back in the deck just
like us humans do when playing cards, then I would shuffle them. The
effect was that I implicitly created a more sophisticated RNG with lots
of state and more than likely a very long cycle time compared to the
simple one I started with.
This could be done with your go program too. If you have some sort of
list of all the legal points at the beginning of the game that you work
with and manipulate, just leave it alone instead of reinitializing
it. Or let the move sequences of the previous game impact the initial
ordering or how the game is played. You would be getting a more
sophisticated RNG for free. Of course you have to save state between
program invocations and that's probably too ugly.
- Don
_______________________________________________
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/
_______________________________________________
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/