How to estimate a Bitmove with pleco::bots
xxxxxion opened this issue · comments
Hello, i am trying to teach neural-network : input as board + bitmove and output as score.
So, i know that pleco provides this function https://docs.rs/pleco/latest/pleco/bots/minimax/fn.minimax.html for example. It returns best BitMove and Score for it.
And my question : Is there any method in pleco like
fn minimax_score_move(b: &Board, m: &BitMove) -> i16
that will return score for provided bitmove ?
I think you can use pleco_engine::search::eval::Evaluation::evaluate
for this.
There's some example code here for it 😄
https://github.com/pleco-rs/Pleco/blob/main/pleco_engine/benches/eval_benches.rs#L72
Although this is benchmarking code, so a bit messy, but you'll get the idea!
@chase-manning
hmm, I cant fully understand how to correctly evaluate the bitmove with this function. It takes a board as input and two more parameters. But it simply evaluates the material + the hash table of pawn placement. This function does not have a search depth parameter for the best move as minimax or alpha_beta searchers do.
If such a function does not exist, I will write it by myself. Just wanted to know if there is an easier way for me.
Also, the function you suggested is similar to
let score = board.psq();
@xxxxxion Oh yes you're right sorry, I don't think this is what you're after. Also, I can't seem to find a function for this. Feel free to open a PR to add one though 😄