Local search project for the Artificial Intelligence course (IA) at FIB-UPC. The problem models a disaster-relief scenario where helicopters must be assigned to rescue groups of injured people from multiple centers, optimizing rescue time.
The project uses the AIMA (Artificial Intelligence: A Modern Approach) framework to implement and compare local search algorithms:
- Hill Climbing (HC) with multiple successor functions (swap, reassign, combined)
- Simulated Annealing (SA)
Several heuristic functions are provided to evaluate solutions (weighted total time, priority-based rescue, etc.), along with different initial state generators (random, all-to-one, greedy).
Desastres/src/
βββ main.java # Entry point with algorithm/heuristic selectors
βββ Desastres/ # Core domain classes
β βββ board.java # Board state representation
β βββ estado.java # State representation
β βββ Helicopter.java # Helicopter model
β βββ PairDH.java # Auxiliary pair structure
β βββ DesastresGoalTest.java # Goal test
β βββ DesastresHeuristicFunction[1-3].java
β βββ DesastresSuccessorFunction[1-6].java
βββ AIMA.jar # AIMA library
βββ Desastres.jar # Compiled project
Aima/ # AIMA library source
python_scripts/
βββ plots.py # Boxplot generation from experiment data
βββ jarToCSV.py # Converts JAR experiment output to CSV
βββ csv/ # Raw experiment results (TSV)
βββ experimento*/ # Generated plots per experiment
βββ requirements.txt # Python dependencies
docs/
βββ PracticaBusqueda-local.pdf # Assignment specification
βββ javadoc/ # Generated API documentation
- Java with the AIMA library for search algorithms
- Python (matplotlib, pandas, numpy) for experiment visualization