計算時間の短縮 - 知的システムデザイン研究室

Download Report

Transcript 計算時間の短縮 - 知的システムデザイン研究室

並列分散遺伝的アルゴリズムの有効性
学績番号 36980705
畠中 一幸
知的システムデザイン研究室
Intelligent Systems Design Laboratory
Intelligent Systems Design Laboratory,Doshisha University
講演内容
•最適化と遺伝的アルゴリズム
•並列分散遺伝的アルゴリズム
•計算時間の短縮
•解探索過程の比較
•環境分散遺伝的アルゴリズム
•結論
Intelligent Systems Design Laboratory,Doshisha University
最適化とは
問題解決のために,選択肢の中から
最も良いと思われる方法を選ぶこと
Ex. 携帯電話の料金プラン,最短経路探索
Intelligent Systems Design Laboratory,Doshisha University
従来の手法による最適化
目的関数の
傾きを利用
頂点が増える
最適化困難
Intelligent Systems Design Laboratory,Doshisha University
生物の進化
生物は長い年月を経るうちに,
環境に適合するように進化してきた.
有性生殖により
生まれた子供は
両親の特徴を
併せ持つ
突然変異
交叉
自然淘汰
遺伝子の
コピーミスが
起こる
優れた個体ほど
子孫を残しやすい
Intelligent Systems Design Laboratory,Doshisha University
GAによる最適化
評価
1
1
2
2
遺伝的操作
選択
GAの特徴
Intelligent Systems Design Laboratory,Doshisha University
•傾きを利用しない
•確率的多点探索
問題点
•計算時間が膨大
•局所解への収束
•パラメータ設定
解決策
並列分散化
従来のGA
Intelligent Systems Design Laboratory,Doshisha University
遅い
並列分散GA
速い
Intelligent Systems Design Laboratory,Doshisha University
並列分散GAにおける移住
分割母集団間での個体の交換操作
1世代
n 世代
2n 世代
•移住間隔
•移住率
Intelligent Systems Design Laboratory,Doshisha University
対象問題
目的
5kN
総体積の最小化
節点4と6に10kNの水平荷重
節点1と2は単純支持
制約条件
•6番節点の変位が臨界値以内
•各部材が座屈破壊を起こさない
•引張応力が臨界値以内
5kN
Intelligent Systems Design Laboratory,Doshisha University
計算条件
比較項目
分割数が2n個のGAに対し,
10試行の試行平均で比較.
パラメータ
個体数
終了条件
選択
交叉方法
交叉率
突然変異率
320個体
500世代
ルーレット選択+エリート保存
一点交叉
60%
遺伝子長の1
Intelligent Systems Design Laboratory,Doshisha University
計算時間の短縮
120
Average time
Ideal time
100
60
3
x10 Time(s)
80
40
20
0
1
2
4
8
16
Number of Sub-populations
32
Intelligent Systems Design Laboratory,Doshisha University
初期値依存性の減少
Best
Mean
Worst
2.0
-3
3
Total Volume(x10 m )
2.1
1.9
1.8
1.7
1.6
1.5
0
5
10
15
20
25
Number of Sub-populations
30
35
Intelligent Systems Design Laboratory,Doshisha University
移住の効果
Best
Mean
Worst
2.0
-3
3
Total Volume(x10 m )
2.1
1.9
1.8
1.7
1.6
1.5
0
5
10
15
20
25
Number of Sub-populations
30
35
Intelligent Systems Design Laboratory,Doshisha University
解探索過程の比較
上位8個体の断面積分布(0世代)
4000
• SGA
• 移住なしPGA
• 隔移住ありPGA
移住間隔50世代
移住率30%
解探索過程の比較を行う
3500
3000
2
Area(mm )
同じ初期母集団に対し,
以下のGAを適用
2500
2000
1500
1000
500
0
1
3
5
Truss Member
7
9
1
78
6
4 5 Order
3
2
初期母集団の個体は
ランダムに生成されている
Intelligent Systems Design Laboratory,Doshisha University
上位8個体の断面積分布(中間世代)
2500
PGA
1500
各母集団毎に固有の
個体が生成されている
1000
500
2500
0
3
5
Truss Member
7
9
1
78
6
4 5 Order
3
2
SGA
単一母集団のため
個体の性質が似ている
2000
2
1
Area(mm )
Area(mm 2)
2000
1500
1000
500
0
1
3
5
Truss Member
7
9
1
78
6
4 5 Order
3
2
Intelligent Systems Design Laboratory,Doshisha University
最終結果(SGA)
=大域的最適解
2000
Area(mm 2)
1500
1000
1.875×10-3(m3)
500
最適解の1.25倍
0
1
3
5
Truss M em ber
7
9
78
6
45
3
O rder
2
01
変数の分布が最適解と異なり,個体同士の形状が類似
→最適解を得るには,多くの世代が必要
Intelligent Systems Design Laboratory,Doshisha University
最終結果(PGA:移住なし)
=大域的最適解
2000
Area(mm 2)
1500
1000
1.624×10-3(m3)
500
最適解の1.08倍
0
1
3
5
Truss M em ber
7
9
78
6
45
3
O rder
2
1
0
分割母集団1の解が最適解と類似
→ しかし初期値依存性の問題は残る
Intelligent Systems Design Laboratory,Doshisha University
最終結果(PGA:移住あり)
=大域的最適解
2000
Area(mm 2)
1500
1000
1.548×10-3(m3)
500
最適解の1.02倍
0
1
3
5
Truss M em ber
7
9
78
6
45
3
O rder
2
1
0
どの分割母集団においても
最適解に非常に類似した解が得られている
Intelligent Systems Design Laboratory,Doshisha University
環境分散遺伝的アルゴリズム
適切なパラメータ設定に関する問題
•GAの探索パフォーマンスは,
パラメータ設定に大きく影響される.
•最適なパラメータ設定は問題によって異なる
環境分散アルゴリズム
を提案
DGA,SGA,との比較により,有効性を検証
Intelligent Systems Design Laboratory,Doshisha University
パラメータ設定に関する予備実験
Crossover
Rate
Mutation Rate
0.1/L
0.3
0.3
0.1/L
1/L
0.3
1/L
10/L
0.3
10/L
0.6
0.6
0.1/L
1.0
1.0
0.1/L
0.6
1/L
1.0
1/L
0.6
10/L
1.0
10/L
注)
L は個体長
9つのパラメータ設定
をSGAとDGAに適用
パラメータ設定が,
解探索に与える影響
をしらべる
Intelligent Systems Design Laboratory,Doshisha University
適合度の履歴(SGA)
1.8
0.3 - 0.1/L
0.6 - 0.1/L
1.0 - 0.1/L
0.3 - 1/L
0.6 - 1/L
1.0 - 1/L
0.3 - 10/L
0.6 - 10/L
1.0 - 10/L
Fitness Value
1.6
1.4
1.2
1.0
0
200
400
600
Number of Generations
800
1000
Intelligent Systems Design Laboratory,Doshisha University
適合度の履歴(DGA)
1.8
0.3 - 0.1/L
0.6 - 0.1/L
1.0 - 0.1/L
0.3 - 1/L
0.6 - 1/L
1.0 - 1/L
0.3 - 10/L
0.6 - 10/L
1.0 - 10/L
Fitness Value
1.6
1.4
1.2
1.0
0
200
400
600
Number of Generations
800
1000
Intelligent Systems Design Laboratory,Doshisha University
分散GAの効果
1.8
0.3 - 0.1/L
0.6 - 01/L
1.0 - 0.1/L
0.3 - 1/L
0.6 - 1/L
1.0 - 1/L
0.3 - 10/L
0.6 - 10/L
1.0 - 10/L
Fitness Value
1.6
1.4
1.2
1
SGA
DGA
パラメータ設定が等しけ
れば,DGAが良い
しかしながら,
パラメータ設定の
問題は残る
Intelligent Systems Design Laboratory,Doshisha University
環境分散遺伝的アルゴリズム
従来のDGA
環境分散GA
Intelligent Systems Design Laboratory,Doshisha University
環境分散GAの効果
1.8
Fitness Value
1.6
Best = 1.74
Avg.
1.58
Best = 1.78
1.75
Avg.
1.70
0.3 - 0.1/L
0.6 - 01/L
1.0 - 0.1/L
0.3 - 1/L
0.6 - 1/L
1.0 - 1/L
0.3 - 10/L
0.6 - 10/L
1.0 - 10/L
DEGA
Worst = 1.58
1.4
Worst = 1.38
1.2
1
SGA
DGA
DEGA
Intelligent Systems Design Laboratory,Doshisha University
結 論
制約条件付き最適化問題に
SGAと並列分散GAを適用することにより,
以下のことがらが判明した.
•並列処理を行うことにより,計算時間が短縮した.
•母集団を分割し移住を行うことで
解の品質と信頼性が向上した.
•環境分散GAは最適な交叉率,
突然変異率が不明な場合に有効
Intelligent Systems Design Laboratory,Doshisha University
今後の課題
• 総個体数と分割数.
– 効率的に探索を行うにはどうすれば良いのか.
• 適切な移住スキームの提案.
– 「いつ」,「どこで」,「どのような個体」と行うのか.
• 分割母集団での役割分担
– 選択方法や,交叉方法を各母集団で変化させる.
Intelligent Systems Design Laboratory,Doshisha University
論文リスト
1.三木光範, 畠中一幸: 分散並列GAによる計算時間の短縮と最適解の高品質化, 第10回超並
列計算研究会, (1998).
2.三木光範, 畠中一幸: 並列分散GAによる計算時間の短縮と解の高品質化, 日本機械学会
[No.98-14], 第3回最適化シンポジウム講演論文集, pp..59-64, (1998).
3.Mitsunori MIKI, Tomoyuki HIROYASU and Kazuyuki HATANAKA: Parallel Genetic
Algorithms with Distributed-Environment Multiple Population Scheme,Proc. 3rd World
Congress of Structural and Multidisciplinary Optimization (WCSMO), Vol. 1, pp.186-191,(1999).
4.三木光範, 廣安知之, 金子美華,畠中一幸: 環境分散型並列遺伝的アルゴリズム, 電子情報
通信学会電子情報通信学会技術研究報告 AI99011~21, pp.87-94,(1999).
5.畠中一幸, 三木光範, 廣安知之: 分割母集団GAにおける移住間隔の最適化, 日本機械学会,
(1999).
6.畠中一幸:並列分散遺伝的アルゴリズム,第1回 同志社大学工学部並列研究会, (1999).
7.三木光範,廣安知之,金子美華,畠中一幸:環境分散遺伝的アルゴリズムにおける探索メカニズ
ム, 情報処理学会 99年度秋期全国大会, (1999).
8.Mitsunori MIKI, Tomoyuki HIROYASU, Mika KANEKO and Kazuyuki HATANAKA:
A Parallel Genetic Algorithm with Distributed Environment Scheme,IEEE Proceedings of
Systems, Man and Cybernetics Conference SMC'99, (1999) , pp.695-700 (1999).
Intelligent Systems Design Laboratory,Doshisha University
Appendix
補 足 資 料
Intelligent Systems Design Laboratory,Doshisha University
最適化問題の定式化
目的関数
F (x)  min
設計変数
x  ( x1, x2 ,, xn )
制約条件
xS
Intelligent Systems Design Laboratory,Doshisha University
従来の最適化手法
線形計画法
非線形計画法
長所: 高速
短所: 勾配の評価,初期値依存性
Intelligent Systems Design Laboratory,Doshisha University
確率的戦略
長所: 初期値依存性が無い,勾配の評価が不要
短所: 計算コストが高い
モンテカルロ法
ランダム
遺伝的アルゴリズム
シミュレーテッドアニーリング
重点的
Intelligent Systems Design Laboratory,Doshisha University
進化的戦略
生物の営みの一部を工学的にモデル化した手法
遺伝的アルゴリズム(Genetic Algorithms:GA)
遺伝的プログラミング(Genetic Programming:GP),
進化戦略(Evolutionary Strategy:ES)
進化的プログラミング(Evolutionary Programming:EP),
クラシファイアシステム(Classify System)
ニューラルネットワーク(Neural Network:NN),
セルラーオートマトン(Cellar Automata:CA),
シミュレーテッドアニーリング(Simulated Annealing:SA)も,
進化戦略との類似性が高い.
これらの方法を用いた最適化手法の特徴は,
目的関数の感度を用いない点である.
Intelligent Systems Design Laboratory,Doshisha University
遺伝的アルゴリズム
生物の進化を工学的にモデル化した手法
J.H.Holland:
Adaptation In Natural and Artificial Systems,
University of Michigan Press,(1975).
D.E.Goldberg:
Genetic Algorithms in Search Optimization and Machine Leraning.
Addison-Wesley,Reading,Mass. (1989).
海外
1985
1990
1994
1999
国内
ICGA: International Conference on Genetic Algorithms
PPSN: International Conference on Parallel Problem Solving from Nature
ICEC: International Conference on Evolutionary Computation
GECCO:
人工知能学会,情報処理学会,日本ファジィ学会等
Intelligent Systems Design Laboratory,Doshisha University
大規模並列化モデル
単一母集団を使用
個体の評価を並列に行う
共有メモリ型の
並列計算機向き
Intelligent Systems Design Laboratory,Doshisha University
粗粒度並列化モデル
母集団を
複数のサブ母集団に分割
「移住」と言う解交換を行う.
Intelligent Systems Design Laboratory,Doshisha University
細粒度並列化モデル
プロセッサ1つに
1つまたは比較的少数の個体
解交換は近傍のみ
計算効率は優れているが,
距離の離れたプロセッサ間での
情報交換が行えない
Intelligent Systems Design Laboratory,Doshisha University
Performance of DEGA
1.8
0.3 - 0.1/L
0.6 - 0.1/L
1.0 - 0.1/L
0.3 - 1/L
0.6 - 1/L
1.0 - 1/L
0.3 - 10/L
0.6 - 10/L
1.0 - 10/L
DEGA
Fitness Value
1.6
1.4
1.2
1.0
0
200
400
600
Number of Generations
800
1000
Intelligent Systems Design Laboratory,Doshisha University
パラメータ設定の影響(SGA)
Mutation Rate
1.8
0.1/L
1/L
10/L
Fitness Value
1.7
1.6
1.5
1.4
1.3
SGA 270
SGA 2430
1.2
0.3 0.6 1.0
0.3 0.6 1.0
Crossover Rate
0.3 0.6 1.0
Intelligent Systems Design Laboratory,Doshisha University
パラメータ設定の影響(DGA)
Mutation Rate
1.8
0.1/L
1/L
10/L
Fitness Value
1.7
1.6
1.5
1.4
DGA 270
1.3
DGA 2430
1.2
0.3 0.6 1.0
0.3 0.6 1.0
Crossover Rate
0.3 0.6 1.0
Intelligent Systems Design Laboratory,Doshisha University
環境分散遺伝的アルゴリズム
分割母集団毎に,
異なる突然変異率と,
交叉率を設定
Intelligent Systems Design Laboratory,Doshisha University
最適解の形状
5kN
5kN
Intelligent Systems Design Laboratory,Doshisha University
Rastrigin関数
n

f ( x1 ,・・・ , xn )  10n   x  10 cos(2xi )
i 1
2
i
5.12  xi  5.12
-2.5

5-5
2.5
0
-2.5
0
2.5
-5
5
80
60
特徴
•多峰性関数
•設計変数間に依存関係が無い
( x1 ,, xn )  (0,,0)
で最小値0となる
40
20
0
Intelligent Systems Design Laboratory,Doshisha University
Rosenbrock関数
n

f ( x1 ,・・・ , xn )   100( x1  xi 2 )  ( xi  1) 2
i 1

2.047  xi  2.048
2000
特徴
1000
•単峰性関数
•設計変数間に強い依存関係がある
-2
0
-2
-1
-1
0
( x1 ,, xn )  (1,,1)
で最小値0となる
0
1
1
2
2
Intelligent Systems Design Laboratory,Doshisha University
移住間隔の最適化
初期段階
分離された母集団の
独立性を高めることが重要
収束段階
分割母集団全体で
良好な解の交換が必要
移住間隔
大
移住間隔
小
移住間隔を解探索の進行と共に減少させる方法を提案
Intelligent Systems Design Laboratory,Doshisha University
提案手法の効果(Rastrigin)
Number of Generations
0
200
400
600
800
1000
0
Fitness value
-1
1
5
10
50
100
∞
SGA
Variable
-2
-3
-4
-5
100
50
10
5
1
Intelligent Systems Design Laboratory,Doshisha University
提案手法の効果(Rosenbrock)
Number of Generations
0
200
400
600
800
1000
Fitness value
0
-0.1
1
5
10
50
100
∞
SGA
Variable
-0.2
-0.3
-0.4
-0.5
100
50
10
5
1
Intelligent Systems Design Laboratory,Doshisha University
提案手法の効果(トラス構造物)
Number of Generations
0
200
400
600
800
1000
1.8
Fitness value
1.76
1.72
1.68
1
10
100
SGA
1.64
1.6
100
50
10
5
50
∞
Variable
5
1
Intelligent Systems Design Laboratory,Doshisha University
適合度の履歴(SGA:pop.2430)
1.8
Fitness Value
1.6
0.3 - 0.1/L
0.6 - 0.1/L
1.0 - 0.1/L
0.3 - 1/L
0.6 - 1/L
1.0 - 1/L
0.3 - 10/L
0.6 - 10/L
1.0 - 10/L
1.4
1.2
1.0
0
200
400
600
Number of Generations
800
1000
Intelligent Systems Design Laboratory,Doshisha University