Skip to content

Qiita投稿用に作成した最適化アルゴリズムの実装コードです。

License

Notifications You must be signed in to change notification settings

pocokhc/metaheuristics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

最適化アルゴリズム(主にメタヒューリスティクス)の実装コード

以下Qiita記事の実装コードとなります。 コードの解説については記事を参照してください。

実装アルゴリズム

  • 遺伝的アルゴリズム(Genetic Algorithm: GA)
  • 実数型遺伝的アルゴリズム
    • GA BLX-α
    • GA SPX
  • 人口蜂コロニーアルゴリズム(Artificial Bee Colony: ABC)
  • 粒子群最適化(Particle Swarm Optimization: PSO)
  • ホタルアルゴリズム(Firefly Algorithm)
  • コウモリアルゴリズム(Bat Algorithm)
  • カッコウ探索(Cucko Search)
  • ハーモニーサーチ(Harmony Search)
  • くじらさんアルゴリズム(The Whale Optimization Algorithm: WOA)
  • 差分進化(Differential Evolution: DE)
  • タブーサーチ(Tabu Search)

実装問題

Getting started

1. pip install

使っているパッケージは以下です。

  • pip install numpy
  • pip install matplotlib
  • pip install joblib
  • pip install pandas
  • pip install optuna

2. download

このレポジトリをダウンロードします。

> git clone https://github.com/pocokhc/metaheuristics.git

3. Run the program

examples にいくつか実行例が入っています。

> cd metaheuristics/examples

# 全問題と全アルゴリズムに対して探索を実行します
> python main.py

# 1次元と2次元を設定できる問題について、各アルゴリズムの探索過程をgif出力します
> python train_plot.py

# 1次元と2次元を設定できる問題について、結果を画像出力します
> python function_plot.py

# TSPを簡単に探索した結果を出力します
> python plot_TSP.py

About

Qiita投稿用に作成した最適化アルゴリズムの実装コードです。

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages