keras-rl / keras-rl

Deep Reinforcement Learning for Keras.

Home Page:http://keras-rl.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Keras RL for another externel Enviroment

Jekso opened this issue · comments

Is it possible to use Keras-RL for any other problem rather than Open AI Gym ??

I'v just edited rl-core so that it can use Unity's ML agents, instead of Ai Gym. I'v attached it so just copy it and feel free to test it out
core.zip

Further to the above comment, if you download the unity banana environment from navigation in this repository you can experiment with that environment:

https://github.com/ravishchawla/Reinforcement-Learning-NanoDegree

follow the guide in that repository, it is relatively similar to using ai gym. You will need to import Unity environment from unityagents which is part of unity ML. You then specify the environment like so:

env = UnityEnvironment("Banana.exe")

In order to get the action size and the observation size you need to enter the following:

brain_name = env.brain_names[0];
brain = env.brains[brain_name];
env_info = env.reset(train_mode=True)[brain_name]
action_size = brain.vector_action_space_size
obs_size = len(env_info.vector_observations[0])

But once you have done that, its exactly the same

Yes, you can create a custom environment. This issue is well explained here: https://stackoverflow.com/questions/44469266/how-to-implement-custom-environment-in-keras-rl-openai-gym

I applied the same logic to use Keras-RL for text summarisation

thanks ^_^