[computer-go] Monte Carlo combined with minimax search

Rémi Coulom Remi.Coulom at univ-lille3.fr
Sun Jul 23 15:01:08 PDT 2006


Peter Drake wrote:
> I don't mean to start a language war here, but I have a simple yes-or-no 
> question:  am I the only one using Java for Monte Carlo?  Since the 
> technique is so computationally intensive, it sounds like most people 
> are using C/C++ so they can program down to the bare metal.

I guess that if I ported Crazy Stone to java, it would be only 2-3 times 
slower than the C++ version. If you don't create new objects all the 
time, your program will be fast. Simply use plain arrays of ints 
everywhere, and don't allocate any memory dynamically (with new) during 
a random game (this includes news hidden inside java containers).

If you are still doing your 100 simulations per second, then I believe 
you can easily multiply this by 10 or more by writing fast java.

I don't like trying to write fast code in java, because it often 
requires to use poor programming style. C++ allows to have speed and 
good programming style at the same time.

Rémi


More information about the computer-go mailing list