 <p>You can think of grids as graphs and search space representations can be shown using graphs:</p> <p><img src="https://i.stack.imgur.com/JyOTG.png" alt="Picture of how a grid is like a graph"></p> <p>Block A,B,C,D are nodes of graph and weights between the nodes can represent path distance between nodes.</p>