google / evojax

Apache License 2.0
826 stars 78 forks source link

Adding a Linear Policy #49

Closed EdoardoPona closed 1 year ago

EdoardoPona commented 1 year ago

This is a simple linear policy (1 layer neural network). This policy is especially useful for tasks related to control, with for example augmented random search. In fact, in the original ARS paper, one of the algorithm's key advantages is the ability to find high performing linear policies.

I created a new policy rather than editing MLP for simplicity, and since they would most likely be used in different contexts (eg. tasks, algorithms)

lerrytang commented 1 year ago

Hi, thanks for the PR. However, I won't merge it into the repo because a linear policy is trivial to implement and in many cases may not be useful for other users. I'll keep the PR open for references though. I hope this won't discourage you from submitting more PRs in the future.

EdoardoPona commented 1 year ago

No problem at all!

It's good to have it as reference. lmk if you'd like on the other hand for me to tweak MLP by making hidden dimensions optional.