You will program the A* algorithm in order to search through the given state space.
Implement an A* algorithm that
None;
You should use the maze environment kuimaze2.SearchProblem.
For the algorithm to work correctly, you need to choose and implement a suitable heuristic function. The impact of selecting different heuristic functions is well explained at this webpage. The cost of transition between two neighbouring positions is always larger or equal to the Euclidean distance of these two positions, and it generally does not have to be the same for all pairs of positions.
kuimaze2 package, if you have not done so yet.
kuimaze2 module contains example_search.py. This file also serves as a tutorial how to work with the environment.)
agent.py according to the guidelines.
In file agent.py, implement class Agent with the following methods:
| Method | input parameters | output parameters | note |
|---|---|---|---|
__init__ | environmnent: SearchProblem | none | Agent initialization. |
find_path | none | path | Returns the found path or None if no path exists. A path is a list of States, including the start state and the goal state. |
The following Python modules may be useful in implementing some parts of the A* algorithm: queue, heapq.
agent.py and any other possible modules you created to BRUTE. All the files must be in the archive's root folder! The archive cannot contain any other folders! You should NOT submit any files contained in the downloaded kuimaze2 module.
See a more detailed info about evaluation.