Interface Nengo with OpenAI's Gym

Greetings, I want to do reinforcement learning using Nengo so the OpenAI’s Gym environment seems the best place to start.

In order to do that I want to interface Nengo with OpenAI’s Gym but I am not really sure if I need any external library for that and also I have no idea how to do it.

Any help?

There was another user who was working on this here Nengo RL performance with standard OpenAI cart pole problem, and a paper written about integrating Nengo and OpenAI here https://www.aaai.org/ocs/index.php/FLAIRS/FLAIRS19/paper/download/18312/17429. So those may provide a helpful starting point for your project.

The basic idea is that you use a nengo.Node to encapsulate the calls to OpenAI. A Node can execute arbitrary Python code, so as long as you can write the interaction with OpenAI as a function that receives a value (the input to the Node), does some computation, and then returns a value (the output of the Node), that’s basically all there is to interfacing an external library with Nengo.

1 Like

Thanks, I have seen the question you are referring to, but the implementation seems to me very hasty and kind of dubious. On the other hand yesterday I found that paper too and it seems very promising!