[−][src]Function cppconnect6::cpp_self_play
#[no_mangle]pub extern "C" fn cpp_self_play(
callback: Callback,
cpp_alloc_path: AllocatorType<RawPath>,
cpp_alloc_result: AllocatorType<RawPlayResult>,
num_simulation: i32,
epsilon: f32,
dirichlet_alpha: f64,
c_puct: f32,
debug: bool,
num_game_thread: i32
) -> RawVec<RawPlayResult>
Return Connect6 self-playing results with given cpp callback and hyperparameters
Arguments
callback
- callback for cppbind, void(int player, float* values, float* boards, int length).cpp_alloc_path
- cppbind::RawPath allocator for obtaining memory from cpp ffi.cpp_alloc_result
- cppbind::RawPlayResult allocator for obtaining memory from cpp ffi.num_simulation
- i32, number of simulations for each turn.epsilon
- f32, ratio for applying exploit, exploration. lower epsilon, more exploitdirichlet_alpha
- f64, hyperparameter for dirichlet distributionc_puct
- f32, ratio of q-value and puct, hyperparameter of AlphaZero MCTSdebug
- bool, enable debug mode. if enable, selection and board status will be printednum_game_thread
- i32, number of threads asynchronously self-playing connect6