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

Re: Go Programming Environment Offered (?)



Greg Miller wrote:
> Jeffrey Greenberg wrote:
> >     Your Go Engine would be called with a legal Go board.  You
> > examine the supplied Go Board object , do your Go programming magic,
> > and give your response.
> 
> Uh, oh... This sounds like you pass only a current full board state,
> requiring the game engine to cache it and compare each one to the
> previous, or recalculate everything from scratch after each move... Is
> this correct?
> 

Personally, I'd just define two simple interfaces : one for the
GUI/networking program to communicate info to the AI (two methods : for
when a move is made, and when a move needs to be made), and one for the
AI to converse with the program (one method : to make a move).

There's no reason why the AI object can't maintain it's own info about
the board state (in whatever form it sees fit), so it really shouldn't
need to be passed the board state each time, just each individual move.

This would let you use just about any AI with the driver program --
single or multithreaded, whatever sort of data structures, etc. I'd put
any other sort of public code you dig up (declarations, data structures,
useful functions, etc.) in a separate library. No sense forcing people
to use structures they don't want or need (each user would probably need
to tweek them one way or another, anyway).

Just a thought,
Jeff Raven