Skip to content

Add random map generator #4

@damat-le

Description

@damat-le

To simplify experimentation, a random map generator could be added as utility.

Some ideas:

The random map generator (RMG), given the start and goal positions, must generate feasible maps, i.e. maps with at least one feasible path between start and goal positions. To achieve this I propose the following:

  • start with an empty grid
  • sample a path between start and goal positions
  • randomly add black tiles in the positions that do not belong to the sampled path

This should guarantee the existence of a path between start and goal.

If the user decides to go with a random map, it should be generated when the reset method is called. This allow the users to run different episodes with different random maps. I'm not sure this makes sense.

Note: In the same spirit, may be also the obstacle map should be passed in the reset method instead of the init (?). This would allow the users to run different episodes with different maps from their own set of custom maps. However, this can cause issues with gymnasium registry (?).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions