Struct FBoxSpace

struct FBoxSpace : public FSpace

A struct representing a box(continuous) space of possible observations or actions.

A BoxSpace is a Cartesian product of BoxSpaceDimensions. Each dimension is a continuous space.

Public Functions

FBoxSpace()

Construct an empty BoxSpace.

FBoxSpace(TArray<float> &Low, TArray<float> &High)

Construct a BoxSpace with the given bounds.

Note

Low and High must have the same length

Parameters:
  • Low[in] An array representing the the lower bound of each dimension

  • High[in] An array representing the the upper bound of each dimension

FBoxSpace(TArray<FBoxSpaceDimension> &Dimensions)

Construct a BoxSpace with the given bounds.

Parameters:

Dimensions[in] An array of BoxSpaceDimensions

void Copy(const FBoxSpace &Other)

Copy constructor.

Parameters:

Other[in] The BoxSpace to copy

void Merge(const FBoxSpace &Other)

Merge another BoxSpace into this one.

Parameters:

Other[in] The BoxSpace to merge

FBoxSpace GetNormalizedObservationSpace() const

Get the normalized version of this BoxSpace.

Returns:

A BoxSpace with all dimensions normalized to [0, 1]

virtual ~FBoxSpace()
void FillProtobuf(BoxSpace *Msg) const

Fill a protobuf message with the data from this BoxSpace.

Parameters:

Msg[in] A ptr to the protobuf message to fill

void FillProtobuf(BoxSpace &Msg) const

Fill a protobuf message with the data from this BoxSpace.

Parameters:

Msg[in] A ref to the protobuf message to fill

void Add(float Low, float High)

Add a dimension to this BoxSpace.

Parameters:
  • Low[in] The lower bound of the dimension

  • High[in] The upper bound of the dimension

void Add(const FBoxSpaceDimension &Dimension)

Add a dimension to this BoxSpace.

Parameters:

Dimension[in] The BoxSpaceDimension to add

virtual void FillProtobuf(FundamentalSpace *Msg) const override

Fill a protobuf message with the data from this space.

Parameters:

Msg[in] The protobuf message to fill

virtual int GetNumDimensions() const override

Get the number of dimensions in this space.

Returns:

The number of dimensions in this space

virtual ESpaceValidationResult Validate(TPoint &Observation) const override

Test if an observation is in this space.

Parameters:

Observation[in] The observation to validate

Returns:

An enum indicating the result of the validation

virtual int GetFlattenedSize() const override

Get the size of the flattened representation of this space.

Returns:

The size of the flattened representation of this space

virtual bool IsEmpty() const override

Check if this space is empty.

Returns:

True if this space is empty, false otherwise

virtual TPoint MakeTPoint() const override

Create a TPoint from this space.

Returns:

A TPoint belonging to this space, with correctly set variant type.

virtual void NormalizeObservation(TPoint &Observation) const

Normalize an observation in this space.

Parameters:

Observation[inout] The observation to normalize

virtual TPoint UnflattenAction(const TArray<float> &Data, int Offset = 0) const override

Unflatten an action from a buffer.

Parameters:
  • Data[in] The buffer to unflatten from

  • Offset[in] The offset into the buffer to start unflattening from

virtual void FlattenPoint(TArrayView<float> Buffer, const TPoint &Point) const override

Flatten a point into a buffer.

Parameters:
  • Buffer[inout] The buffer to flatten into

  • Point[in] The point to flatten

Public Members

TArray<FBoxSpaceDimension> Dimensions = TArray<FBoxSpaceDimension>()

The dimensions of this BoxSpace.

Related pages

  • Visit the Schola product page for download links and more information.

Looking for more documentation on GPUOpen?

AMD GPUOpen software blogs

Our handy software release blogs will help you make good use of our tools, SDKs, and effects, as well as sharing the latest features with new releases.

GPUOpen Manuals

Don’t miss our manual documentation! And if slide decks are what you’re after, you’ll find 100+ of our finest presentations here.

AMD GPUOpen Performance Guides

The home of great performance and optimization advice for AMD RDNA™ 2 GPUs, AMD Ryzen™ CPUs, and so much more.

Getting started: AMD GPUOpen software

New or fairly new to AMD’s tools, libraries, and effects? This is the best place to get started on GPUOpen!

AMD GPUOpen Getting Started Development and Performance

Looking for tips on getting started with developing and/or optimizing your game, whether on AMD hardware or generally? We’ve got you covered!

AMD GPUOpen Technical blogs

Browse our technical blogs, and find valuable advice on developing with AMD hardware, ray tracing, Vulkan®, DirectX®, Unreal Engine, and lots more.

Find out more about our software!

AMD GPUOpen Effects - AMD FidelityFX technologies

Create wonder. No black boxes. Meet the AMD FidelityFX SDK!

AMD GPUOpen Samples

Browse all our useful samples. Perfect for when you’re needing to get started, want to integrate one of our libraries, and much more.

AMD GPUOpen developer SDKs

Discover what our SDK technologies can offer you. Query hardware or software, manage memory, create rendering applications or machine learning, and much more!

AMD GPUOpen Developer Tools

Analyze, Optimize, Profile, Benchmark. We provide you with the developer tools you need to make sure your game is the best it can be!