pub struct UtilityAiBrain { /* private fields */ }Expand description
Multi-consideration Utility AI selector with response curves and hysteresis anti-oscillation.
Implementations§
Source§impl UtilityAiBrain
Multi-consideration scoring and hysteresis action selection for UtilityAiBrain.
impl UtilityAiBrain
Multi-consideration scoring and hysteresis action selection for UtilityAiBrain.
Sourcepub fn add_action(&mut self, action: UtilityActionDef)
pub fn add_action(&mut self, action: UtilityActionDef)
Registers a candidate UtilityActionDef.
§Arguments
UtilityActionDef- Action definition with base weight and response-curve considerations.
Sourcepub fn active_action(&self) -> Option<u32>
pub fn active_action(&self) -> Option<u32>
Returns the currently selected action identifier, if any.
§Returns
Option<u32>- Active action identifier.
Source§impl UtilityAiBrain
Implements impl #impl_generics #name #ty_generics #where_clause.
impl UtilityAiBrain
Implements impl #impl_generics #name #ty_generics #where_clause.
pub fn get_actions(&self) -> &Vec<UtilityActionDef>
pub fn get_mut_actions(&mut self) -> &mut Vec<UtilityActionDef>
pub fn set_actions(&mut self, val: Vec<UtilityActionDef>) -> &mut Self
pub fn get_inertia_bonus(&self) -> f32
pub fn get_mut_inertia_bonus(&mut self) -> &mut f32
pub fn set_inertia_bonus(&mut self, val: f32) -> &mut Self
pub fn get_min_dwell_time(&self) -> f32
pub fn get_mut_min_dwell_time(&mut self) -> &mut f32
pub fn set_min_dwell_time(&mut self, val: f32) -> &mut Self
pub fn get_current_action(&self) -> u32
pub fn get_mut_current_action(&mut self) -> &mut u32
pub fn set_current_action(&mut self, val: u32) -> &mut Self
pub fn get_has_active(&self) -> bool
pub fn get_mut_has_active(&mut self) -> &mut bool
pub fn set_has_active(&mut self, val: bool) -> &mut Self
pub fn get_dwell_elapsed(&self) -> f32
pub fn get_mut_dwell_elapsed(&mut self) -> &mut f32
pub fn set_dwell_elapsed(&mut self, val: f32) -> &mut Self
pub fn get_last_scores(&self) -> &Vec<(u32, f32)>
pub fn get_mut_last_scores(&mut self) -> &mut Vec<(u32, f32)>
pub fn set_last_scores(&mut self, val: Vec<(u32, f32)>) -> &mut Self
Trait Implementations§
Source§impl Clone for UtilityAiBrain
impl Clone for UtilityAiBrain
Auto Trait Implementations§
impl Forget for UtilityAiBrain
impl Freeze for UtilityAiBrainwhere
*const u8 is !null: Freeze,
PhantomData<UtilityActionDef>: Freeze,
PhantomData<(u32, f32)>: Freeze,
impl Move for UtilityAiBrain
impl RefUnwindSafe for UtilityAiBrain
impl Send for UtilityAiBrainwhere
RawVecInner: Send,
impl Sync for UtilityAiBrainwhere
RawVecInner: Sync,
impl Unpin for UtilityAiBrain
impl UnsafeUnpin for UtilityAiBrainwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<UtilityActionDef>: UnsafeUnpin,
PhantomData<(u32, f32)>: UnsafeUnpin,
impl UnwindSafe for UtilityAiBrainwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more