google / brax

Massively parallel rigidbody physics simulation on accelerator hardware.
Apache License 2.0
2.14k stars 234 forks source link

Algorithm with recurrent policy #423

Closed eleninisioti closed 4 months ago

eleninisioti commented 7 months ago

I was wondering how you would extend an existing algorithm, let's say es to allow for a recurrent neural network instead of a feedforward one. You would need to change make_policy_network to replace the MLP with a newly created RNN so my impression is that you'd need to change only networks.py and not train.py. But not sure how to implement it

btaba commented 7 months ago

Besides the make_policy_network, I'd expect you have to modify the actor_step to handle the recurrent state

https://github.com/google/brax/blob/16304037a36b1d9c8c0b3084f57d1159627b636b/brax/training/acting.py#L34-L55