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

reset agent but not the envirnment #20

Open
zyzhang1130 opened this issue Feb 14, 2020 · 3 comments
Open

reset agent but not the envirnment #20

zyzhang1130 opened this issue Feb 14, 2020 · 3 comments

Comments

@zyzhang1130
Copy link

Hi,
I suppose
state, done = env.reset(), False
in line 141 and 157 of rainbow main.py is to reset both agent and environment. May I ask after setting the environment will the objects location be randomized or kept in the initial position, and is there a way to reset agent's position only while keeping the environment as it is?

Thank you.

@zyzhang1130
Copy link
Author

I tried to use teleport to reset agent's position without affecting environment:
env.step(action='Teleport', x=0.999, y=1.01, z=-0.3541)

but got error:TypeError: step() got an unexpected keyword argument 'x'
So apparently 'env' is not the same as 'controller' in ai2thor. I'm not sure how to use controller.step(action='Teleport', x=0.999, y=1.01, z=-0.3541) in your implementation. Mind to give any advice?

Thanks.

@zyzhang1130
Copy link
Author

zyzhang1130 commented Feb 17, 2020

It occurred to me that the current wrapper does not permit teleport. Then is there any way to save the environment setting (everything apart from the agent) and load it later?

@zyzhang1130
Copy link
Author

also when I choose not to reset the environment by commenting both line 141 and 157 it gives me this error:
AttributeError: 'NoneType' object has no attribute 'metadata'

when it ran line 132:
next_state, _, done = env.step(np.random.randint(0, action_space))

Does this line just let agent make a random movement and what could be the possible reasons for the error?

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

1 participant