Find a path from the top-left corner (0,0) to the bottom-right corner (n-1,n-1) of an n×n grid, where you can only move to adjacent cells (8-directional movement) that have a strictly smaller value than your current cell.
Return the sequence of moves (directions) to reach the destination, or "impossible" if no path exists.
moves.pl- Iterative deepening search using Prolog's length predicatemovesBFS.pl- Explicit breadth-first search (forward direction)movesBFS(rev).pl- Explicit breadth-first search (reverse direction)moves.py- Python implementationJava/- Java implementation with Grid, Moves, and Node classes