Page 1 of 2
Human readable syntax for a short sequence of moves (<30).
Posted: Tue Mar 14, 2017 5:25 pm
by Morgoth Bauglir
I searched a bit for a general convention but can't really find any. If anybody knows of any, please let me know as I do not want to reinvent the wheel.
My own thinking is to use this syntax:
[Move 45] -> b:A1 B2 C3 w:_ E5 F6 k:G7 H8 I9 w:T1 S2
(the moves are nonsensical)
1. Black plays A1 as move 45.
2. White plays B2.
3. Black plays C3.
4. White passes.
5. Black plays E5.
6. White plays F6.
7. Black takes ko at G7.
8. White plays H8.
9. Black takes I9
10. White plays T1.
11. Black play S2.
'w:' means it's a move by White.
'b:" means it's a move by Black.
'_' means it's a pass.
'k:' means it's a ko.
'w:' and 'b:' would be issued every 10 moves if it's not a ko.
Posted: Tue Mar 14, 2017 5:52 pm
by EdLee
My own thinking is to use this syntax:
[Move 45] -> b:A1 B2 C3 w:_ E5 F6 k:G7 H8 I9 w:T1 S2
The uppercase L is more clear than the ambiguity among:
A popular coordinate system omits the
i column and skips to J.
Re: Human readable syntax for a short sequence of moves (<30
Posted: Tue Mar 14, 2017 6:49 pm
by Morgoth Bauglir
EdLee wrote:My own thinking is to use this syntax:
[Move 45] -> b:A1 B2 C3 w:_ E5 F6 k:G7 H8 I9 w:T1 S2
The uppercase L is more clear than the ambiguity among:
A popular coordinate system omits the
i column and skips to J.
Great, thank you. Do you think underscores makes it more readable than colons ?
[Move 45] -> b_A1 B2 C3 w_ E5 F6 k_G7 H8 J9 w_T1 S2
versus
[Move 45] -> b:A1 B2 C3 w:_ E5 F6 k:G7 H8 J9 w:T1 S2
Re: Human readable syntax for a short sequence of moves (<30
Posted: Tue Mar 14, 2017 7:47 pm
by Bill Spight
How about this?
'+' or nothing indicates a Black non-ko move
'-' indicates a White non-ko move
'*' indicates a Black ko move
'/' indicates a White ko move
'.' indicates an even sequence of passes
45A1-B2+C3+E5-F6*G7-H8+J9-T1+S2
The White pass (or an odd number of passes) is inferred from having 2 '+' moves in a row. If you really need to indicate individual passes, you could use '.' for a pass, '+.' for a Black pass and '-.' for a White pass.
We could make this even more consise, but I don't know if that is a virtue.
Re: Human readable syntax for a short sequence of moves (<30
Posted: Tue Mar 14, 2017 8:08 pm
by ez4u
How do you intend to use your syntax? Could you give an example?
Re: Human readable syntax for a short sequence of moves (<30
Posted: Wed Mar 15, 2017 12:00 am
by Morgoth Bauglir
ez4u wrote:How do you intend to use your syntax? Could you give an example?
I would like to make it easier to read and visualize a sequence of moves in plain text for use in emails and plaintext documents.
For example, you get something like
D17 D15 C15 D16 C16 E17 C14 D14 D13 C17 D18 B17 E18
The moves are annotated to make it easier to visualize.
[Move 1] -> b:D17 D15 C15 D16 C16 E17 C14 D14 D13 w:C17 D18 B17 E18
My ideas are to:
1. Add the number of the starting move.
2. Break it into more readable chucks by adding 'w:' or 'b:' every 10 moves or when reasonable.
3. Taking note of the kos as they are particularly hard to keep track of by adding 'k:'.
4. Use 'w:_' or 'b:_' for passes.
Maybe some way to highlight the key moves too but I wouldn't want to make it too complex.
Bill Spight wrote:How about this?
'+' or nothing indicates a Black non-ko move
'-' indicates a White non-ko move
'*' indicates a Black ko move
'/' indicates a White ko move
'.' indicates an even sequence of passes
45A1-B2+C3+E5-F6*G7-H8+J9-T1+S2
The White pass (or an odd number of passes) is inferred from having 2 '+' moves in a row. If you really need to indicate individual passes, you could use '.' for a pass, '+.' for a Black pass and '-.' for a White pass.
We could make this even more consise, but I don't know if that is a virtue.
Bill, I would like it to be more intuitive.

It's hard to guess what the mathematical operators means in your syntax.
Re: Human readable syntax for a short sequence of moves (<30
Posted: Wed Mar 15, 2017 12:16 am
by Kirby
FWIW, I think that this:
1. Black plays A1 as move 45.
2. White plays B2.
3. Black plays C3.
4. White passes.
5. Black plays E5.
6. White plays F6.
7. Black takes ko at G7.
8. White plays H8.
9. Black takes I9
10. White plays T1.
11. Black play S2.
is more readable than this:
[Move 45] -> b:A1 B2 C3 w:_ E5 F6 k:G7 H8 I9 w:T1 S2
It's difficult to contribute without having a good idea of what balance you want to achieve between readability and conciseness.
Re: Human readable syntax for a short sequence of moves (<30
Posted: Wed Mar 15, 2017 3:01 am
by Morgoth Bauglir
Marcel Grünauer wrote:Chess needs such a notation because the board is constantly changing. With Go it's possible to show many moves in one diagram, with minor annotations for ko, pass etc. Also, the Go board is bigger than the chess board, so coordinates are more difficult to visualize, let alone sequences given in coordinates.
Digital devices, on which a lot of texts are read, are very good at turning text into graphics. To burden the reader with a text notation is like using this SVG code:
Code: Select all
<circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" />
instead of showing a red circle with a black outline.
Thank you for letting me know about
Chess Algebraic Notation !
I would argue that "a red circle with with a black outline" would be the human readable version rather than XML which is designed to be machine readable though.

Posted: Wed Mar 15, 2017 3:18 am
by EdLee
Morgoth Bauglir wrote:I would argue that "a red circle with with a black outline" would be the human readable version rather than XML which is designed to be machine readable though.

That's exactly what Marcel said.
Re: Human readable syntax for a short sequence of moves (<30
Posted: Wed Mar 15, 2017 3:30 am
by Uberdude
Like people said, diagrams are great. But if you want to keep it as text then actually describing the moves rather than coordinates is often more intelligible, but requires (at least for now) an intelligent Go-playing human to generate e.g. black approaches the top right corner from top side, white answers with knight's move, black slides, white 3-3. black 2-space extension. It can get hard to find non-ambiguous wording with weird moves in strange places, but as most moves are played for a reason in relation to existing stones on the board it usually works quite well.
Re: Human readable syntax for a short sequence of moves (<30
Posted: Wed Mar 15, 2017 3:47 am
by daal
As far as readability goes, sgf > diagram > using language (Black plays at E5) > any type of notation.
What I am saying is that given the constraint of plain text, you will necessarily sacrifice readability. If this is a real constraint, I don't see any reason not to use language for short sequences, as it doesn't require learning a syntax. If you are paying by the letter, I find listing each move on a separate line easier to read.
b A1
w B2
b C3
w D4
as opposed to: b A1 w B2 b C3 w D4
I would also encourage augmenting the list with words instead of symbols to indicate properties of moves:
b A1
w B2 captures
b C3
w D4 takes ko
is easier to read than:
b @A1
w $B2
b @C3
w #D4
Edit: I'm not sure that I agree with Uberdude's suggestion to use descriptive language, as that can become quite wordy, and also requires an accompanying diagram.
Re: Human readable syntax for a short sequence of moves (<30
Posted: Wed Mar 15, 2017 4:15 am
by Bill Spight
For human readability, IMO nothing beats diagrams. As for emails and such, why, we write diagrams with text all the time, when we post diagrams here. If you don't have a program to convert diagram text, use a font with constant spacing, like Courier New.
Example: A diagram I posted to another thread here, altered slightly for sending via email.
B10 - B18
---------------------------------------
| . . . 6 . . . . . . . . . . . . . . . |
| . . 4 X O . . . . . . . . . . . . . . |
| . 7 . 5 . O . X . . 3 . 8 . . . . . . |
| . . . X . . O X . , . . . . . O . . . |
| . . . . . 1 2 O . . . . . . . . . . . |
| . . . . . . O . . . . . . . . . . . . |
| . . X . . . . . . . . . . . . . . . . |
| . . . . . . . . . . . . . . . . . . . |
| . . . . . . . . . . . . . . . . . . . |
| . . . , . . . . . , . . . . . , . . . |
| . . . . . . . . . . . . . . . . . . . |
| . . . . . . . . . . . . . . . . . . . |
| . . . . . . . . . . . . . . . . . . . |
| . . 9 . . . . . . . . . . . . . . . . |
| . . . . . . . . . . . . . . . . . . . |
| . . . O . . . . . , . . . . . X . . . |
| . . . . . . . . . . . . . . . . . . . |
| . . . . . . . . . . . . . . . . . . . |
| . . . . . . . . . . . . . . . . . . . |
---------------------------------------
Re:
Posted: Wed Mar 15, 2017 5:29 am
by Bonobo
EdLee wrote:Morgoth Bauglir wrote:I would argue that "a red circle with with a black outline" would be the human readable version rather than XML which is designed to be machine readable though.

That's exactly what Marcel said.
Uhm, no:
Marcel Grünauer wrote:[..] To burden the reader with a text notation is like using this SVG code:
Code: Select all
<circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" />
instead of
showing a red circle with a black outline.
(emphasis added)
… while I understand Morgoth Bauglir as saying that
the phrase “a red circle with with a black outline” would be the human readable “notation”.
Re: Human readable syntax for a short sequence of moves (<30
Posted: Wed Mar 15, 2017 7:42 am
by skydyr
Frankly, what's wrong with having a 2D representation of the game (a diagram) instead of a 1D one (the list)?
As pointed out, in chess it's necessary to have a 1D representation because the board state overwrites itself frequently, but in go, this is very infrequent, and the cases when it happens can easily be handled out of band. You can have all the descriptive annotation in the world, but it will still be easier for a human to visualize from a diagram of moves than from a list.
Re: Human readable syntax for a short sequence of moves (<30
Posted: Wed Mar 15, 2017 8:53 am
by hyperpape
I think having pass as part of the notation adds complexity but isn't useful. It's quite rare for move sequences to feature passes, outside of endgame problems. I suspect "white pass on move 5" stated outside of the sequence is better.