Re: [Computer-go] SGF

2016-12-30 Thread Dave Dyer

Character encoding (usually UTF8 these days) ought not to be part of 
the standard, it ought to be up to the containing file to describe the 
encoding at that level.Likewise, nothing in the standard ought to
require support for particular character sets. Rather, if a sgf record
contains an unsupported character set, it will fail at the "reading"
phase, independent of the actual contents of the file.

I've used sgf as a general format for more than 70 different games,
as well as Go, and I only treat it as a rough guide.  I use a generic
read/write process that doesn't care about the content, and any sensible
user of the "standard" ought to do likewise.

The details of what properties exist and how they are used is always
going to be a negotiation between content originators and third party
consumers.

___
Computer-go mailing list
Computer-go@computer-go.org
http://computer-go.org/mailman/listinfo/computer-go

Re: [Computer-go] SGF

2016-12-30 Thread Anders Kierulf
Thanks for documenting current usage, Andries. It helps to know which 
properties are being used and how. However, your focus on games gives a skewed 
picture of many properties that are crucial to SGF. Also, replacing 
prescriptions with recommendations is not the right direction: If we’re trying 
to make SGF more useful, and make it easier to write SGF parsers and apps 
dealing with SGF, we should be giving stronger recommendations, not relaxing 
the requirements for some of the properties.

> FF[4] has default character set Latin-1, while the great majority
> of non-ASCII SGF files today are in some multibyte character set.
> The default should now be UTF-8.

Definitely. Using UTF-8 consistently would avoid a lot of issues. SGF parsers 
still need to deal with other encodings, but should be encouraged to always 
write UTF-8.

> The result is found at
> http://www.cwi.nl/~aeb/go/misc/sgf.html 
>  .

Some properties are crucial to describe Go games and problems in a standardized 
way, the main idea behind SGF. In particular:
- Moves: BM (Bad Move), DO (Doubtful move), IT (Interesting move), TE (Tesuji)
- Positions: GB (Good for Black), GW (Good for White), DM (Even Position), UC 
(Unclear position)
These may not be used much, but when they are, they have specific meaning, and 
they need to remain a strong part of SGF going forward.

There are a number of markup and display properties in SGF, so your comment 
about SGF not being about displaying games is misguided. SGF is used by many to 
create diagrams for Go books; FG (Figure), AR (Arrow), and LN (Line) don’t 
belong among obsolete properties.

Properties for Go problems also need more standardization, not be thrown in the 
obsolete bucket.

Some other properties are used mostly by SmartGo. For example. CH (Checkmark) 
and HO (Hotspot) are general ways for the user to mark positions of interest, 
and SmartGo provides tools to search for such position, or e.g. export diagrams 
of all positions marked in a certain way. These properties are actively used, 
not obsolete.

It would be good if your document would clearly state which properties are part 
of the FF[4] standard and which ones you’re adding. For example, JD (Japanese 
Date) is not in FF[4], yet is listed as “standardized in this document”. It’s 
possible that such a property should be added, but any properties added to 
FF[4] need to be clearly marked so they can discussed.

> In a few cases I do not know the meaning of some labels - information is 
> welcome.

BS (Black Species) and WS (White Species) are valuable to distinguish computer 
players from human players (0 = human, > 0 for computers). These root 
properties are part of FF[3] and are still actively used in both SmartGo and 
SmartOthello (https://smartothello.com ).

E was supposed to be used to indicate which stones were captured by a move, and 
should be part of that same node, but that was not a good idea. Use of that 
property should be discouraged (and it’s rightly not part of FF[4]).

PB, PW: For Pair Go games, ranks should be part of BR, WR, also separated by 
"&". The alternate markup style you mention should be discouraged. This is an 
example where the SGF standard should provide more guidance, not provide 
multiple alternate ways of expressing the same thing.

While we’re talking about SGF: The mistake of using a different coordinate 
system can’t be undone, but I’d like to encourage all programmers of SGF 
parsers to allow reading of standard coordinates (A1…T19).

Anders Kierulf


___
Computer-go mailing list
Computer-go@computer-go.org
http://computer-go.org/mailman/listinfo/computer-go

[Computer-go] 9x9 boardsize error on KGS - anybody else seen this?

2016-12-30 Thread Alexandra Patz
Hi,

Hi there,

I have developed a neural network based 9x9 bot which I am trying to run on KGS 
using the java kgsGtp gateway (version 3.5.20). The bot is called NubbyBot.

When playing 9x9 games everything works fine. But occasionally the system will 
attempt to setup a 19x19 game with the bot. The bot sends back a GTP error 
(i.e. a question mark) as specified in the documentation. But instead of moving 
on to another game the java gateway shuts down. Sometimes the system considers 
the game to be open and I just have to wait for it to time out. 

I have set my configuration file in every way I could see from the 
documentation to only allow 9x9 games.

name=NubbyBot
password=x
room=Computer Go
mode=both
automatch.rank=20k
reconnect=true
rules=japanese
rules.boardSize=9
rules.time=0
verbose=t
gameNotes=Neural net bot about 15 kyu.
engine=python -u /Users/nubby/Desktop/kgsGtp/playKGS.py

I haven’t been able to reproduce the problem myself. When I log in as a human 
to the client and try to play a game with my robot the client correctly 
restricts the board size choice to 9x9 by greying out the options. So I’m not 
sure how people are initiating these 19x19 games with my bot. 

I have also attempted sending back alternatives to just a question mark as an 
error. I tried “? error” and “? unacceptable size” (which is the error message 
GnuGo sends back when you send it a weird boardsize).

Am I missing something? Or is there a different error message to send or way to 
stop people soliciting my bot for 19x19 games? Is there anyone on the list who 
is successfully running a 9x9 bot on KGS without experiencing this problem? 

Thank you,
Alexandra





> On Oct 10, 2016, at 9:45 AM, KGS Support Email  wrote:
> 
> Hello
> you can download it here: http://files.gokgs.com/javaBin/kgsGtp-3.5.20.tar.gz
> 
> Regards
> 
> bolbi
> 
> On Sun, Oct 9, 2016 at 9:18 PM, Alexandra Patz  wrote:
> Hi there,
> 
> Your links to the kgsGTP downloads generate a 404 not found error.
> 
> http://files.gokgs.com/javaBin/kgsGtp-3.5.21.tar.gz
> 
> Where can I find them?
> 
> Thank you,
> Alexandra
___
Computer-go mailing list
Computer-go@computer-go.org
http://computer-go.org/mailman/listinfo/computer-go

[Computer-go] SGF

2016-12-30 Thread Andries E. Brouwer
The SGF format is wildly successful. It is virtually the unique format
in the West, and one of the major formats in the East.
However, there is no precise definition of the format.
In particular, FF[4] is not precise and where it is precise
it is too strict to follow.

One troublesome area is that of character sets and escaping.
When and where should one use escapes in a text field?
(My answer: escape \ and ] with \, never escape constituent bytes of a
multibyte character, escaping : is never needed.)
For software it would be much easier to always escape at the byte level,
instead of the character level, but files with byte-level escapes
are no longer text files, and are invariably corrupted when handled
as text files.

FF[4] has default character set Latin-1, while the great majority
of non-ASCII SGF files today are in some multibyte character set.
The default should now be UTF-8.

FF[4] has a list of property labels and a description of the allowed
values and their meaning. Current usage needs a greater variety of
property labels and values.

I looked at the present state of affairs, collected a large number
of SGF files from many different sources, and described their grammar
and use of property labels. The result is found at
http://www.cwi.nl/~aeb/go/misc/sgf.html .
In a few cases I do not know the meaning of some labels - information
is welcome.

The purpose of this exercise is to come, not to a new standard like FF[5],
but to a present-day version of FF[4]. In several cases I described
on the one hand what one meets in the wild, and on the other hand
a stricter set of values that one would hope people to standardize on.
Comments are welcome.

Andries


On SGF: http://www.cwi.nl/~aeb/go/misc/sgf.html
sgfutils: http://www.cwi.nl/~aeb/go/sgfutils/html
4 pro games: http://www.cwi.nl/~aeb/go/games/games/index.html
rank progression of Japanese pros: 
http://www.cwi.nl/~aeb/go/misc/progression.html
___
Computer-go mailing list
Computer-go@computer-go.org
http://computer-go.org/mailman/listinfo/computer-go