Class OvermindUrgeBase
Base class for overmind urges.
Inheritance
OvermindUrgeBase
Inherited Members
Namespace: Microsoft.XboxStudios.BotBrain.Overmind
Assembly: BotBrain.Overmind.dll
Syntax
public abstract class OvermindUrgeBase : UrgeBase<OvermindState, OvermindBot, OvermindAction>, IUrge<OvermindState, OvermindBot, OvermindAction>, IUrge, IEquatable<IUrge?>
Remarks
Initializes a new instance of the OvermindUrgeBase class.
Constructors
View SourceOvermindUrgeBase(string?, ILogger<OvermindUrgeBase>?)
Base class for overmind urges.
Declaration
protected OvermindUrgeBase(string? name = null, ILogger<OvermindUrgeBase>? logger = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | The urge name. |
ILogger<OvermindUrgeBase> | logger | The logger to use. |
Remarks
Initializes a new instance of the OvermindUrgeBase class.
Methods
View SourceRun(OvermindState, OvermindBot)
Chooses an action and urgency of that action for the given bot and state.
Declaration
public override Task<IEnumerable<IRecommendedAction<OvermindAction>>> Run(OvermindState state, OvermindBot bot)
Parameters
Type | Name | Description |
---|---|---|
OvermindState | state | The game state. |
OvermindBot | bot | The bot to control. |
Returns
Type | Description |
---|---|
Task<IEnumerable<IRecommendedAction<OvermindAction>>> | An enumerable of weighted bot actions. |
Overrides
View SourceRunSync(OvermindState, OvermindBot)
Runs the urge synchronously.
Declaration
protected virtual IEnumerable<IRecommendedAction<OvermindAction>> RunSync(OvermindState state, OvermindBot bot)
Parameters
Type | Name | Description |
---|---|---|
OvermindState | state | The game state. |
OvermindBot | bot | The bot to control. |
Returns
Type | Description |
---|---|
IEnumerable<IRecommendedAction<OvermindAction>> | An enumerable of weighted bot actions. |