Show / Hide Table of Contents

Class SimpleUrge

A basic test urge.

Inheritance
object
UrgeBase<TestGameState, TestAutomatedBot, TestAction>
SimpleUrge
Implements
IUrge<TestGameState, TestAutomatedBot, TestAction>
IUrge
IEquatable<IUrge>
IMetadataAccess
Inherited Members
UrgeBase<TestGameState, TestAutomatedBot, TestAction>.NoUrgeName
UrgeBase<TestGameState, TestAutomatedBot, TestAction>.Logger
UrgeBase<TestGameState, TestAutomatedBot, TestAction>.Name
UrgeBase<TestGameState, TestAutomatedBot, TestAction>.Type
UrgeBase<TestGameState, TestAutomatedBot, TestAction>.IsExclusive
UrgeBase<TestGameState, TestAutomatedBot, TestAction>.ToString()
UrgeBase<TestGameState, TestAutomatedBot, TestAction>.Equals(IUrge)
UrgeBase<TestGameState, TestAutomatedBot, TestAction>.Equals(object)
UrgeBase<TestGameState, TestAutomatedBot, TestAction>.GetHashCode()
UrgeBase<TestGameState, TestAutomatedBot, TestAction>.Run(TestGameState, TestAutomatedBot)
UrgeBase<TestGameState, TestAutomatedBot, TestAction>.GetParameter<T>(TestAutomatedBot, string)
UrgeBase<TestGameState, TestAutomatedBot, TestAction>.GetParameter<T>(TestAutomatedBot, IEnumerable<string>)
UrgeBase<TestGameState, TestAutomatedBot, TestAction>.TryGetParameter<T>(TestAutomatedBot, IEnumerable<string>, out T)
UrgeBase<TestGameState, TestAutomatedBot, TestAction>.TryGetParameter<T>(TestAutomatedBot, string, out T)
UrgeBase<TestGameState, TestAutomatedBot, TestAction>.GetParameterNames(string)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Microsoft.XboxStudios.BotBrain.Samples.ClassBased.Urges
Assembly: BotBrain.Samples.dll
Syntax
public class SimpleUrge : UrgeBase<TestGameState, TestAutomatedBot, TestAction>, IUrge<TestGameState, TestAutomatedBot, TestAction>, IUrge, IEquatable<IUrge?>, IMetadataAccess

Constructors

View Source

SimpleUrge()

Initializes a new instance of the SimpleUrge class.

Declaration
public SimpleUrge()

Properties

View Source

ActionType

Gets or sets the recommended action type.

Declaration
[JsonProperty]
[JsonConverter(typeof(StringEnumConverter))]
public TestBotActionType ActionType { get; set; }
Property Value
Type Description
TestBotActionType
View Source

ParameterNames

Gets an enumeration of parameter names.

Declaration
public IEnumerable<string> ParameterNames { get; }
Property Value
Type Description
IEnumerable<string>

Methods

View Source

Equals(IUrge?)

Determines whether the specified urge is equal to this one.

Declaration
public override bool Equals(IUrge? other)
Parameters
Type Name Description
IUrge other

The urge to compare to.

Returns
Type Description
bool

True if the urges are equal.

Overrides
Microsoft.XboxStudios.BotBrain.UrgeBase<Microsoft.XboxStudios.BotBrain.Samples.ClassBased.TestGameState, Microsoft.XboxStudios.BotBrain.Samples.ClassBased.TestAutomatedBot, Microsoft.XboxStudios.BotBrain.Samples.ClassBased.TestAction>.Equals(Microsoft.XboxStudios.BotBrain.IUrge)
View Source

GetParameterMetadata(string)

Gets the metadata for a parameter.

Declaration
public ParameterMetadata? GetParameterMetadata(string parameterName)
Parameters
Type Name Description
string parameterName

The parameter name.

Returns
Type Description
ParameterMetadata

The metadata, if it exists.

View Source

Run(TestGameState, TestAutomatedBot)

Chooses an action and urgency of that action for the given bot and state.

Declaration
public override Task<IEnumerable<IRecommendedAction<TestAction>>> Run(TestGameState state, TestAutomatedBot bot)
Parameters
Type Name Description
TestGameState state

The game state.

TestAutomatedBot bot

The bot to control.

Returns
Type Description
Task<IEnumerable<IRecommendedAction<TestAction>>>

An enumerable of weighted bot actions.

Overrides
UrgeBase<TestGameState, TestAutomatedBot, TestAction>.Run(TestGameState, TestAutomatedBot)

Implements

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