Skip to content

cwtsaiai/metaheuristics_2023

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 

Repository files navigation

Supplementary Source Code to the Book: Handbook of Metaheuristic Algorithms: From Fundamental Theories to Advanced Applications

This repository holds the supplementary source code to the book Handbook of Metaheuristic Algorithms: From Fundamental Theories to Advanced Applications. It contains an implementation of a set of metaheuristic algorithms, in both C++ and Python, for solving five different optimization problems; namely, the onemax (0-es/1-onemax and 1-onemax), deceptive (0-es/2-deception and 2-deception), traveling salesman (3-tsp), single objective bound constrained (4-function), and data clustering (6-clustering) problem. Moreover, the directory 5-eval contains an implementation of the code for the interpretations and analyses of simulation results.

1. Organization of the programs

1.1 Problem-oriented

  • 0-es

    • exhaustive search (ES) for the onemax and deceptive problems
  • 1-onemax

    • hc.h: hill climbing (HC) that generates a new solution by moving the current solution left (-1) or right (+1)
    • hc_r.h: hill climbing (HC) that is derived from hc.h to make it generate a new solution randomly, by jumping from the current solution to another that is not limited to the solution to the left or right of the current solution
    • sa.h: simulated algorithm (SA)
    • sa_refinit.h: simulated algorithm (SA) with a refined initial solution
    • ts.h: tabu search (TS)
    • ga.h: genetic algorithm (GA) that uses tournament selection and one-point crossover
    • gar.h: genetic algorithm (GA) that is derived from ga.h to use roulette wheel selection
    • gax2.h: genetic algorithm (GA) that is derived from ga.h to use two-point crossover
    • gaxu.h: genetic algorithm (GA) that is derived from ga.h to use uniform crossover
    • se.h: search economics (SE)
  • 2-deception

    • hcdp.h: hill climbing (HC) that is derived from hc.h for a deceptive problem
    • hcdp_r.h: hill climbing (HC) that is derived from hcdp.h to make it generate a new solution randomly, by jumping from the current solution to another that is not limited to the solution to the left or right of the current solution
    • sadp.h: simulated algorithm (SA) that is derived from sa.h for a deceptive problem
    • tsdp.h: tabu search (TS) that is derived from ts.h for a deceptive problem
    • gadp.h: genetic algorithm (GA) that is derived from ga.h for a deceptive problem
    • gardp.h: genetic algorithm (GA) that is derived from gar.h for a deceptive problem
  • 3-tsp

    • aco.h: ant colony optimization (ACO)
    • ga.h: genetic algorithm (GA) with modified one-point crossover (MOPC)
    • gapmx.h: genetic algorithm (GA) that is derived from ga.h to use partially-mapped crossover (PMX)
    • gacx.h: genetic algorithm (GA) that is derived from ga.h to use cycle crossover (CX)
    • gaox.h: genetic algorithm (GA) that is derived from ga.h to use order crossover (OX)
    • pga.h: master-slave parallel genetic algorithm (MSP-GA)
    • hga.h and sa.h: hybrid genetic algorithm (HGA) that combines GA and SA
    • gals.h: genetic algorithm (GA) with 2-opt
  • 4-function

  • 6-clustering

    • ga.h: genetic algorithm (GA)
    • prega.h: pattern reduction enhanced genetic algorithm (PREGA)
  • 5-eval

    • convergence curves using gnuplot
    • histograms using gnuplot

1.2 Chapter-oriented

Please modify the hyperlink(s) at the end of each chapter in the book so that each becomes "https://github.com/cwtsaiai/metaheuristics_2023/tree/main/src/...," as required by GitHub!

1.3 Directory tree

2. Building and running the programs

  1. To clone the repository, type
git clone https://github.com/cwtsaiai/metaheuristics_2023.git
  1. To compile the C++ code, change to the directory src/c++ first and then type
make clean dep all
  1. To run a program, say, sa in 1-onemax, type either
./1-onemax/search sa 100 1000 10 "" 0.00001 1.0

    to get the results or

./1-onemax/search sa

    to get a help message about the parameters that you should be given to the program, as shown below.

Usage: ./search <algname> <#runs> <#evals> <#patterns> <filename_ini> <min_temp> <max_temp>

3. Citing the book

If you use code in this repository, please cite the book, as follows:

@Book{Tsai-2023, 
  title     = "{Handbook of Metaheuristic Algorithms: From Fundamental Theories to Advanced Applications}",
  author    = "Chun-Wei Tsai and Ming-Chao Chiang",
  year      = "2023",
  publisher = "Elsevier"
}

4. LICENSE

Copyright (c) 2022-2023 Chun-Wei Tsai and Ming-Chao Chiang
All rights reserved.

This work (the supplementary code in this repository) is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages