Skip to content

FMultiBinarySpace

A struct representing a multi-binary space (boolean vector) of possible observations or actions.

A multi-binary space represents multiple independent binary (true/false) values, where each dimension is independent. This is commonly used for representing multiple on/off states or binary flags in observations or actions.

struct FMultiBinarySpace : public FSpace

Methods

FMultiBinarySpace

FMultiBinarySpace()

Constructs an empty MultiBinarySpace with Shape=0.


FMultiBinarySpace

FMultiBinarySpace(int InShape)

Constructs a MultiBinarySpace with a specific number of dimensions.

Parameters

  • InShape (int)

Merge

void Merge(const FMultiBinarySpace &Other)

Merges another MultiBinarySpace into this one.

Parameters

  • Other (const FMultiBinarySpace)

Copy

void Copy(const FMultiBinarySpace &Other)

Copies the contents of another MultiBinarySpace into this one.

Parameters

  • Other (const FMultiBinarySpace)

GetNumDimensions

virtual int GetNumDimensions() const override

Gets the number of dimensions in this space.


IsEmpty

virtual bool IsEmpty() const override

Checks if this space is empty.


Validate

virtual ESpaceValidationResult
Validate(const TInstancedStruct<FPoint> &InPoint) const override

Validates that a point conforms to this space.

Parameters

  • InPoint (const TInstancedStruct<FPoint>)

GetFlattenedSize

virtual int GetFlattenedSize() const override

Gets the flattened size of this space.


Accept

inline virtual void Accept(SpaceVisitor &InVisitor)

Accepts a mutable visitor for the visitor pattern.

Parameters

  • InVisitor (SpaceVisitor)

Accept

inline virtual void Accept(ConstSpaceVisitor &InVisitor) const

Accepts a const visitor for the visitor pattern.

Parameters

  • InVisitor (ConstSpaceVisitor)

Attributes

Shape

int Shape = 0

The number of binary dimensions in this space.

Source: Source/Schola/Public/Spaces/MultiBinarySpace.h