Skip to main content

Evaluate

Trait Evaluate 

Source
pub trait Evaluate<R: Sides> {
    // Required method
    fn score(&self, start: &R, end: &R, side: R::Side) -> i32;
}
Expand description

How good a state is for a side: higher is better, in whole points.

Required Methods§

Source

fn score(&self, start: &R, end: &R, side: R::Side) -> i32

How good end is for side, reached from start (the state the decision began in). A score that only needs the end ignores start; one that counts what was lost on the way compares the two. A finished game scores its outcome.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<R, F, const N: usize> Evaluate<R> for Weighted<F, N>
where R: Sides, F: Fn(&R, &R, R::Side) -> [i64; N],

Source§

impl<R: Sides, F: Fn(&R, &R, R::Side) -> i32> Evaluate<R> for F