Show / Hide Table of Contents

Class ActionChangeName<TState, TBot, TAction>

A consideration to penalize actions which have a different name than the running action.

Inheritance
object
ConsiderationBase
ConsiderationBase<TState, TBot, TAction>
ActionChangeName<TState, TBot, TAction>
Implements
IConsideration<TState, TBot, TAction>
IConsideration
IEquatable<IConsideration>
Inherited Members
ConsiderationBase<TState, TBot, TAction>.Brain
ConsiderationBase<TState, TBot, TAction>.Evaluate(TState, TBot, IReadOnlyCollection<IUrge<TState, TBot, TAction>>, in UrgeResult<TState, TBot, TAction>, out ConsiderationResult)
ConsiderationBase<TState, TBot, TAction>.EvaluateImpl(TState, TBot, IReadOnlyCollection<IUrge<TState, TBot, TAction>>, in UrgeResult<TState, TBot, TAction>)
ConsiderationBase<TState, TBot, TAction>.GetParameterNames(string, TState, IUrge<TState, TBot, TAction>)
ConsiderationBase<TState, TBot, TAction>.GetSignificance(TState, TBot, in UrgeResult<TState, TBot, TAction>, out double)
ConsiderationBase<TState, TBot, TAction>.GetCurve(TState, TBot, UrgeResult<TState, TBot, TAction>, out Curve)
ConsiderationBase.Name
ConsiderationBase.Type
ConsiderationBase.Brain
ConsiderationBase.Logger
ConsiderationBase.ToString()
ConsiderationBase.GetHashCode()
ConsiderationBase.Equals(object)
ConsiderationBase.Equals(IConsideration)
ConsiderationBase.GetCurve(IHasParameters, Func<string, IEnumerable<string>>, out Curve)
ConsiderationBase.GetCurve(IParameterManager, Func<string, IEnumerable<string>>, out Curve)
ConsiderationBase.GetSignificance(IHasParameters, Func<string, IEnumerable<string>>, out double)
ConsiderationBase.GetSignificance(IParameterManager, Func<string, IEnumerable<string>>, out double)
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
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 Source

ActionChangeName(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 Source

EvaluateImpl(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.

Overrides
ConsiderationBase<TState, TBot, TAction>.EvaluateImpl(TState, TBot, IReadOnlyCollection<IUrge<TState, TBot, TAction>>, in UrgeResult<TState, TBot, TAction>)

Implements

IConsideration<TState, TBot, TAction>
IConsideration
IEquatable<T>
  • View Source
In this article
Back to top Generated by DocFX