[computer-go] Monte Carlo combined with minimax search

Peter Drake drake at lclark.edu
Sun Jul 23 15:36:33 PDT 2006


On Jul 23, 2006, at 3:01 PM, Rémi Coulom wrote:

> 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).

Yup, memory allocation is a killer.  We try to avoid new where we  
can, but there's always more tightening to do.

>
> 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.

It's closer to 1000 per second now, but I get the sense many programs  
are getting at least ten times that.

> 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.

:-)

Good news:  while we're still in the "pointless invasion" phase of  
the endgame, it looks like the Orego Monte Carlo tree player I've  
been working on is about to score its first solid 9x9 win against  
JacquelineGo.  If I can get two in a row, I'll report the result for  
the 9x9 ladder.

Peter Drake
Assistant Professor of Computer Science
Lewis & Clark College
http://www.lclark.edu/~drake/


More information about the computer-go mailing list