[−][src]Crate pyconnect6
Python binding of libconnect6
You can install pyconnect6
with setup.py
and join the AlphaZero self-playing agent
just passing the callable python object with method __call__(self, turn, board): (value, prob)
.
Examples
import pyconnect6
import numpy as np
board_size = 15
param = pyconnect6.default_param()
param['num_simulation'] = 10
param['debug'] = True
policy = lambda turn, board: (np.random.rand(len(board)), np.random.rand(len(board), board_size ** 2))
play_result = pyconnect6.self_play(policy, param)
win, path = play_result
print(win)
Modules
macro_def | Macro definition |
pybind | Rust bindings for python interface and impl of AlphaZero policy evaluator |
Macros
must | Panic with given error string if given Result is Err |
py_policy | Create random python policy for testing AlphaZero |
Functions
PyInit_pyconnect6⚠ |