Skip to content

A computational intelligence project exploring metaheuristic algorithms for combinatorial optimization, developed for the Artificial Intelligence course at FEUP.

License

Notifications You must be signed in to change notification settings

AFNeves/StreamingVideos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Streaming Videos Algorithm Runner

This project implements and evaluates several metaheuristic algorithms for optimization problems. It includes a graphical user interface (GUI) for easy algorithm execution and testing scripts for performance evaluation.

Implemented Algorithms:

  • Hill Climbing: A simple iterative improvement algorithm that moves to the best neighboring solution.
  • Simulated Annealing: A probabilistic technique that escapes local optima by accepting worse solutions with a decreasing probability.
  • Local Search: A general iterative improvement algorithm that explores the neighborhood of a solution.
  • Tabu Search: A metaheuristic that avoids cycling by keeping a tabu list of recently visited solutions.
  • Iterated Local Search: An algorithm that improves local search by perturbing the solution and reapplying local search.
  • Genetic Algorithm: A population-based algorithm inspired by natural selection, using crossover and mutation.

It is strongly advised to run this project within an Integrated Development Environment (IDE) such as PyCharm, VSCode, or similar. This will help manage dependencies and execute the scripts.

Prerequisites

  • Python 3.x installed.
  • Required Python packages: tkinter. Install using pip:
    pip install tk

Running the Application

  1. Navigate to the src directory: Open a terminal or command prompt and change the current directory to the src directory of the project:

    cd src
  2. Run the main script: Execute the main.py script:

    python main.py
  3. Use the GUI:

    A graphical user interface will appear.

    • Algorithm Selection: Choose the algorithm to run from the dropdown.
    • Data File Selection: Enter the path to the data file or use the "Browse" button. (Data files are in the data directory).
    • Algorithm Parameters: Input the parameters for the selected algorithm. Default values are provided.
    • Run Algorithm: Click "Run Algorithm" to execute the algorithm.
    • Results: The initial and final solution scores will be displayed.

Running Tests (Optional)

WARNING: This is a very costly operation. It will take a long time to complete.

  1. Navigate to the test directory: In the terminal, change the current directory to the test directory:
    cd test
  2. Run the test script: Execute the test.py script:
    python test.py
  3. View Test Results:
    • Algorithm output data is written to text files in the test/results/run_{datasetNumber} directory.

License

This project is distributed under the MIT License.


This assignment was developed by: