Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Back to Athens

Problem Description

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.

Goal

Return the sequence of moves (directions) to reach the destination, or "impossible" if no path exists.

Implementations

  • moves.pl - Iterative deepening search using Prolog's length predicate
  • movesBFS.pl - Explicit breadth-first search (forward direction)
  • movesBFS(rev).pl - Explicit breadth-first search (reverse direction)
  • moves.py - Python implementation
  • Java/ - Java implementation with Grid, Moves, and Node classes