online-go / goban

A JavaScript library for exploring and playing the game of Go
Apache License 2.0
47 stars 39 forks source link

Model multiple edits in the same "move" node #152

Open dexonsmith opened 9 months ago

dexonsmith commented 9 months ago

From the forums: https://forums.online-go.com/t/condense-edited-position-in-game-tree/50637

Currently OGS displays edited moves in the same way as regular moves. If you edit in multiple stones, each edited stone will show up as an individual move in the game tree. This makes it so if you make large edits to the board position or set up a problem on the board, it shows up as a long string of individual moves. This then makes it extremely confusing to navigate the game tree. Other programs will often condense all of these edits into a single icon on the game tree which greatly helps with tree navigation.

The GoEngine can't handle multiple edits in the same move node, so the first step is here in https://github.com/online-go/goban. This should be easy to add tests for, by parsing and/or dumping SGFs.

From the forum discussion:

EDIT: the follow-up to expose this in the analysis interface is https://github.com/online-go/online-go.com/issues/2559.

dexonsmith commented 9 months ago

My first impression is that this is not a small project, since (a) the parsers/etc. lack the concept of an edit without a move node and (b) any changes here need to be super-well tested (a mistake could break real games).

I do think this is tractable. I just think it's critical to get the testing right.