Open Average-user opened 6 years ago
Technically the current iteration of the canonical-data uses none of the above; it only seems to count the empty points surrounded by a player's stones, but does not count the stones themselves. This does not appear to be a known counting method; perhaps this is incorrect then?
@cmccandless Japanese counting does not count stones themselves
@cmccandless Like this one
Correct; however...
from the link your provided in the description:
Territory scoring (including Japanese and Korean): In the course of the game, each player retains the stones they capture, termed prisoners. Any dead stones removed at the end of the game become prisoners. The score is the number of empty points enclosed by a player's stones, plus the number of prisoners captured by that player.
The canonical data does not have any way of accounting for captured stones. So not quite Japanese either.
@cmccandless But the idea of the exercise is to count the board score, captured stones in real games are returned to the board when the game is finished, and used to fill territory, that way, it decreases the enemy territory. And after that the counting system can be applied
Fair enough. Perhaps we could add a note to the description that Japanese counting methods are used.
But the idea of the exercise is to count the board score,
OK, point taken. My suggestion: Remove the line "Count the scored points on a Go board." from https://github.com/exercism/problem-specifications/blob/master/exercises/go-counting/description.md and https://github.com/exercism/problem-specifications/blob/master/exercises/go-counting/metadata.yml#L2. Replace it with something that simply states we determining who owns each intersection.
The functions being tested in https://github.com/exercism/problem-specifications/blob/master/exercises/go-counting/canonical-data.json don't count score; their only responsibility is to classify (an) intersection(s) as belonging to some player or neither player. As has been correctly pointed out, this is insufficient for determining score since we don't track captures. One possible way to solve this insufficiency is to stop falsely advertising the fact that we are attempting to determine score.
One possible way to solve this insufficiency is to stop falsely advertising the fact that we are attempting to determine score.
Nothing wrong with this in my view.
Just to throw out another solution: modify the canonical data to include border-stones in the territories (Chinese counting). This would adequate for counting board score.
I agree that the description is not entirely correct. @Average-user would you be willing to submit a PR to update the description.md document?
Shouldn't be specified the way of counting stones?
There are many different ways, and not all are always equivalent. Chinese , Japanese and Korean are the ones I've used. Maybe this is not that important but might help.
More information here