Starting from:

$25

CS561 - ARTIFICIAL INTELLIGENCE LAB - ASSIGNMENT-1  - A* Search - BFS - Solved

Best-first search algorithm visits the next state based on the heuristics function f(n) = h(n) with lowest heuristic value (often called greedy). It doesn't consider the cost of the path to that particular state. All it cares about is which next state from the current state has lowest heuristics.

A* search algorithm visits the next state based on heuristics f(n) = h + g where the h component is the same heuristics applied as in Best-first search but the g component is the path from the initial state to the particular state. Therefore it doesn't choose the next state only with lowest heuristics value but one that gives lowest value when considering it's heuristics and cost of getting to that state.

Clearly you can see best-first is the greedy algorithm because it would choose a state with lower heuristics but higher overall cost as it doesn't consider the cost of getting to that state from the initial state.

Some observations between A* Manhattan distance and A* Tiles Displaced search

Tiles Displaced only takes into account whether a tile is misplaced or not, but it doesn't take into account how far away that tile is from being correct: a tile that is 1 square away from its ultimate destination is treated the same as a tile that is far away from where it belongs.

In contrast, Manhattan Distance does take this information into account. Instead of treating each tile as either "correct" or "incorrect" (a binary decision), it introduces shades of grey that take into account how far the tile is from where it belongs. It seems plausible that this might possibly yield some improvement.

Following are the observations from the program execution

Manhattan Distance

 

Tiles misplaced

More products