-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can 'Environment' and 'Agent' traits contain generic 'State' and 'Action'? #6
Comments
Hi and thanks for your feedback. Two basic thoughts about changes in that direction.
Changing interfaces towards the openAI Gym is just my personal preference atm, but please feel free to come up with another solution. Let me lay out some changes which would arise when following their space idea: Fortress would have an action space of type Discrete(36) and an observation space of type Box((6,6)), where each entry is a value in the range [-3,3]. The TicTacToe example would have an action space of type Discrete(9), and a observation space of type Box((3,3)), where each value is in the range [-1,1]. If we take ContinuousMountainCar as a new example we would than have an action space of type Box(1), with a value in the range [-1,1], for full power backwards/forwards. The observation space would be of type Box(1), with a value in the range [-1.2, 0.6]. See https://github.com/openai/gym/blob/master/gym/envs/classic_control/continuous_mountain_car.py Generally speaking, the Environment trait would be based on two generics, the action space A and the observation space O. The Agent_trait and Trainer would need to be changed accordingly. If you are fine with the changes I proposed, I would vote for having a first iteration, where we focus on the two spaces Right now I'm quite advanced with another branch which allows passing batches to NeuralNetworks. |
Changing interfaces towards the OpenAI Gym sounds good! For your information, there is a reference using the concept of both It is an option to use |
I started by creating a Draft-PR, in order to use tspooner's repository in the following places: I'm just trying to add a generic type state space and an action space to the relevant structs/traits, while keeping ti compiling. |
I've tried to transfer my code partially to Spaces. I've pushed the probably closest attempt in case that you want to have a look at it. |
Okay 👍 Thank you @ZuseZ4 ! |
To be applied to other problems, the implementation of generic (and the associated type?) 'State' and 'Action' would be very helpful.
Found some references in the other repository. the repo: milanboers/rurel
Frankly, I want to try to convert current 'Environment' and 'Agent' traits to deal with more generic problems (beyond Fortress) though, have no idea where to start...
Hope to hear your advice.
Thank you in advance!
The text was updated successfully, but these errors were encountered: