Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,4 @@ data_files/sequences*
*.csv
.DS_Store
!docfiles/
!customhys/exconf/*
!customhys/exconf/*
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,6 @@ make help # See all 22 commands

---

*Last Updated: 2026-02-03*
*Status: Stable*
*Last Updated: 2026-02-03*
*Status: Stable*
*Test Coverage: 100% (100/100 functional tests passing)*
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ include README.md
include docfiles/*.pdf
include docfiles/*.png
include customhys/collections/*
include customhys/exconf/*
include customhys/exconf/*
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<div>
<img align="left" alt="Module Dependency Diagram" src="https://raw.githubusercontent.com/jcrvz/customhys/master/docfiles/chm_logo.png" title="Customhys logo" width="25%"/>
</div>
<div align="justify">
<div align="justify">
<b>Customising optimisation metaheuristics via hyper-heuristic search</b> (CUSTOMHyS). This framework provides tools for solving, but not limited to, continuous optimisation problems using a hyper-heuristic approach for customising metaheuristics. Such an approach is powered by a strategy based on Simulated Annealing. Also, several search operators serve as building blocks for tailoring metaheuristics. They were extracted from ten well-known metaheuristics in the literature.
</div>

Detailed information about this framework can be found in [[1, 2]](#references). Plus, the code for each module is well-documented.


### 🛠 Requirements:
### 🛠 Requirements:

* Check the [requirements.txt](requirements.txt) file.
* For Apple Silicon, one may need to install TensorFlow via `conda` such as:
Expand Down Expand Up @@ -41,7 +41,7 @@ Source: [``population.py``](customhys/population.py)

### 🦾 Search Operators (low-level heuristics)

This module has a collection of search operators (simple heuristics) extracted from several well-known metaheuristics in the literature. Such operators work over a population, i.e., modify the individuals' positions.
This module has a collection of search operators (simple heuristics) extracted from several well-known metaheuristics in the literature. Such operators work over a population, i.e., modify the individuals' positions.

Source: [``operators.py``](customhys/operators.py)

Expand Down Expand Up @@ -93,7 +93,7 @@ data_frame = {dict: N}
: :
|-- 'results' = {list: N}
| |-- 0 = {dict: 6}
| | |-- 'iteration' = {list: M}
| | |-- 'iteration' = {list: M}
| | | |-- 0 = {int}
: : : :
| | |-- 'time' = {list: M}
Expand Down Expand Up @@ -211,4 +211,4 @@ These are the conference articles that have been presented using this framework:
1. [D. F. Zambrano-Gutierrez, J. M. Cruz-Duarte, and H. Castañeda, _Automatic Hyper-Heuristic to Generate Heuristic-based Adaptive Sliding Mode Controller Tuners for Buck-Boost Converters_, in **The Genetic and Evolutionary Computation Conference (GECCO)**, 2023, pp. 1-8. **Nominated to Best Paper Award**](https://dl.acm.org/doi/10.1145/3583131.3590510)
1. [J. M. Tapia-Avitia, J. M. Cruz-Duarte, I. Amaya, J. C. Ortiz-Bayliss, H. Terashima-Marin, and N. Pillay. _A Primary Study on Hyper-Heuristics Powered by Artificial Neural Networks for Customising Population-based Metaheuristics in Continuous Optimisation Problems_, **2022 IEEE Congress on Evolutionary Computation (CEC)**, 2022.](https://doi.org/10.1109/CEC55065.2022.9870275)
1. [J. M. Cruz-Duarte, I. Amaya, J. C. Ortiz-Bayliss, N. Pillay. _A Transfer Learning Hyper-heuristic Approach for Automatic Tailoring of Unfolded Population-based Metaheuristics_, **2022 IEEE Congress on Evolutionary Computation (CEC)**, 2022.](https://doi.org/10.1109/CEC55065.2022.9870426)
1. [J. M. Cruz-Duarte, I. Amaya, J. C. Ortiz-Bayliss, N. Pillay. _Automated Design of Unfolded Metaheuristics and the Effect of Population Size_. **2021 IEEE Congress on Evolutionary Computation (CEC)**, 1155–1162, 2021.](https://doi.org/10.1109/CEC45853.2021.9504879)
1. [J. M. Cruz-Duarte, I. Amaya, J. C. Ortiz-Bayliss, N. Pillay. _Automated Design of Unfolded Metaheuristics and the Effect of Population Size_. **2021 IEEE Congress on Evolutionary Computation (CEC)**, 1155–1162, 2021.](https://doi.org/10.1109/CEC45853.2021.9504879)
2 changes: 1 addition & 1 deletion customhys/collections/basicmetaheuristics.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@
('swarm_dynamic', {'factor': 1.0, 'self_conf': 1.54, 'swarm_conf': 2.56, 'version': 'constriction', 'distribution': 'uniform'}, 'all')
('swarm_dynamic', {'factor': 1.5, 'self_conf': 2.54, 'swarm_conf': 2.56, 'version': 'constriction', 'distribution': 'uniform'}, 'all')
('swarm_dynamic', {'factor': 1.5, 'self_conf': 2.54, 'swarm_conf': 1.56, 'version': 'constriction', 'distribution': 'uniform'}, 'all')
('swarm_dynamic', {'factor': 1.5, 'self_conf': 1.54, 'swarm_conf': 2.56, 'version': 'constriction', 'distribution': 'uniform'}, 'all')
('swarm_dynamic', {'factor': 1.5, 'self_conf': 1.54, 'swarm_conf': 2.56, 'version': 'constriction', 'distribution': 'uniform'}, 'all')
2 changes: 1 addition & 1 deletion customhys/collections/operators_weights.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion customhys/collections/short_collection.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@
('swarm_dynamic', {'factor': 0.7, 'self_conf': 2.54, 'swarm_conf': 2.56, 'version': 'inertial', 'distribution': 'uniform'}, 'all')
('swarm_dynamic', {'factor': 0.7, 'self_conf': 2.54, 'swarm_conf': 2.56, 'version': 'inertial', 'distribution': 'uniform'}, 'greedy')
('swarm_dynamic', {'factor': 1.0, 'self_conf': 2.54, 'swarm_conf': 2.56, 'version': 'constriction', 'distribution': 'uniform'}, 'all')
('swarm_dynamic', {'factor': 1.0, 'self_conf': 2.54, 'swarm_conf': 2.56, 'version': 'constriction', 'distribution': 'uniform'}, 'greedy')
('swarm_dynamic', {'factor': 1.0, 'self_conf': 2.54, 'swarm_conf': 2.56, 'version': 'constriction', 'distribution': 'uniform'}, 'greedy')
2 changes: 1 addition & 1 deletion customhys/exconf/basic_metaheuristic.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"ex_config": {"experiment_name": "basic_metaheuristics", "experiment_type": "basic_metaheuristics", "heuristic_collection_file": "basicmetaheuristics.txt"}, "hh_config": {"cardinality": 1, "num_replicas": 30}, "prob_config": {"dimensions": [2, 5, 10, 20, 30, 40, 50], "functions": ["Ackley1", "Ackley4", "Alpine1", "Alpine2", "Bohachevsky", "Brent", "Brown", "CarromTable", "ChungReynolds", "Cigar", "CosineMixture", "CrossInTray", "CrossLegTable", "CrownedCross", "Csendes", "Deb1", "Deb2", "DeflectedCorrugatedSpring", "DixonPrice", "DropWave", "EggHolder", "Ellipsoid", "ExpandedDecreasingMinima", "ExpandedEqualMinima", "ExpandedFiveUnevenPeakTrap", "ExpandedTwoPeakTrap", "ExpandedUnevenMinima", "Exponential", "F2", "Giunta", "Griewank", "HappyCat", "HyperEllipsoid", "InvertedCosineWave", "JennrichSampson", "KTablet", "Katsuura", "Levy", "LunacekN01", "LunacekN02", "Michalewicz", "Mishra1", "Mishra2", "Mishra7", "Mishra11", "ModifiedVincent", "NeedleEye", "Pathological", "Periodic", "Perm01", "Perm02", "Pinter", "PowellSum", "Price01", "Qing", "Quartic", "Quintic", "Rana", "Rastrigin", "Ridge", "Rosenbrock", "RotatedHyperEllipsoid", "Salomon", "Sargan", "SchafferN1", "SchafferN2", "SchafferN3", "SchafferN4", "SchafferN6", "Schubert", "Schubert3", "Schubert4", "SchumerSteiglitz", "Schwefel", "Schwefel12", "Schwefel204", "Schwefel220", "Schwefel221", "Schwefel222", "Schwefel223", "Schwefel225", "Schwefel226", "Sphere", "Step", "Step2", "Step3", "StepInt", "Stochastic", "StrechedVSineWave", "StyblinskiTang", "SumSquares", "Trid", "Trigonometric1", "Trigonometric2", "TypeI", "TypeII", "Vincent", "WWavy", "Weierstrass", "Whitley", "XinSheYang1", "XinSheYang2", "XinSheYang3", "XinSheYang4", "YaoLiu09", "Zakharov", "ZeroSum"]}}
{"ex_config": {"experiment_name": "basic_metaheuristics", "experiment_type": "basic_metaheuristics", "heuristic_collection_file": "basicmetaheuristics.txt"}, "hh_config": {"cardinality": 1, "num_replicas": 30}, "prob_config": {"dimensions": [2, 5, 10, 20, 30, 40, 50], "functions": ["Ackley1", "Ackley4", "Alpine1", "Alpine2", "Bohachevsky", "Brent", "Brown", "CarromTable", "ChungReynolds", "Cigar", "CosineMixture", "CrossInTray", "CrossLegTable", "CrownedCross", "Csendes", "Deb1", "Deb2", "DeflectedCorrugatedSpring", "DixonPrice", "DropWave", "EggHolder", "Ellipsoid", "ExpandedDecreasingMinima", "ExpandedEqualMinima", "ExpandedFiveUnevenPeakTrap", "ExpandedTwoPeakTrap", "ExpandedUnevenMinima", "Exponential", "F2", "Giunta", "Griewank", "HappyCat", "HyperEllipsoid", "InvertedCosineWave", "JennrichSampson", "KTablet", "Katsuura", "Levy", "LunacekN01", "LunacekN02", "Michalewicz", "Mishra1", "Mishra2", "Mishra7", "Mishra11", "ModifiedVincent", "NeedleEye", "Pathological", "Periodic", "Perm01", "Perm02", "Pinter", "PowellSum", "Price01", "Qing", "Quartic", "Quintic", "Rana", "Rastrigin", "Ridge", "Rosenbrock", "RotatedHyperEllipsoid", "Salomon", "Sargan", "SchafferN1", "SchafferN2", "SchafferN3", "SchafferN4", "SchafferN6", "Schubert", "Schubert3", "Schubert4", "SchumerSteiglitz", "Schwefel", "Schwefel12", "Schwefel204", "Schwefel220", "Schwefel221", "Schwefel222", "Schwefel223", "Schwefel225", "Schwefel226", "Sphere", "Step", "Step2", "Step3", "StepInt", "Stochastic", "StrechedVSineWave", "StyblinskiTang", "SumSquares", "Trid", "Trigonometric1", "Trigonometric2", "TypeI", "TypeII", "Vincent", "WWavy", "Weierstrass", "Whitley", "XinSheYang1", "XinSheYang2", "XinSheYang3", "XinSheYang4", "YaoLiu09", "Zakharov", "ZeroSum"]}}
2 changes: 1 addition & 1 deletion customhys/exconf/brute_force.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"ex_config": {"experiment_name": "brute_force", "experiment_type": "brute_force", "heuristic_collection_file": "default.txt"}, "hh_config": {"cardinality": 1, "num_replicas": 30}, "prob_config": {"dimensions": [2, 5, 10, 20, 30, 40, 50], "functions": ["Ackley1", "Ackley4", "Alpine1", "Alpine2", "Bohachevsky", "Brent", "Brown", "CarromTable", "ChungReynolds", "Cigar", "CosineMixture", "CrossInTray", "CrossLegTable", "CrownedCross", "Csendes", "Deb1", "Deb2", "DeflectedCorrugatedSpring", "DixonPrice", "DropWave", "EggHolder", "Ellipsoid", "ExpandedDecreasingMinima", "ExpandedEqualMinima", "ExpandedFiveUnevenPeakTrap", "ExpandedTwoPeakTrap", "ExpandedUnevenMinima", "Exponential", "F2", "Giunta", "Griewank", "HappyCat", "HyperEllipsoid", "InvertedCosineWave", "JennrichSampson", "KTablet", "Katsuura", "Levy", "LunacekN01", "LunacekN02", "Michalewicz", "Mishra1", "Mishra2", "Mishra7", "Mishra11", "ModifiedVincent", "NeedleEye", "Pathological", "Periodic", "Perm01", "Perm02", "Pinter", "PowellSum", "Price01", "Qing", "Quartic", "Quintic", "Rana", "Rastrigin", "Ridge", "Rosenbrock", "RotatedHyperEllipsoid", "Salomon", "Sargan", "SchafferN1", "SchafferN2", "SchafferN3", "SchafferN4", "SchafferN6", "Schubert", "Schubert3", "Schubert4", "SchumerSteiglitz", "Schwefel", "Schwefel12", "Schwefel204", "Schwefel220", "Schwefel221", "Schwefel222", "Schwefel223", "Schwefel225", "Schwefel226", "Sphere", "Step", "Step2", "Step3", "StepInt", "Stochastic", "StrechedVSineWave", "StyblinskiTang", "SumSquares", "Trid", "Trigonometric1", "Trigonometric2", "TypeI", "TypeII", "Vincent", "WWavy", "Weierstrass", "Whitley", "XinSheYang1", "XinSheYang2", "XinSheYang3", "XinSheYang4", "YaoLiu09", "Zakharov", "ZeroSum"]}}
{"ex_config": {"experiment_name": "brute_force", "experiment_type": "brute_force", "heuristic_collection_file": "default.txt"}, "hh_config": {"cardinality": 1, "num_replicas": 30}, "prob_config": {"dimensions": [2, 5, 10, 20, 30, 40, 50], "functions": ["Ackley1", "Ackley4", "Alpine1", "Alpine2", "Bohachevsky", "Brent", "Brown", "CarromTable", "ChungReynolds", "Cigar", "CosineMixture", "CrossInTray", "CrossLegTable", "CrownedCross", "Csendes", "Deb1", "Deb2", "DeflectedCorrugatedSpring", "DixonPrice", "DropWave", "EggHolder", "Ellipsoid", "ExpandedDecreasingMinima", "ExpandedEqualMinima", "ExpandedFiveUnevenPeakTrap", "ExpandedTwoPeakTrap", "ExpandedUnevenMinima", "Exponential", "F2", "Giunta", "Griewank", "HappyCat", "HyperEllipsoid", "InvertedCosineWave", "JennrichSampson", "KTablet", "Katsuura", "Levy", "LunacekN01", "LunacekN02", "Michalewicz", "Mishra1", "Mishra2", "Mishra7", "Mishra11", "ModifiedVincent", "NeedleEye", "Pathological", "Periodic", "Perm01", "Perm02", "Pinter", "PowellSum", "Price01", "Qing", "Quartic", "Quintic", "Rana", "Rastrigin", "Ridge", "Rosenbrock", "RotatedHyperEllipsoid", "Salomon", "Sargan", "SchafferN1", "SchafferN2", "SchafferN3", "SchafferN4", "SchafferN6", "Schubert", "Schubert3", "Schubert4", "SchumerSteiglitz", "Schwefel", "Schwefel12", "Schwefel204", "Schwefel220", "Schwefel221", "Schwefel222", "Schwefel223", "Schwefel225", "Schwefel226", "Sphere", "Step", "Step2", "Step3", "StepInt", "Stochastic", "StrechedVSineWave", "StyblinskiTang", "SumSquares", "Trid", "Trigonometric1", "Trigonometric2", "TypeI", "TypeII", "Vincent", "WWavy", "Weierstrass", "Whitley", "XinSheYang1", "XinSheYang2", "XinSheYang3", "XinSheYang4", "YaoLiu09", "Zakharov", "ZeroSum"]}}
2 changes: 1 addition & 1 deletion customhys/exconf/demo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"ex_config": {"experiment_name": "demo_test", "experiment_type": "default", "heuristic_collection_file": "default.txt", "weights_dataset_file": "operators_weights.json"}, "hh_config": {"cardinality": 3, "num_replicas": 30}, "prob_config": {"dimensions": [2, 5], "functions": ["<choose_randomly>"]}}
{"ex_config": {"experiment_name": "demo_test", "experiment_type": "default", "heuristic_collection_file": "default.txt", "weights_dataset_file": "operators_weights.json"}, "hh_config": {"cardinality": 3, "num_replicas": 30}, "prob_config": {"dimensions": [2, 5], "functions": ["<choose_randomly>"]}}
2 changes: 1 addition & 1 deletion customhys/exconf/demo_neural_network.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"save_model": false,
"memory_length": 60,
"encoder" : "default",
"epochs": 10,
"epochs": 10,
"model_architecture": "LSTM",
"model_architecture_layers": [
[20, "sigmoid", "LSTM"]
Expand Down
2 changes: 1 addition & 1 deletion customhys/exconf/long1.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"ex_config": {"experiment_name": "long_test", "experiment_type": "default", "heuristic_collection_file": "test-set-21.txt", "auto_collection_num_vals": 21}, "hh_config": {"cardinality": 3, "num_replicas": 50}, "prob_config": {"dimensions": [2, 5, 10, 20, 30, 40, 50], "functions": ["Ackley1", "Ackley4", "Alpine1", "Alpine2", "Bohachevsky", "Brent", "Brown", "CarromTable", "ChungReynolds", "Cigar", "CosineMixture", "CrossInTray", "CrossLegTable", "CrownedCross", "Csendes", "Deb1", "Deb2", "DeflectedCorrugatedSpring", "DixonPrice", "DropWave", "EggHolder", "Ellipsoid", "ExpandedDecreasingMinima", "ExpandedEqualMinima", "ExpandedFiveUnevenPeakTrap", "ExpandedTwoPeakTrap", "ExpandedUnevenMinima", "Exponential", "F2", "Giunta", "Griewank", "HappyCat", "HyperEllipsoid", "InvertedCosineWave", "JennrichSampson", "KTablet", "Katsuura", "Levy", "LunacekN01", "LunacekN02", "Michalewicz", "Mishra1", "Mishra2", "Mishra7", "Mishra11", "ModifiedVincent", "NeedleEye", "Pathological", "Periodic", "Perm01", "Perm02", "Pinter", "PowellSum", "Price01", "Qing", "Quartic", "Quintic", "Rana", "Rastrigin", "Ridge", "Rosenbrock", "RotatedHyperEllipsoid", "Salomon", "Sargan", "SchafferN1", "SchafferN2", "SchafferN3", "SchafferN4", "SchafferN6", "Schubert", "Schubert3", "Schubert4", "SchumerSteiglitz", "Schwefel", "Schwefel12", "Schwefel204", "Schwefel220", "Schwefel221", "Schwefel222", "Schwefel223", "Schwefel225", "Schwefel226", "Sphere", "Step", "Step2", "Step3", "StepInt", "Stochastic", "StrechedVSineWave", "StyblinskiTang", "SumSquares", "Trid", "Trigonometric1", "Trigonometric2", "TypeI", "TypeII", "Vincent", "WWavy", "Weierstrass", "Whitley", "XinSheYang1", "XinSheYang2", "XinSheYang3", "XinSheYang4", "YaoLiu09", "Zakharov", "ZeroSum"]}}
{"ex_config": {"experiment_name": "long_test", "experiment_type": "default", "heuristic_collection_file": "test-set-21.txt", "auto_collection_num_vals": 21}, "hh_config": {"cardinality": 3, "num_replicas": 50}, "prob_config": {"dimensions": [2, 5, 10, 20, 30, 40, 50], "functions": ["Ackley1", "Ackley4", "Alpine1", "Alpine2", "Bohachevsky", "Brent", "Brown", "CarromTable", "ChungReynolds", "Cigar", "CosineMixture", "CrossInTray", "CrossLegTable", "CrownedCross", "Csendes", "Deb1", "Deb2", "DeflectedCorrugatedSpring", "DixonPrice", "DropWave", "EggHolder", "Ellipsoid", "ExpandedDecreasingMinima", "ExpandedEqualMinima", "ExpandedFiveUnevenPeakTrap", "ExpandedTwoPeakTrap", "ExpandedUnevenMinima", "Exponential", "F2", "Giunta", "Griewank", "HappyCat", "HyperEllipsoid", "InvertedCosineWave", "JennrichSampson", "KTablet", "Katsuura", "Levy", "LunacekN01", "LunacekN02", "Michalewicz", "Mishra1", "Mishra2", "Mishra7", "Mishra11", "ModifiedVincent", "NeedleEye", "Pathological", "Periodic", "Perm01", "Perm02", "Pinter", "PowellSum", "Price01", "Qing", "Quartic", "Quintic", "Rana", "Rastrigin", "Ridge", "Rosenbrock", "RotatedHyperEllipsoid", "Salomon", "Sargan", "SchafferN1", "SchafferN2", "SchafferN3", "SchafferN4", "SchafferN6", "Schubert", "Schubert3", "Schubert4", "SchumerSteiglitz", "Schwefel", "Schwefel12", "Schwefel204", "Schwefel220", "Schwefel221", "Schwefel222", "Schwefel223", "Schwefel225", "Schwefel226", "Sphere", "Step", "Step2", "Step3", "StepInt", "Stochastic", "StrechedVSineWave", "StyblinskiTang", "SumSquares", "Trid", "Trigonometric1", "Trigonometric2", "TypeI", "TypeII", "Vincent", "WWavy", "Weierstrass", "Whitley", "XinSheYang1", "XinSheYang2", "XinSheYang3", "XinSheYang4", "YaoLiu09", "Zakharov", "ZeroSum"]}}
Loading