Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standalone script/binary to generate mcts search log json files #160

Open
shindavid opened this issue Feb 5, 2025 · 0 comments
Open

Standalone script/binary to generate mcts search log json files #160

shindavid opened this issue Feb 5, 2025 · 0 comments

Comments

@shindavid
Copy link
Owner

We currently have a script, courtesy of @lichensongs, to visualize the MCTS search process in a web-browser. The script works by loading a JSON search log, which can be generated by configuring an mcts::Manager appropriately.

Currently, the only spot where we do such a configuration is in cpp/src/mcts/main/UnitTests.cpp (here). The context is for testing against a golden file for unit-testing purposes, using a mock neural-network evaluation service.

It would be generally useful to expose a way to generate such a search log outside of this context. Perhaps something like:

./py/dump_mcts_search_log.py --game <game> --model <model_file> --actions 1,3,3

This would create a blank game, apply the given actions, and then do an MCTS search on the resultant state using the passed-in model. See the test_search() function in cpp/src/mcts/main/UnitTests.cpp.

Notes:

  • We probably want a new c++ binary for this purpose. If we match the existing structure of our cmake files, this would mean making repetitive boilerplate changes in each cpp/src/games/*/CMakeLists.txt.
  • The current visualizer script (py/mcts_viz/web_viz.py) assumes that the json log file you want to visualize lives in sample_search_logs/mcts_tests/. This assumption becomes inappropriate once we add a tool like the above.
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

No branches or pull requests

1 participant