Questions about implementing environment simulator of reinforcement learning task in LAVA #519
Replies: 2 comments 1 reply
-
Hi, thanks for your question. As you know, you currently have two option on how to run your environmental process.
Although, I think it can make a lot of sense to run the environment asynchronously from the agent, your third point actually suggests that you want to synchronize the execution of the agent and the environment. So, if there is no specific reason to run the environment asynchronously, I would suggest to wrap it into a PyLoihiProcessModel and implement the dynamics in the run_spk function. Otherwise, if you use the PyAsyncProcessModel, you can call the |
Beta Was this translation helpful? Give feedback.
-
You can use You find examples here: |
Beta Was this translation helpful? Give feedback.
-
Hi, I am working on a reinforcement learning task and I hope to implement the trained policy on Loihi. Like many reinforcement tasks, the environment receives the action from the agent and outputs an image as the next state. After reading the tutorials of LAVA, I guess that the environment simulator should also be wrapped as a LAVA process. And I have some questions about the implementation:
PyAsyncProcessModel
andAsyncProtocol
, is that correct?PyAsyncProcessModel
andAsyncProtocol
. How to transfer data betweenPyAsyncProcessModel
andPyLoihiProcessModel
? Is it the same as how we setup ports and transfer data between twoPyLoihiProcessModel
?run_async
method ofPyAsyncProcessModel
runs forever. How to make it pause when waiting for the next action input, and stop when the episode terminates?Beta Was this translation helpful? Give feedback.
All reactions