Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
ida_star_grid_example.cc File Reference

Reference example: IDA* pathfinding on a 2-D grid. More...

#include <array>
#include <iostream>
#include <State_Search.H>
Include dependency graph for ida_star_grid_example.cc:

Go to the source code of this file.

Functions

int main ()
 

Detailed Description

Reference example: IDA* pathfinding on a 2-D grid.

Model summary:

  • State: current (row, col) position on a grid with obstacles.
  • Moves: up / down / left / right with unit cost.
  • Heuristic: Manhattan distance to the goal — admissible and consistent.
  • Goal: reach the target cell.

IDA* finds the shortest path (minimum number of steps) from a source cell to a goal cell, avoiding obstacle cells. Because the heuristic is admissible, the first complete solution is guaranteed optimal.

Build and run:

  • cmake --build build --target ida_star_grid_example
  • ./build/Examples/ida_star_grid_example

Definition in file ida_star_grid_example.cc.

Function Documentation

◆ main()