Used Python's requests module. Can be quickly installed with pip. Added requirements.txt with necessary packages, and basic .gitinore.
Modified mazebotapi.py file:
Added functionparse_maze(grid), which parses data retrieved from Mazebot API into numpy arrays used on Astar.
Added function get_mazebot_random(), which requests a maze of a random valid size (10, 20, 40, 60, 100, 120, 150 and 200). Returns grid on numpy array format, and tuples with start and goal coordinates.
Added function get_mazebot_sized(), which asks user input to set range of valid maze sizes for randomization. Invalid inputs results in a ValueError exception. Returns grid on numpy array format, and tuples with start and goal coordinates.
Modified a_star.py file:
Added import for the mazebotapi.py file.
Added function calls which may be uncommented to execute the algorithms using mazes from Mazebot API.
Used Python's
requests
module. Can be quickly installed with pip. Added requirements.txt with necessary packages, and basic .gitinore.Modified
mazebotapi.py
file:parse_maze(grid)
, which parses data retrieved from Mazebot API into numpy arrays used on Astar.get_mazebot_random()
, which requests a maze of a random valid size (10, 20, 40, 60, 100, 120, 150 and 200). Returns grid on numpy array format, and tuples with start and goal coordinates.get_mazebot_sized()
, which asks user input to set range of valid maze sizes for randomization. Invalid inputs results in a ValueError exception. Returns grid on numpy array format, and tuples with start and goal coordinates.Modified
a_star.py
file:mazebotapi.py
file.