Show / Hide Table of Contents

Class AssignBrain

The overmind urge responsible for assigning brains.

Inheritance
object
UrgeBase<OvermindState, OvermindBot, OvermindAction>
OvermindUrgeBase
AssignBrain
Implements
IUrge<OvermindState, OvermindBot, OvermindAction>
IUrge
IEquatable<IUrge>
Inherited Members
OvermindUrgeBase.Run(OvermindState, OvermindBot)
UrgeBase<OvermindState, OvermindBot, OvermindAction>.NoUrgeName
UrgeBase<OvermindState, OvermindBot, OvermindAction>.Logger
UrgeBase<OvermindState, OvermindBot, OvermindAction>.Name
UrgeBase<OvermindState, OvermindBot, OvermindAction>.Type
UrgeBase<OvermindState, OvermindBot, OvermindAction>.IsExclusive
UrgeBase<OvermindState, OvermindBot, OvermindAction>.ToString()
UrgeBase<OvermindState, OvermindBot, OvermindAction>.Equals(IUrge)
UrgeBase<OvermindState, OvermindBot, OvermindAction>.Equals(object)
UrgeBase<OvermindState, OvermindBot, OvermindAction>.GetHashCode()
UrgeBase<OvermindState, OvermindBot, OvermindAction>.Run(OvermindState, OvermindBot)
UrgeBase<OvermindState, OvermindBot, OvermindAction>.GetParameter<T>(OvermindBot, string)
UrgeBase<OvermindState, OvermindBot, OvermindAction>.GetParameter<T>(OvermindBot, IEnumerable<string>)
UrgeBase<OvermindState, OvermindBot, OvermindAction>.TryGetParameter<T>(OvermindBot, IEnumerable<string>, out T)
UrgeBase<OvermindState, OvermindBot, OvermindAction>.TryGetParameter<T>(OvermindBot, string, out T)
UrgeBase<OvermindState, OvermindBot, OvermindAction>.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.Overmind
Assembly: BotBrain.Overmind.dll
Syntax
public class AssignBrain : OvermindUrgeBase, IUrge<OvermindState, OvermindBot, OvermindAction>, IUrge, IEquatable<IUrge?>
Remarks

Initializes a new instance of the AssignBrain class.

Constructors

View Source

AssignBrain(string?, ILogger<AssignBrain>?)

The overmind urge responsible for assigning brains.

Declaration
public AssignBrain(string? name = null, ILogger<AssignBrain>? logger = null)
Parameters
Type Name Description
string name

The urge name.

ILogger<AssignBrain> logger

The logger to use.

Remarks

Initializes a new instance of the AssignBrain class.

Methods

View Source

RunSync(OvermindState, OvermindBot)

Runs the urge synchronously.

Declaration
protected override 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.

Overrides
OvermindUrgeBase.RunSync(OvermindState, OvermindBot)
View Source

StartBrain(OvermindState, DeviceState, IScenario, RunBrainRole, CancellationToken)

Starts a bot brain on a device running in the overmind.

Declaration
protected virtual Task<bool> StartBrain(OvermindState state, DeviceState subbot, IScenario scenario, RunBrainRole brainRole, CancellationToken cancellationToken)
Parameters
Type Name Description
OvermindState state

The overmind state.

DeviceState subbot

The device state.

IScenario scenario

The scenario.

RunBrainRole brainRole

The bot brain role.

CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
Task<bool>

True if starting a brain succeeded.

Implements

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