gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] GTP extension for passive GUI


From: Tanguy Urvoy
Subject: Re: [gnugo-devel] GTP extension for passive GUI
Date: Wed, 28 Nov 2001 11:45:04 +0100

Hello,

To implement a GUI there are two way you can choose:
1) An active GUI with its own board management
2) A passive GUI which do not even know now the rules.

The first approach is the one of cgoban the second is the one
of SDL Go.
We choosed the second approach for Gothic because it is intended 
to reflect a lot of internal infomations about the engine.
It will not be able to compute all these informations 
so it seemed simpler to let the engine manage everything while
keeping a clear distinction between the engine and the GUI.


Gunnar Farneback wrote:
> If you want much information, this format seems very limited. Also I'm
> not sure I understand why a program would want to communicate with
> this kind of format in the first place.

Let me return the question:
I'm not sure to undersand why a human would want to read
this:

query_boardsize
= 19
list_stones black
= E19 L19 M19 D18 F18 L18 T18 C17 D17 E17 G17 K17 L17 M17 N17 S17 T17
C16 D16 G16 K16 M16 R16 S16 D15 G15 J15 M15 N15 Q15 A14 B14 C14 D14 F14
K14 Q14 C13 G13 K13 L13 M13 N13 P13 Q13 C12 E12 F12 G12 H12 J12 K12 L12
M12 Q12 D11 G11 H11 P11 Q11 R11 B10 D10 H10 L10 Q10 S10 C9 D9 E9 L9 R9
A8 B8 D8 F8 K8 L8 M8 Q8 R8 A7 K7 M7 R7 K6 M6 N6 P6 Q6 R6 S6 T6 J5 L5 M5
P5 Q5 R5 T5 H4 K4 P4 T4 F3 G3 H3 K3 F2 K2 E1 F1 K1 L1 
list_stones white
= C19 D19 N19 O19 R19 S19 T19 A18 C18 M18 N18 Q18 R18 S18 B17 F17 O17
P17 R17 B16 E16 F16 L16 N16 O16 Q16 A15 B15 C15 E15 K15 L15 O15 P15 E14
G14 L14 M14 N14 O14 P14 B13 H13 J13 O13 N12 O12 P12 E11 F11 J11 K11 L11
M11 O11 C10 E10 F10 G10 J10 K10 M10 O10 P10 F9 G9 H9 J9 K9 M9 N9 P9 Q9
C8 E8 J8 N8 P8 B7 C7 D7 E7 J7 N7 P7 Q7 A6 G6 J6 O6 B5 H5 N5 O5 S5 D4 F4
G4 L4 M4 O4 Q4 R4 S4 E3 L3 P3 S3 T3 C2 E2 L2 M2 D1 M1 
all_legal black
= A19 B19 F19 G19 H19 J19 K19 P19 Q19 B18 E18 G18 H18 J18 K18 O18 P18
A17 H17 J17 A16 H16 J16 T16 F15 H15 R15 S15 T15 H14 J14 R14 S14 T14 A13
D13 E13 F13 R13 S13 T13 A12 B12 D12 R12 S12 T12 A11 B11 C11 N11 S11 T11
A10 N10 R10 T10 A9 B9 O9 S9 T9 G8 H8 O8 S8 T8 F7 G7 H7 L7 O7 S7 T7 B6 C6
D6 E6 F6 H6 L6 A5 C5 D5 E5 F5 G5 K5 A4 B4 C4 E4 J4 N4 A3 B3 C3 D3 J3 M3
N3 O3 Q3 R3 A2 B2 D2 G2 H2 J2 N2 O2 P2 Q2 R2 S2 T2 A1 B1 C1 G1 H1 J1 N1
O1 P1 Q1 R1 S1 T1
all_legal white
= A19 B19 F19 G19 H19 J19 K19 P19 Q19 B18 G18 H18 J18 K18 O18 P18 A17
H17 J17 Q17 A16 H16 J16 P16 T16 F15 H15 R15 S15 T15 H14 J14 R14 S14 T14
A13 D13 E13 F13 R13 S13 T13 A12 B12 D12 R12 S12 T12 A11 B11 C11 N11 S11
T11 A10 N10 T10 A9 B9 O9 S9 T9 G8 H8 O8 S8 T8 F7 G7 H7 L7 O7 S7 T7 B6 C6
D6 E6 F6 H6 L6 A5 C5 D5 E5 F5 G5 A4 B4 C4 E4 J4 N4 A3 B3 C3 D3 J3 M3 N3
O3 Q3 R3 A2 B2 D2 G2 H2 J2 N2 O2 P2 Q2 R2 S2 T2 A1 B1 C1 G1 H1 J1 N1 O1
P1 Q1 R1 S1 T1
                                  

To get the same amount of information
i definitly prefere this representation:

dump board
+-------------------+
|..OOX.....XXOO..OOO|
|O.OXxX....XOO..OOOX|
|.OXXXOX..XXXXOOoOXX|
|.OXXOOX..XOXOOoOXX.|
|OOOXO.X.XOOXXOOX...|
|XXXXOXO..XOOOOOX...|
|.OX...XOOXXXXOXX...|
|..X.XXXXXXXXOOOX...|
|...XOOXXOOOO.OXXX..|
|.XOXOOOXOOXO.OOXxX.|
|..XXXOOOOOXOO.OOX..|
|XXOXOX..OXXXO.OXX..|
|XOOOO...OX.XO.OOX..|
|O.....O.OX.XXOXXXXX|
|.O.....OXxXXOOXXXOX|
|...O.OOX.XOO.OXOOOX|
|....OXXX.XO...O..OO|
|..O.OX...XOO.......|
|...OXX...XXO.......|
+-------------------+
= board          


We choose use this representation instead of a list of 
values not (only ;-) ) for the pleasure of parsing complicated
strings but also 
- To keep a humand readable format.
(this is one the GOALS of GTP to be human readable and this is why
people prefer C language to assembly language).
- To reduce the traffic in the pipe.
- To use an easy to parse format (no need to use bison nor flex)
- To use an easy to extend format
- To use a color independant representation of legal moves.
('.' is legal for all, 'x' only for black and 'o' only for white)


I admit that the list representation is good for certain things like
listing the stones of a dragon or giving the list of best moves.
I also admit that everything can be done with list of positions,
but please also consider the other approach.

Tanguy

-- 
----------------------------------------------------
Tanguy Urvoy http://www.irisa.fr/prive/Tanguy.Urvoy/
----------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]