Skip to content

This repository contains mainly Python tools to be used to run experiments on SAI, Leela Zero, and KataGo

License

Notifications You must be signed in to change notification settings

RosaMGini/ToolsForSAIAndFriends

Repository files navigation

ToolsForSAIAndFriends

This repository contains mainly Python tools to be used to run experiments on SAI, Leela Zero, and KataGo. Earlier versions of these tools have been used to conduct the experiments described in this paper.

GoGameAI

This contains the class GoGameAI which manages games between any pair of nets among SAI, Leela Zero and KataGo. The auxiliaty class GoGameTools is also implemented.

The module comes with a script toolGoAITools containing examples of usage.

toolsKataGoAnalysisEngine

This module contains some tools that facilitate using the JSON-based analysis engine of KataGo:

  • three functions that export an sgf file to
    • a Python list of lists, e.g. [["W","P5"],["B","P6"]]
    • a Python list of strings, e.g. ['["W","P5"]','["B","P6"]']
    • a string, e.g. '["W","P5"],["B","P6"]'
  • a class interfaceKataGoAnalysisEngine that allows opening a session of the engine; then 3 methods allow requesting queries
    • launchQueryAndReturn(), a low-level method that requires indicating a JSON query
    • analyse_listOfLists(), that requires indicating
      • a Python list of lists, e.g. [["W","P5"],["B","P6"]],
      • a turn to be analysed,
      • the rules,
      • the komi, and
      • the point of view
    • analyse_sgf(), that requires indicating
      • a sgf file,
      • a turn to be analysed,
      • the rules,
      • the komi, and
      • the point of view

All methods return a Python dictionary with the same format as the JSON output of the engine.

The module comes with a script test_toolsKataGoAnalysisEngine.py containing examples of usage.

About

This repository contains mainly Python tools to be used to run experiments on SAI, Leela Zero, and KataGo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages