[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programming advanced strategy



Darren Cook wrote:
> 
> Last week, John Fairbairn posted this on rec.games.go. It didn't get much
> reponse, but maybe be of interest to people on this mailing list. I'm
> reposting it here with his permission.
> ----------------------------------------
> The thread on advanced strategy set me thinking. I haven't finished my
> thoughts, but I'd like to float one preliminary idea since there are so
> many programmers in r.g.g. (I am not one). Perhaps they could comment on
> whether this idea is worth pursuing.
> 
> I was wondering whether go concepts could be reduced to objects as in
> object-oriented programming. Each object would have its place in a
> hierarchy, and would have properties and methods (all of which could be
> inspected, of course.

Hello,


 The GO Board is an easy target for an Object.
Objects that are derived from the GO board state are other candidates.
For example Strings (sometimes called Blocks). 
If you introduce the concept of a Connection (between 2 Strings) then
you could introduce a Group as a set of of Connected Strings. One of 
the nice things about OO is the use of abstract classes that define
an interface and allow various implementations to be explored without
effecting breaking the rest of the code (decoupling). For exampleq
making a COnnection abstract
allows different concepts of conection to be used. At present
in pubgo+ (the program I am working on occasionally) the Connection
implementation uses a simple diagonal Connection. This idea of a
connection is cool for doing Eye space calculations. However I have
structured the code such that the Group maintainance could accept
different types of Connection. For example bamboo joints or even
connections that are derived from a search engine calculation.
(could resuser code for Moyo type calculations)

This is one area where OO programming structures are useful. 

 The other area I have looked at is mapping GO concepts onto 
my proof number search engine. For example I use true/false based
focii and plug them into abstract status evaluation search components.
The status compoment perfroms the search from both players view point
but needs know nothing about the nature of the search (more decoupling).


 I could go on (maybe later) but I have to go home before my super gets
cold.


   cheers Paul.