How to use ogs score estimator in my program

Recently I have completed a sgf viewer that shows a board and stone moves. And I would like to have a score estimator in it so that it can tell the scores of black and white and which stones are dead. I am wondering if I can use the OGS score estimator in my program (in c++ or javascript). If yes, how do I take the score estimator? Can anyone tell me details?

You can find the score estimator here: https://github.com/online-go/score-estimator

Thanks.

My question is:

  1. How do you compile the OGS score estimator in Window (msvc2017)? I tried to compile with msvc2017 by renaming main.cc by main.cpp, but I got some link errors.
  2. It sounds that those c++ codes can be translated into javascript codes. How do you do this?
1 Like

Did you read the emscripten docs? That’s the tool they’re using to transpile this into JS.

Yes, I am reading emscripten and reaching emcc test\hello_world.c and seeing “hello, world” in node a.out.js.

What could be next to transfile ogs score estimation project c codes to js? Do I need to read more or OGS people could help?