Struct FDiscreteSpace
- struct FDiscreteSpace : public FSpace
-
A struct representing a Discrete space (e.g.
Vector of integers) of possible observations or actions.
Public Functions
- void Copy(const FDiscreteSpace &Other)
-
Copy construct a DiscreteSpace.
- Parameters:
-
Other – [in] The DiscreteSpace to copy
- void Merge(const FDiscreteSpace &Other)
-
Merge another DiscreteSpace into this one.
- Parameters:
-
Other – [in] The DiscreteSpace to merge
- void Add(int DimSize)
-
Add a dimension to this DiscreteSpace.
- Parameters:
-
DimSize – [in] The maximum value of the dimension
- void FillProtobuf(DiscreteSpace *Msg) const
-
fill a protobuf message with the data from this DiscreteSpace
- Parameters:
-
Msg – [in] A ptr to the protobuf message to fill
- void FillProtobuf(DiscreteSpace &Msg) const
-
fill a protobuf message with the data from this DiscreteSpace
- Parameters:
-
Msg – [in] A ref to the protobuf message to fill
- int GetMaxValue(const TArray<float> &Vector) const
-
Get the3 index of the maximum value in an Array of Values.
- Parameters:
-
Vector – [in] The vector to get the maximum values index from
- Returns:
-
The index of the maximum value in the vector
- 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