Recursive algorithm for computing shortest paths in two-dimensional grids with obstacles.
Project for the Algorithms and Data Structures course (academic year 2024–25).
The project is composed of 3 main components:
-
Grid Generator — Configurable with different types of obstacles: simple, clustered, diagonal, boundary, bar-shaped, etc.
-
CAMMINOMIN Algorithm — Given a grid and two traversable cells (source and destination), it computes a shortest path (if one exists), returning the sequence of landmarks and its length.
-
ExperimentationSystem — Given a grid, it evaluates correctness and time/space performance after multiple algorithm invocations.
The algorithm uses:
- Free paths of type 1 and 2
- Construction of context, complement, and boundaries
- A recursive approach to efficiently explore the grid
- Random or semi-random generation of customizable grids
- Computation of the shortest path and its representation as a sequence of moves
- Analysis of free distance (
dlib) between cells - Performance experimentation based on configurable parameters
- Language: Java
- File-based input/output
- Focus on code reuse and maintainability
grid-pathfinder/
├── grid-pathfinder/ # Java implementation
│ ├── bin # Compiled files
│ ├── src # Source code
│ ├── Grids # Pre-generated grids ready to use
├── Elaborato/ # Project specification
├── Relazione/
│ ├── Relazione # Final report
│ ├── use cases # Generated grids with all executed test cases
└── README.md
MIT License — See LICENSE for details.