
org.deeplearning4j.rl4j.space.ArrayObservationSpace Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gym-java-client Show documentation
Show all versions of gym-java-client Show documentation
A Java client for Open AI's Reinforcement Learning Gym
package org.deeplearning4j.rl4j.space;
import lombok.Value;
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.factory.Nd4j;
/**
* @param the type of Observation
* @author rubenfiszel ([email protected]) on 7/8/16.
*
* An array observation space enables you to create an Observation Space of custom dimension
*/
@Value
public class ArrayObservationSpace implements ObservationSpace {
String name;
int[] shape;
INDArray low;
INDArray high;
public ArrayObservationSpace(int[] shape) {
name = "Custom";
this.shape = shape;
low = Nd4j.create(1);
high = Nd4j.create(1);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy