public static int Debug() { GoBoard lGoBoard = new GoBoard(9); GTPGoBoard lGTPGoBoard = new GTPGoBoard(lGoBoard); GTPCommConsole lGTPCommConsole = new GTPCommConsole(); GTPEngine lGTPEngine = new GTPEngine(lGTPGoBoard, lGTPCommConsole); lGTPEngine.Receive("boardsize 9\n"); lGTPEngine.Receive("gogui-play_sequence b A3 b A5 b A6 b A7 b A8 b A9 b B3 b B5 b B9 b C2 b C3 b C4 b C5 b C6 b C7 b D1 b D2 b D4 b D6 b D7 b E5 b E6 b F6 b G3 b G4 b G5 b G6 b G7 b H3 b H5 b H7 b H9 b J5 b J6 b J7 w A1 w A2 w B1 w B2 w B6 w B7 w B8 w C8 w C9 w D3 w D8 w E1 w E2 w E3 w E4 w E7 w E8 w F1 w F3 w F4 w F7 w F8 w F9 w G2 w G8 w G9 w H2 w H4 w H8 w J1 w J2 w J3 w J4 w J8\n"); lGTPEngine.Receive("play b PASS\n"); lGTPEngine.Receive("showboard\n"); lGTPEngine.Receive("top_moves white\n"); // lGTPCommConsole.Listen(); return(0); }
public static int SelfPlay() { GoBoard lGoBoard = new GoBoard(19); GTPGoBoard lGTPGoBoard = new GTPGoBoard(lGoBoard); GTPCommConsole lGTPCommConsole = new GTPCommConsole(); GTPEngine lGTPEngine = new GTPEngine(lGTPGoBoard, lGTPCommConsole); lGTPEngine.Receive("boardsize 9\n"); while (!lGoBoard.GameOver) { lGTPCommConsole.SendToEngine("genmove b\n"); lGTPCommConsole.SendToEngine("showboard\n"); lGTPCommConsole.SendToEngine("genmove w\n"); lGTPCommConsole.SendToEngine("showboard\n"); } return(0); }
public static int SelfPlay() { GoBoard lGoBoard = new GoBoard(19); GTPGoBoard lGTPGoBoard = new GTPGoBoard(lGoBoard); GTPCommConsole lGTPCommConsole = new GTPCommConsole(); GTPEngine lGTPEngine = new GTPEngine(lGTPGoBoard, lGTPCommConsole); lGTPEngine.Receive("boardsize 9\n"); while (!lGoBoard.GameOver) { lGTPCommConsole.SendToEngine("genmove b\n"); lGTPCommConsole.SendToEngine("showboard\n"); lGTPCommConsole.SendToEngine("genmove w\n"); lGTPCommConsole.SendToEngine("showboard\n"); } return 0; }
public static int Debug() { GoBoard lGoBoard = new GoBoard(9); GTPGoBoard lGTPGoBoard = new GTPGoBoard(lGoBoard); GTPCommConsole lGTPCommConsole = new GTPCommConsole(); GTPEngine lGTPEngine = new GTPEngine(lGTPGoBoard, lGTPCommConsole); lGTPEngine.Receive("boardsize 9\n"); lGTPEngine.Receive("gogui-play_sequence b A3 b A5 b A6 b A7 b A8 b A9 b B3 b B5 b B9 b C2 b C3 b C4 b C5 b C6 b C7 b D1 b D2 b D4 b D6 b D7 b E5 b E6 b F6 b G3 b G4 b G5 b G6 b G7 b H3 b H5 b H7 b H9 b J5 b J6 b J7 w A1 w A2 w B1 w B2 w B6 w B7 w B8 w C8 w C9 w D3 w D8 w E1 w E2 w E3 w E4 w E7 w E8 w F1 w F3 w F4 w F7 w F8 w F9 w G2 w G8 w G9 w H2 w H4 w H8 w J1 w J2 w J3 w J4 w J8\n"); lGTPEngine.Receive("play b PASS\n"); lGTPEngine.Receive("showboard\n"); lGTPEngine.Receive("top_moves white\n"); // lGTPCommConsole.Listen(); return 0; }
protected void SendToEngine(string str) { GTPEngine.Receive(str); }