Struct FSpace
- struct FSpace
-
A class representing a space of possible observations or actions.
This is a base class for all spaces.
Subclassed by FBinarySpace, FBoxSpace, FDiscreteSpace
Public Functions
- FundamentalSpace *ToProtobuf() const
-
Convert this space to a protobuf message.
- Returns:
-
A protobuf message representing this space
- inline virtual void FillProtobuf(FundamentalSpace *Msg) const
-
Fill a protobuf message with the data from this space.
- Parameters:
-
Msg – [in] The protobuf message to fill
- inline virtual int GetNumDimensions() const
-
Get the number of dimensions in this space.
- Returns:
-
The number of dimensions in this space
- inline virtual bool IsEmpty() const
-
Check if this space is empty.
- Returns:
-
True if this space is empty, false otherwise
- inline virtual ESpaceValidationResult Validate(TPoint &Observation) const
-
Test if an observation is in this space.
- Parameters:
-
Observation – [in] The observation to validate
- Returns:
-
An enum indicating the result of the validation
- inline virtual int GetFlattenedSize() const
-
Get the size of the flattened representation of this space.
- Returns:
-
The size of the flattened representation of this space
- inline virtual TPoint MakeTPoint() const
-
Create a TPoint from this space.
- Returns:
-
A TPoint belonging to this space, with correctly set variant type.
- inline virtual void NormalizeObservation(TPoint &Observation) const
-
Normalize an observation in this space.
- Parameters:
-
Observation – [inout] The observation to normalize
- inline virtual TPoint UnflattenAction(const TArray<float> &Data, int Offset = 0) const
-
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
-