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

add option for alternative heuristics #14

Open
mivanit opened this issue Sep 4, 2023 · 0 comments
Open

add option for alternative heuristics #14

mivanit opened this issue Sep 4, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@mivanit
Copy link
Member

mivanit commented Sep 4, 2023

currently we use manhattan distance as the heuristic:

def heuristic(a: CoordTup, b: CoordTup) -> float:
    """return manhattan distance between two points"""
    return np.abs(a[0] - b[0]) + np.abs(a[1] - b[1])

(see maze_dataset/maze/lattice_maze.py)

This works fine for acyclic mazes, but is non-deterministic for some cyclic ones (this is particularly visible for high-p percolation mazes).

Ideally, it would be nice to be able to specify a solution heuristic in the MazeDatasetConfig. This would require modifying a number of functions to accept such a parameter:

  • LatticeMaze.generate_random_path()
  • get_maze_with_solution()
  • _generate_maze_helper()
  • SolvedMaze.from_targeted_lattice_maze()
@mivanit mivanit added the enhancement New feature or request label Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant