Hi,

I also did computer chess before go (and checkers before chess). I would
start with a straight-forward implementation and learn with it. If you end
up finding your board representation limiting, rewrite it.

Here's some code from my program:

int const N = 19;
int const XN = N + 2;
int const XN2 = XN * XN;

enum class Color : char {
  Empty, Black, White, Outside
};

inline bool is_occupied(Color c) {
  return c == Color::Black || c == Color::White;
}

inline Color enemy(Color c) {
  return c == Color::Black ? Color::White : c == Color::White ?
Color::Black : Color::Empty;
}

struct Board {
  Color array[XN2];
  int chain_id[XN2];
  int chain_size[XN2];
  int chain_liberties[XN2];
  int next_in_chain[XN2];
  int age[XN2];
[...]



On Sun, Apr 10, 2016 at 3:19 AM, Jean-Francois Romang <jrom...@posteo.de>
wrote:

> Hello to everyone ; I'm a newcomer in this list and computer go
> programming. I have a chess programming background, but I want to start
> something new. :-)
> I'm currently in the early phases of developing GTP compatible go engine ;
> now it's time for me to choose a board representation : are there some
> articles or tips on this ?
> Thanks,
> Jean-Francois
> _______________________________________________
> Computer-go mailing list
> Computer-go@computer-go.org
> http://computer-go.org/mailman/listinfo/computer-go
_______________________________________________
Computer-go mailing list
Computer-go@computer-go.org
http://computer-go.org/mailman/listinfo/computer-go

Reply via email to