Comments (4)
It sounds like what you're asking for is to score a game that is incomplete. There isn't a standard way to do that, so there aren't any methods offered to do it. For example if the borders of territories are not yet completed then an area that any human player would normally consider to be "owned" will technically not be owned or count as any territory because it isn't fully surrounded. Is that what you want? And under strict computer rules, if a group is "dead" but still has not been fully captured may be treated as alive in the current board state. The fact that it is dead depends on the fact that we are predicting the future board state where we are predicting that it will be removed, not the current board state where it is still on the board.
If you really are okay with these kinds of things - treating all groups as alive, and not counting territory with incomplete borders, then you can write your own method that does a recursive floodfill. Example pseudo code:
already_scored = [[false for x in range(board_x_size)] for y in range(board_y_size)]
def score(x: int, y: int, player: Player):
if already_scored[y][x]:
return
mark_this_point_as_owned_by(player,x,y)
already_scored[y][x] = True
for adjacent_x, adjacent_y in [(x-1,y),(x+1,y),(x,y-1),(x,y+1)]:
if is_within_bounds(adjacent_x, adjacent_y):
score(adjacent_x, adjacent_y, player)
for y in range(board_y_size):
for x in range(board_x_size):
if is_black_stone(x,y):
score(x,y,BLACK)
elif is_white_stone(x,y):
score(x,y,WHITE)
If you are interested in a "smarter" method still tries to predict the future outcome of dead stones and incomplete borders that depends on predicting future moves, yet somehow understands that it should not predict "specific" additional tactics things that the player to move can do, this is not really well defined and at best there are only different heuristics one can try. See https://forums.online-go.com/t/testing-autoscore-algorithms/47511/51 for some research on this.
from katago.
@lightvector Thanks for your reply. Well, sometimes the players (for example, many children) are not not skilled enough. When they choose to end the game, there may be still some unsettled stones in the board. In that case, if I can get the ownership of the current board state, then I can use it to compute the size of the territory of both white and black. If black_size > white_size + komi, then the winner is black,otherwise the winner should be white. So the key is that how to get the ownership of the current board state. However, the ownership produced by katago's analyse sub-command looks like the result that AI has make a next move. As shown in the following image (the last move is made by black), when I call the analyse sub-command, katago will make a next move at S8 for the white player, and the area within the red box will be marked as the territory of white according to katago's ownership result. However, since the game is end, nobody should have a next move.
from katago.
Cool, so it sounds like you want a "smart" method. So then, please take a look at the link I gave above. In case you missed it: https://forums.online-go.com/t/testing-autoscore-algorithms/47511/51
You will have to write a bit of code that queries KataGo more than once, with each side to move and does some basic floodfilling based on dame and other simple rules in order to implement the experimental "v3" algorithm that is described, that someone came up with, or any other experimental algorithms that you like. These are all experimental methods, there is no single "correct" way to do this, but you can try things.
from katago.
Obviously, if you have questions, feel free to post in that OGS forum thread. I'm not the one that has been doing this research and experimentation on how to heuristically score "incomplete" games in a way that is still sensible, but I'm sure the people who are would be happy to answer questions to someone who is interested.
from katago.
Related Issues (20)
- Train a weight‘s weight, to predict the value of the next Katago weight HOT 3
- How to use Katago 1.14.1 with time cache? HOT 1
- Issue in training: low visit counts and strange initial conditions(board dimensions, komi settings, piece position) HOT 2
- kata-genmove_analyze with KEYVALUEPAIR not working HOT 1
- A problem building for CUDA HOT 2
- Why does lc0 ship cuda dlls with engine but katago doesn't?
- Minor document questions
- Error checks for kata-raw-human-nn HOT 1
- How to set rules to "twisted cross and eating" for beginner HOT 2
- Throwback HOT 3
- Lack of ability HOT 3
- Katago cannot give a definitive answer for the best move. HOT 2
- Report an error HOT 3
- allowResignation affects humanSL strength?? HOT 4
- Loose ladder
- katago 1.15.1 build failure HOT 1
- Do you have a plan to create a GUI? HOT 4
- kata-analyze reports a non-human-like move for the preaz_20k human profile HOT 1
- Evaluate the value of moves HOT 2
- KataGo works with old libssl versions only HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from katago.