Class PrimitiveTactic<TBeliefSet>
Represents a primitive tactic
public class PrimitiveTactic<TBeliefSet> : Tactic<TBeliefSet>, ITactic<TBeliefSet>, ILoggable, IDocumented where TBeliefSet : IBeliefSet
Type Parameters
TBeliefSet
The belief set of the agent.
- Inheritance
-
Tactic<TBeliefSet>PrimitiveTactic<TBeliefSet>
- Implements
-
ITactic<TBeliefSet>
- Inherited Members
Constructors
PrimitiveTactic(IMetadata, IAction<TBeliefSet>)
Initializes a new instance of the PrimitiveTactic<TBeliefSet> class with the specified action and guard.
public PrimitiveTactic(IMetadata metadata, IAction<TBeliefSet> action)
Parameters
metadata
IMetadataMetadata about this tactic, used to quickly display the tactic in several contexts.
action
IAction<TBeliefSet>The action of the primitive tactic.
PrimitiveTactic(IMetadata, IAction<TBeliefSet>, Predicate<TBeliefSet>)
Initializes a new instance of the PrimitiveTactic<TBeliefSet> class with the specified action and guard.
public PrimitiveTactic(IMetadata metadata, IAction<TBeliefSet> action, Predicate<TBeliefSet> guard)
Parameters
metadata
IMetadataMetadata about this tactic, used to quickly display the tactic in several contexts.
action
IAction<TBeliefSet>The action of the primitive tactic.
guard
Predicate<TBeliefSet>The guard of the primitive tactic.
PrimitiveTactic(IMetadata, IQueryable<TBeliefSet>)
Initializes a new instance of the PrimitiveTactic<TBeliefSet> class with the specified action and guard.
public PrimitiveTactic(IMetadata metadata, IQueryable<TBeliefSet> queryAction)
Parameters
metadata
IMetadataMetadata about this tactic, used to quickly display the tactic in several contexts.
queryAction
IQueryable<TBeliefSet>The queryable action of the primitive tactic.
PrimitiveTactic(IMetadata, IQueryable<TBeliefSet>, Predicate<TBeliefSet>)
Initializes a new instance of the PrimitiveTactic<TBeliefSet> class with the specified action and guard.
public PrimitiveTactic(IMetadata metadata, IQueryable<TBeliefSet> queryAction, Predicate<TBeliefSet> guard)
Parameters
metadata
IMetadataMetadata about this tactic, used to quickly display the tactic in several contexts.
queryAction
IQueryable<TBeliefSet>The queryable action of the primitive tactic.
guard
Predicate<TBeliefSet>The guard of the primitive tactic.
PrimitiveTactic(IAction<TBeliefSet>)
Initializes a new instance of the PrimitiveTactic<TBeliefSet> class with the specified action and guard.
public PrimitiveTactic(IAction<TBeliefSet> action)
Parameters
action
IAction<TBeliefSet>The action of the primitive tactic.
PrimitiveTactic(IAction<TBeliefSet>, Predicate<TBeliefSet>)
Initializes a new instance of the PrimitiveTactic<TBeliefSet> class with the specified action and guard.
public PrimitiveTactic(IAction<TBeliefSet> action, Predicate<TBeliefSet> guard)
Parameters
action
IAction<TBeliefSet>The action of the primitive tactic.
guard
Predicate<TBeliefSet>The guard of the primitive tactic.
PrimitiveTactic(IQueryable<TBeliefSet>)
Initializes a new instance of the PrimitiveTactic<TBeliefSet> class with the specified action and guard.
public PrimitiveTactic(IQueryable<TBeliefSet> queryAction)
Parameters
queryAction
IQueryable<TBeliefSet>The queryable action of the primitive tactic.
PrimitiveTactic(IQueryable<TBeliefSet>, Predicate<TBeliefSet>)
Initializes a new instance of the PrimitiveTactic<TBeliefSet> class with the specified action and guard.
public PrimitiveTactic(IQueryable<TBeliefSet> queryAction, Predicate<TBeliefSet> guard)
Parameters
queryAction
IQueryable<TBeliefSet>The queryable action of the primitive tactic.
guard
Predicate<TBeliefSet>The guard of the primitive tactic.
Fields
_action
Gets the action of the primitive tactic.
protected readonly IAction<TBeliefSet> _action
Field Value
- IAction<TBeliefSet>
Methods
GetAction(TBeliefSet)
Gets the first enabled action of the tactic.
public override IAction<TBeliefSet>? GetAction(TBeliefSet beliefSet)
Parameters
beliefSet
TBeliefSet
Returns
- IAction<TBeliefSet>
A concrete IAction<TBeliefSet> that the tactic can perform, or null if no actions are enabled.
GetLogChildren()
Gets the children of the loggable object.
public override IEnumerable<ILoggable> GetLogChildren()
Returns
- IEnumerable<ILoggable>
The children of the loggable object.