pub trait Heuristic: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn estimate(&self, task: &Task, state: &State) -> HValue;
// Provided method
fn preferred_ops(&self, _task: &Task, _state: &State) -> &[OpId] { ... }
}Expand description
A heuristic function for estimating the cost to reach the goal.
Implementors must be Send + Sync for use in multi-threaded contexts.
Required Methods§
Provided Methods§
Sourcefn preferred_ops(&self, _task: &Task, _state: &State) -> &[OpId]
fn preferred_ops(&self, _task: &Task, _state: &State) -> &[OpId]
Return preferred operators for the current state (used by some planners). The default implementation returns an empty slice.