We create a bitmap of the maze to use it in the A* algorithm. The bitmap is a 2D array where 0 is a free cell and 1 is a wall. We use networkx to run the A* algorithm.
We create a bitmap of the maze where 0 is a free cell and 1 is a wall. Then we convert it to a NetworkX graph and run the A* algorithm.