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

make random action in rainbow #21

Open
zyzhang1130 opened this issue Feb 17, 2020 · 2 comments
Open

make random action in rainbow #21

zyzhang1130 opened this issue Feb 17, 2020 · 2 comments

Comments

@zyzhang1130
Copy link

Hi, may I ask is it possible to make a sequence of random actions by adding a line of code in main.py of Rainbow?

@beduffy
Copy link
Contributor

beduffy commented Feb 17, 2020

instead of line 161 action = dqn.act(state) you can put an if statement and do
action = env.action_space.sample() for whatever condition you want. But not sure why you would want to do this since rainbow has roughly random actions at the start of training.

If rainbow keeps doing the same action you should tune your noisy layer parameters.

@zyzhang1130
Copy link
Author

Thank you. It is because initially my idea is to reset the agent's position in the room once certain conditions are met. However, since the currently wrapper does not support teleport, I compromised my strategy. Instead of returning to the original position, I make the agent take a random walk so that it has no way of tracing back to its position when the conditions are met in an analytic way. But if you know an alternative of resetting the agent's position do let me know. Thanks!

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