[Pachi] UCT parameters

Petr Baudis pasky at ucw.cz
Sun Aug 5 22:50:16 CEST 2012


  Hi!

On Sun, Aug 05, 2012 at 12:43:12PM +0100, Neil Mclean wrote:
> Further query about setting parameters via gtp.
> 
> In moggy.c, prior.c and ucb1amaf.c
> 
> I see in the source that pachi uses opaque structs, i.e. structs
> hidden in the .c file and not declared in the header file. I was
> wondering if this was a design decision to hide them, anything to do
> with the threading implementation perhaps?
> 
> If not, would it be wise to move the structs to the header file or
> should i implement getters/setters to access the parameters?

  The design of Pachi is modular. That means you should be able to add
another playout or search module with minimal changes in the rest of
Pachi, and be able to change details of playout policy by tweaking just
that file itself, etc.

  With that in mind, keeping the structures opaque is indeed fully
intentional. Having a generic getter/setter that takes a string with
setting name and value string sounds sensible, but no other parts of
Pachi should know or care about internal settings of various modules.

  Best,

-- 
				Petr "Pasky" Baudis
	Smart data structures and dumb code works a lot better
	than the other way around.  -- Eric S. Raymond


More information about the Pachi mailing list