This repository contains implementations of various heuristic algorithms to solve combinatorial and continuous optimization problems. These algorithms are useful for finding approximate solutions in problems where exact methods are infeasible due to high computational costs.
- A Star Search
- Simulated Annealing
- Genetic Algorithm
- Ant Colony Optimization (ACO)
- Particle Swarm Optimization (PSO)
- Tabu Search
heuristic-algorithms/
│── algorithms/
│ │── simulated_annealing.py
│ │── genetic_algorithm.py
│ │── ant_colony.py
│ │── particle_swarm.py
│ │── tabu_search.py
│── examples/
│ │── tsp_example.py
│ │── knapsack_example.py
│── README.md
│── requirements.txt
│── main.py
-
Clone the repository:
git clone https://github.com/your-username/heuristic-algorithms.git cd heuristic-algorithms
-
Install dependencies:
pip install -r requirements.txt
-
Run an example:
python examples/tsp_example.py
- Python 3.8+
- NumPy
- SciPy
- Matplotlib (for visualization, optional)
- "Metaheuristics: From Design to Implementation" - El-Ghazali Talbi
- "An Introduction to Metaheuristics for Optimization" - Bastien Chopard · Marco Tomassini
This project is licensed under the MIT License - see the LICENSE file for details.
If you liked this repository, don't forget to leave a ⭐ and contribute with improvements! 🚀