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

Is there any way that can let the goal location fixed? and can set the loctaion personally? #212

Open
GuochenZhou opened this issue Jun 7, 2023 · 1 comment

Comments

@GuochenZhou
Copy link

Question

Is there any way that can let the goal location fixed? and can set the loctaion personally?

@AlexBeesonWarwick
Copy link

Hi there

I've found that for AntMaze, you can get the current target goal using:
env.target_goal

You can set the target goal using:
env.set_target_goal(new_goal)
where "new_goal" is user specified. Note this has to be done after env.reset().
I haven't yet been able to figure out how to get the dimensions of the maze or the whole set of x-y coordinates that are permitted (e.g. not a wall), however you can get a sub-set of permitted x-y coordinates using the states in the data. You can randomly select a state and use that for the new_goal using something like:
dataset["observations"][np.random.randint(0, len(dataset["observations"]))][0:2]

Hope that helps

Alex

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