pleco-rs / Pleco

A Rust-based re-write of the Stockfish Chess Engine
https://crates.io/crates/pleco
GNU General Public License v3.0
358 stars 38 forks source link

How to generate the best possible moves from a given board? #155

Closed ObvMamut closed 11 months ago

ObvMamut commented 11 months ago

Hi, Im trying to learn Pleco-Rs and i dont know how to generate the best possible move. For example instead of this : let moves = board.generate_moves(); // generate all possible legal moves board.apply_move(moves[0]); assert_eq!(board.moves_played(), 1);

to have this let moves = board.generate_generate_best_moves(); // generate all the best legal moves board.apply_move(moves[0]); assert_eq!(board.moves_played(), 1);