Skip to content

Add kata-get-nn-rows: NN rows each model has evaluated - #42

Closed
ChinChangYang wants to merge 1 commit into
masterfrom
nn-rows-counter
Closed

ChinChangYang wants to merge 1 commit into
masterfrom
nn-rows-counter

Conversation

@ChinChangYang

Copy link
Copy Markdown
Owner

A controller that wants to know what a move cost the neural net — how many positions the main model and the human SL model actually ran, not how many visits the search made — has no way to ask: the evaluators count their rows (numRowsProcessed, which a cache hit never reaches), but nothing reports the count, and genmove resets it.

kata-get-nn-rows returns {"main": N, "human": M}, the rows each model has run since the engine started. The counts only grow: what an evaluator has run is folded into a per-engine total before genmove clears its statistics and before boardsize rebuilds it, so the difference between two calls is the work done in between — around a genmove, a kata-analyze (which the call itself stops first, as any command does) or anything else.

= {"human":0,"main":0}      # start
genmove b                    # preaz_5k, 40 visits
= {"human":4,"main":44}
genmove w
= {"human":6,"main":67}      # 23 more: the tree and the cache from the first genmove

One file (cpp/command/gtp.cpp, +27) and its entry in docs/GTP_Extensions.md. Checked with the MLX build of AuroraGo's corpus engine, where the same hunks are applied; AuroraGo vendors them into its Engine/ as for #32.

🤖 Generated with Claude Code

A controller that wants to know what a move cost the neural net -- how
many positions the main model and the human SL model actually ran,
not how many visits the search made -- has no way to ask: the
evaluators count their rows (numRowsProcessed, which a cache hit never
reaches), but nothing reports the count, and genmove resets it.

kata-get-nn-rows returns {"main": N, "human": M}, the rows each model
has run since the engine started. The counts only grow: what an
evaluator has run is folded into a per-engine total before genmove
clears its statistics and before boardsize rebuilds it, so the
difference between two calls is the work done in between, around a
genmove, a kata-analyze (which the call itself stops first) or
anything else.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ChinChangYang

Copy link
Copy Markdown
Owner Author

Closed without merging: this fork's master is kept as an upstream mirror (ruleset "master: upstream sync only"). The change lives on in branch nn-rows-counter, which AuroraGo's Engine/VENDORED.md points to; AuroraGo's Engine/ and its corpus engine carry the same hunks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant