Skip to content

[Question] How to build custom environment with custom action space #405

Open
@JustinS6626

Description

@JustinS6626

Question

I have written a custom Minigrid environment recently and I am trying to modify the action space to exclude irrelevant actions. The only actions that it needs are left, right, and forward. Within the constructor of the custom environment, I do this by overwriting the action space attribute after the constructor of the base class is called. However, in some instances, such as when I make a make a wrapper for the custom environment, or when I instantiate a stable baselines PPO with the custom environment, the action spaces of the resulting objects seem to revert to the default action space with seven actions. I would really appreciate an example like the one here: https://minigrid.farama.org/content/create_env_tutorial/ with additional information on how to set a custom action space so that it never reverts to the default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions