chessathome icon indicating copy to clipboard operation
chessathome copied to clipboard

Add more randomness

Open sylvinus opened this issue 13 years ago • 4 comments

So that the AI doesn't always play the same moves/openings

sylvinus avatar Sep 08 '11 14:09 sylvinus

Where is the current entry point for randomness?

tbrowder avatar Sep 12 '11 12:09 tbrowder

currently there's none! Besides using an opening book I'm not sure where to add it. Do you have any ideas?

sylvinus avatar Sep 12 '11 12:09 sylvinus

Yes, but I'm just getting here today for the first time after seeing the interesting article about the project and thought there was already a random number feature somewhere. I have used the Mersenne Twister (when it was first released to the public) in a Monte Carlo project that required repeatability but in many independent random number streams. I generated some 300 generators, each with a starting seed randomly selected. That could be extended greatly and random numbers pre-generated on a server. For the scale you envision this may not work, but the huge random number domain of the Mersenne Twister could help. The code is open source and a Javascript version could be made easily if there is not one available already. Perhaps each node could get a random seed from the master and then create its own independent stream-something like that.

tbrowder avatar Sep 12 '11 14:09 tbrowder

I'm probably jumping in here too early as I re-read the problem. An opening set of moves could be defined with weights according to relative historical success. Then one is selected based on a random number generated by the node's host.

tbrowder avatar Sep 12 '11 14:09 tbrowder