Class ActionChangeName<TState, TBot, TAction>
A consideration to penalize actions which have a different name than the running action.
Inherited Members
Namespace: Microsoft.XboxStudios.BotBrain.Considerations
Assembly: BotBrain.Core.dll
Syntax
public class ActionChangeName<TState, TBot, TAction> : ConsiderationBase<TState, TBot, TAction>, IConsideration<TState, TBot, TAction>, IConsideration, IEquatable<IConsideration> where TBot : IAutomatedBot<TAction>
Type Parameters
Name | Description |
---|---|
TState | A title-specific state object. |
TBot | A title-specific bot object that implements IAutomatedBot<TAction>. |
TAction | The title-specific bot action that implements IEquatable<T>. |
Remarks
Initializes a new instance of the ActionChangeName<TState, TBot, TAction> class.
Constructors
View SourceActionChangeName(string?, ILogger<UrgeWeight<TState, TBot, TAction>>?)
A consideration to penalize actions which have a different name than the running action.
Declaration
public ActionChangeName(string? name = null, ILogger<UrgeWeight<TState, TBot, TAction>>? logger = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | The consideration name. |
ILogger<UrgeWeight<TState, TBot, TAction>> | logger | The logger. |
Remarks
Initializes a new instance of the ActionChangeName<TState, TBot, TAction> class.
Methods
View SourceEvaluateImpl(TState, TBot, IReadOnlyCollection<IUrge<TState, TBot, TAction>>, in UrgeResult<TState, TBot, TAction>)
Evaluates the consideration given an urge result.
Declaration
protected override ConsiderationResult EvaluateImpl(TState state, TBot bot, IReadOnlyCollection<IUrge<TState, TBot, TAction>> urges, in UrgeResult<TState, TBot, TAction> urgeResult)
Parameters
Type | Name | Description |
---|---|---|
TState | state | The state. |
TBot | bot | The bot. |
IReadOnlyCollection<IUrge<TState, TBot, TAction>> | urges | The urges which were active given this state. |
UrgeResult<TState, TBot, TAction> | urgeResult | The urge result to evaluate. |
Returns
Type | Description |
---|---|
ConsiderationResult | A value and maximum value, representing a score for the urge result. The urgency will be penalized as the value approaches the maximum. |