Skip to content

Commit

Permalink
Merge pull request #390 from AlesGartner/lshade
Browse files Browse the repository at this point in the history
L-SHADE implementation
  • Loading branch information
firefly-cpp committed Aug 29, 2022
2 parents 2def574 + 25704ba commit b0cad88
Show file tree
Hide file tree
Showing 7 changed files with 637 additions and 7 deletions.
Binary file modified .testmondata
Binary file not shown.
13 changes: 7 additions & 6 deletions Algorithms.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ Harris hawks optimization |HHO| Heidari et al. "Harris hawks optimization:

## Modified algorithms

|Full name |Acronym|Reference |
|------------------------------------|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|Hybrid Bat Algorithm |HBA | Fister Jr., Iztok and Fister, Dusan and Yang, Xin-She. "A Hybrid Bat Algorithm". Elektrotehniski vestnik, 2013. 1-7. |
|Hybrid self-adaptive bat algorithm |HSABA | Fister Jr., I, Fong, S., Brest, J., Fister, I. "A novel hybrid self-adaptive bat algorithm." The Scientific World Journal 2014 (2014).|
|Self-adaptive differential evolution|jDE |Brest, J., Greiner, S., Boskovic, B., Mernik, M., Zumer, V. Self-adapting control parameters in differential evolution: A comparative study on numerical benchmark problems. IEEE transactions on evolutionary computation, 10(6), 646-657, 2006.|
|Parameter-free bat algorithm|PLBA |Iztok Fister Jr., Iztok Fister, Xin-She Yang. Towards the development of a parameter-free bat algorithm . In: FISTER Jr., Iztok (Ed.), BRODNIK, Andrej (Ed.). StuCoSReC : proceedings of the 2015 2nd Student Computer Science Research Conference. Koper: University of Primorska, 2015, pp. 31-34.|
|Full name |Acronym|Reference |
|-------------------------------------------------------|-------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|Hybrid Bat Algorithm |HBA |Fister Jr., Iztok and Fister, Dusan and Yang, Xin-She. "A Hybrid Bat Algorithm". Elektrotehniski vestnik, 2013. 1-7. |
|Hybrid self-adaptive bat algorithm |HSABA |Fister Jr., I, Fong, S., Brest, J., Fister, I. "A novel hybrid self-adaptive bat algorithm." The Scientific World Journal 2014 (2014). |
|Self-adaptive differential evolution |jDE |Brest, J., Greiner, S., Boskovic, B., Mernik, M., Zumer, V. Self-adapting control parameters in differential evolution: A comparative study on numerical benchmark problems. IEEE transactions on evolutionary computation, 10(6), 646-657, 2006. |
|Success-history based adaptive differential evolution |SHADE |Ryoji Tanabe and Alex Fukunaga: Improving the Search Performance of SHADE Using Linear Population Size Reduction, Proc. IEEE Congress on Evolutionary Computation (CEC-2014), Beijing, July, 2014. |
|Parameter-free bat algorithm |PLBA |Iztok Fister Jr., Iztok Fister, Xin-She Yang. Towards the development of a parameter-free bat algorithm . In: FISTER Jr., Iztok (Ed.), BRODNIK, Andrej (Ed.). StuCoSReC : proceedings of the 2015 2nd Student Computer Science Research Conference. Koper: University of Primorska, 2015, pp. 31-34.|

## Other algorithms

Expand Down
20 changes: 20 additions & 0 deletions examples/run_shade.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# encoding=utf8
# This is temporary fix to import module from parent folder
# It will be removed when package is published on PyPI
import sys

sys.path.append('../')
# End of fix

from niapy.algorithms.modified import SuccessHistoryAdaptiveDifferentialEvolution
from niapy.task import Task
from niapy.problems import Griewank

# we will run SHADE algorithm for 5 independent runs
algo = SuccessHistoryAdaptiveDifferentialEvolution(population_size=20, extern_arc_rate=2.0, pbest_factor=0.2,
hist_mem_size=5)
for i in range(5):
task = Task(problem=Griewank(dimension=10, lower=-600, upper=600), max_evals=10000, enable_logging=True)
best = algo.run(task)
print('%s -> %s' % (best[0], best[1]))
print(algo.get_parameters())
8 changes: 7 additions & 1 deletion niapy/algorithms/modified/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
AdaptiveBatAlgorithm,
SelfAdaptiveBatAlgorithm
)
from niapy.algorithms.modified.shade import (
SuccessHistoryAdaptiveDifferentialEvolution,
LpsrSuccessHistoryAdaptiveDifferentialEvolution
)

__all__ = [
'HybridBatAlgorithm',
Expand All @@ -38,5 +42,7 @@
'AdaptiveBatAlgorithm',
'SelfAdaptiveBatAlgorithm',
'HybridSelfAdaptiveBatAlgorithm',
'ParameterFreeBatAlgorithm'
'ParameterFreeBatAlgorithm',
'SuccessHistoryAdaptiveDifferentialEvolution',
'LpsrSuccessHistoryAdaptiveDifferentialEvolution'
]

0 comments on commit b0cad88

Please sign in to comment.