Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Train new policy from scratch #21

Open
EttoreCaputo opened this issue Feb 29, 2024 · 3 comments
Open

Train new policy from scratch #21

EttoreCaputo opened this issue Feb 29, 2024 · 3 comments

Comments

@EttoreCaputo
Copy link

Hello @mfe7 ,
In these days I am trying to train a new RL policy, following the documentation. I am not able to execute a train because I don't know what I need to use to execute the following line:

rl_action = model.sample(obs)

How should I replace model? There is an example file that I can follow to achieve this goal? Please, I need help because I am working on a course project at my university.

@mfe7
Copy link
Contributor

mfe7 commented Mar 1, 2024

Hi - you could use the current policy as model and the method your policy has to predict an action given an observation for sample (it may be more common to name this method predict).

here's an example of an RL training script. the snippet in the documentation you linked would be a way to instantiate the environment, but you could otherwise train the policy using the more standard RL pipeline shown in the stable baselines link.

@EttoreCaputo
Copy link
Author

Thank you for your answer @mfe7,
but I'm still having trouble. I would to start to train the CADRLPolicy and then change something and retrain, but I'm not able to performe a training. I tried to use CADRLPolicy.value_net.train_neural_network() method but I didn't have the right data, for this reason I tried to run the pedData_processing_multi.py file but I need a file that isn't available in the repo: 4_agents_cadrl_raw.p, where can I find it? Or is there a file that can generate it?

@mfe7
Copy link
Contributor

mfe7 commented Mar 6, 2024

The CADRL training scripts haven't been maintained since ~2017 and the CADRL code is just meant to be available for inference. We do have a separate repo for training policies using GA3C-CADRL https://github.com/mit-acl/rl_collision_avoidance in case that is helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants