JP2004355220A - Search time shortening system, search time shortening method, and program thereof - Google Patents
Search time shortening system, search time shortening method, and program thereof Download PDFInfo
- Publication number
- JP2004355220A JP2004355220A JP2003150742A JP2003150742A JP2004355220A JP 2004355220 A JP2004355220 A JP 2004355220A JP 2003150742 A JP2003150742 A JP 2003150742A JP 2003150742 A JP2003150742 A JP 2003150742A JP 2004355220 A JP2004355220 A JP 2004355220A
- Authority
- JP
- Japan
- Prior art keywords
- individuals
- generations
- genetic
- generation
- individual
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
- 238000000034 method Methods 0.000 title claims abstract description 24
- 238000004904 shortening Methods 0.000 title claims abstract description 7
- 230000002068 genetic effect Effects 0.000 claims abstract description 110
- 238000011156 evaluation Methods 0.000 claims abstract description 69
- 238000005457 optimization Methods 0.000 claims abstract description 10
- 238000003860 storage Methods 0.000 claims description 18
- 230000035772 mutation Effects 0.000 claims description 11
- 238000010353 genetic engineering Methods 0.000 claims description 8
- 108090000623 proteins and genes Proteins 0.000 abstract description 14
- 230000008569 process Effects 0.000 description 6
- 230000003203 everyday effect Effects 0.000 description 3
- 239000000203 mixture Substances 0.000 description 3
- 238000007796 conventional method Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000009826 distribution Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 239000000470 constituent Substances 0.000 description 1
- 230000010429 evolutionary process Effects 0.000 description 1
Images
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
Description
【0001】
【発明の属する技術分野】
本発明は遺伝的アルゴリズムを使用した組合せ最適化問題に関し、特に初期世代においては、一部の個体数で遺伝的アルゴリズムの適用をはじめ、途中の世代から残りの個体を投入することで従来の遺伝的アルゴリズムと同等の精度を持ちながらも最適解を得るまでの処理時間が短時間である遺伝的アルゴリズムにおける最適解探索時間短縮化システム、探索時間短縮化方法及びそのプログラムに関する。
【0002】
【従来の技術】
組合せ最適化問題においては、比較的短時間で最適解を求める手法の一つとして、生物の進化過程をモデルとした計算手法、遺伝的アルゴリズムが用いられることが多い。
【0003】
遺伝的アルゴリズムは、個体を構成する要素の組合せを遺伝子で表し、その遺伝子を持つ個体に対して遺伝的操作(選択・淘汰、交叉、突然変異、個体生成)を繰り返すことで1または複数の最適解の探索を行う手法である。
【0004】
遺伝的操作のうちの選択・淘汰は、次の世代にどのような個体を残し、どのような個体を無くしていくかを決めるもので、評価値の高い個体を残すのが良い解を求めるのための原則ではあるが、最も評価値の高い個体を残す、ランダムに選択した個体を残す、複数の方法を組み合わせる等の方法がある。
【0005】
交叉は、2つの個体を選択し、ランダムな位置で区切って個体を構成する要素(遺伝子)を交換する。
【0006】
突然変異は、1つの個体でランダムに選択した2箇所の遺伝子を入れ替える等の操作をし、交叉では行えないような変換を行う。
【0007】
個体生成は、選択・淘汰、交叉、突然変異を行った個体を次の世代として生成するものである。
【0008】
このようにして遺伝的操作を対象とする個体に対して複数世代実行する。
【0009】
以上のように操作した個々の個体ついて、環境への適応状態の評価を行い、個々の個体に評価値を設定する。これを指定した世代数または、指定した評価値(しきい値)になるまで繰り返し実行を行うものである。
【0010】
尚、本発明に関連する文献として、遺伝的アルゴリズムによる最適解の探索の効率化に関し、個体を表現する文字列に対して各文字位置ごとに文字分布を定め、その文字分布をもとに各文字ごとに乱雑度を求め、乱雑度が大きい文字位置にはより高い変異率を設定することで遺伝的操作の効率化を図る内容が特許文献1にある。
【0011】
また、遺伝的アルゴリズムについて説明した書籍として非特許文献1がある。
【0012】
【特許文献1】
特開平10−228460(ページ5−13、図1)
【非特許文献1】
伊庭 斎志:遺伝的アルゴリズムの基礎、オーム社、1993(ページ1−10)
【0013】
【発明が解決しようとする課題】
遺伝的アルゴリズムは、生成する個体数が多い程、解の種類が増えるため最適解を得る可能性が高くなるという長所を持つが、生成する個体数に比例して解を得るまでの処理時間が増えるという短所を持つ。
また、個体数が少なければ処理時間は短くなるが、解の種類が減るため、局所解(最適解でない解)に収束する可能性が高くなるという問題を持つ。
【0014】
本発明は、最初の世代においては、一部の個体数ではじめ途中の世代から残りの個体を追加投入することで、従来の遺伝的アルゴリズムと同等の精度を持ちながらも最適解を得るまでの処理時間が短時間であるという上記のような問題を解決する遺伝的アルゴリズムにおける最適解探索時間短縮化システム、探索時間短縮化方法及びそのプログラムを提供するものである。
【0015】
【課題を解決するための手段】
本発明の第1の探索時間短縮化システムは、遺伝的アルゴリズムに基づき個体の評価を行う評価手段と個体への遺伝的操作を行う遺伝子操作手段とによって組み合わせ最適化問題の解法を行う探索時間短縮化システムであって、
最初の世代から遺伝的操作を実行する個体の個体数(以下、初期個体数と称す)と、遺伝的操作を実行する全世代数(以下、全世代数と称す)と、途中の世代で追加をする個体の個体数(以下、追加個体数と称す)と、個体の追加を行う世代の世代数(以下追加世代数と称す)と、を入力する入力手段を備え、
前記評価手段は、前記初期個体数で指定された数の個体について遺伝的操作の対象として取り出し遺伝的アルゴリズムの適用を開始し、前記遺伝子操作手段によって遺伝的操作の実行される都度世代数のカウントを行うとともに遺伝的操作の行われた個体の評価を行い、
前記遺伝子操作手段は、前記評価手段の評価し終えた個体について遺伝的操作を行い遺伝的操作を行った個体を前記評価手段に戻し、
さらに、前記評価手段は、カウントした世代数が前記追加世代数と一致すると、前記追加個体数分の新たな個体を遺伝的操作の対象として追加し、カウントした世代数が前記全世代数と一致すると遺伝的操作を終了することを備える。
【0016】
本発明の第2の探索時間短縮化システムは、第1の発明において、前記遺伝子操作手段は、最初の世代から前記追加世代数までの世代には前記初期個体数で指定された個体数分の個体に対して遺伝的操作を行い、前記追加世代数+1の世代から前記全世代数までの世代については、前記初期個体数と前記追加個体数を合計した数の個体に対して遺伝的操作を行うことを備える。
【0017】
本発明の第3の探索時間短縮化システムは、第1の発明において、前記遺伝子操作手段は、選択・淘汰、交叉、突然変異、個体生成の遺伝的操作を行うとともに、交叉と突然変異は指定された発生率に従って操作を行うことを備える。
【0018】
本発明の第4の探索時間短縮化システムは、第1の発明において、前記評価手段は、予め記憶装置に登録された評価規則に従い、個体の評価を行うことを備える。
【0019】
本発明の第1の探索時間短縮化方法は、遺伝的アルゴリズムに基づいて複数の個体に対し複数の世代にわたり遺伝的操作を行い組み合わせ最適化問題を解法する探索時間短縮化システムにおける探索時間短縮化方法であって、
最初の世代から遺伝的操作を実行する個体の個体数(以下、初期個体数と称す)と、遺伝的操作を実行する全世代数(以下、全世代数と称す)と、途中の世代で追加をする個体の個体数(以下、追加個体数と称す)と、個体の追加を行う世代の世代数(以下追加世代数と称す)と、を入力するとともに世代数のカウントフィールドを1で初期化する第1のステップと、
前記初期個体数で指定された数の個体を取り出し遺伝的アルゴリズムの処理の対象とする第2のステップと、
前記世代数のカウントフィールドの世代数と前記追加世代数とが一致するかを比較する第3のステップと、
前記第2のステップの比較で一致すると、前記追加個体数分の個体を遺伝的アルゴリズムの対象として追加する第4のステップと、
前記第3のステップの比較で一致しない場合及び前記第4のステップで個体の追加が行われた場合に、個体の評価を行う第5のステップと、
前記第5のステップで評価が行われたすべての個体について遺伝的操作を行う第6のステップと、
前記世代数のカウントフィールドの値が前記全世代数と一致するかを比較する第7のステップと、
前記第7のステップでの比較が一致しない場合は、世代数のカウントフィールドの値に1を足し、前記第3のステップに戻る第8のステップと、
前記第7のステップでの比較が一致すると、評価点数の高い個体の情報を出力する第9のステップと、
を備える。
【0020】
本発明の第1のプログラムは、遺伝的アルゴリズムに基づいて複数の個体に対し複数の世代にわたり遺伝的操作を行い組み合わせ最適化問題を解法する探索時間短縮化システムにが実行させるプログラムであって、
コンピュータに、
最初の世代から遺伝的操作を実行する個体の個体数(以下、初期個体数と称す)と、遺伝的操作を実行する全世代数(以下、全世代数と称す)と、途中の世代で追加をする個体の個体数(以下、追加個体数と称す)と、個体の追加を行う世代の世代数(以下追加世代数と称す)と、を入力するとともに世代数のカウントフィールドを1で初期化する第1のステップと、
前記初期個体数で指定された数の個体を取り出し遺伝的アルゴリズムの処理の対象とする第2のステップと、
前記世代数のカウントフィールドの世代数と前記追加世代数とが一致するかを比較する第3のステップと、
前記第2のステップの比較で一致すると、前記追加個体数分の個体を遺伝的アルゴリズムの対象として追加する第4のステップと、
前記第3のステップの比較で一致しない場合及び前記第4のステップで個体の追加が行われた場合に、個体の評価を行う第5のステップと、
前記第5のステップで評価が行われたすべての個体について遺伝的操作を行う第6のステップと、
前記世代数のカウントフィールドの値が前記全世代数と一致するかを比較する第7のステップと、
前記第7のステップでの比較が一致しない場合は、世代数のカウントフィールドの値に1を足し、前記第3のステップに戻る第8のステップと、
前記第7のステップでの比較が一致すると、評価点数の高い個体の情報を出力する第9のステップと、
を実行させる。
【0021】
【発明の実施の形態】
次に、本発明の実施例について図面を参照して詳細に説明する。
【0022】
最初に、本発明の第1と第2の実施例の構成について図1を参照して説明を行う。
【0023】
本発明は、パーソナルコンピュータ等のコンピュータ100に接続されたキーボード等の入力装置101と、ディスプレイ等の表示装置やプリンタ等の印刷装置からな出力装置102と、磁気ディスク装置等の記憶装置103と、コンピュータ100の主記憶装置上で動作するプログラムと、から構成されている。
【0024】
コンピュータ100で動作する個々のプログラムとして、入力装置101からの入力データを受け付け全体の動作の制御指示を行う入力手段110と、
個体の遺伝子情報からなる構成要素を定義する環境定義手段111と、
個体についての評価を行う規則を定義する評価規則定義手段112と、
乱数を生成する乱数生成手段113と、
環境定義手段111の内容を元に指定された数の個体を乱数生成手段113による乱数を使用して生成する初期個体生成手段114と、
個体に対して遺伝的操作を行う遺伝子操作手段115と、
個体の評価値を個体ごとに算出する評価手段117と、
指定された世代数の実行後、評価値の高い個体情報を出力装置102に出力する出力手段118と、から構成されている。
【0025】
以降においては、学校の時間割を遺伝的アルゴリズムを適用して決定する場合を使用して説明する。例えば、1年から4年まである大学があり、各学年にA,B、Cの学科(クラス)が3クラスあったとする。また、月曜日から土曜日まで毎日5時間目まで授業があるとし各クラスの週当たりの授業時間数の合計は30時間とする。
【0026】
問題は、4学年の各クラスについて月曜日から土曜日までの各時間の教科を時間割として設定するものである。このときの1つの個体は、1クラスの月曜日から金曜日までの連続した30時間の時間割を4学年すべてのクラスについて含むものとし、個体の遺伝子は、各時間の教科(例えば、英会話、英作文等)とする。そのとき個体は360(=4学年X3クラスX6日X5時間)の要素(遺伝子)から構成される。これを図4に示す。図4によると最初の30要素は、1年Aクラスの月曜1時限から土曜5時限までの時間割、次の30要素は、1年Bクラスの時間割であり、最後の30要素は、4年Cクラスの時間割となっている。
【0027】
尚、このように定義した個体の遺伝的操作は、同じクラス内、また同じクラス同士で行うものとする。
【0028】
環境定義手段111によって、各学年の各クラスごとに当該クラスが1週間に履修する各教科別の合計時間数が記憶装置103に設定される。例えば1年Aクラスの週当たりの合計英会話時間は4時間、英作文は3時間、等々である。
この履修教科の時間数を各クラスごとに合計すると30時間に近い時間数となり、30時間に満たない時間は、空き時間となる。空き時間がある場合は週の空き時間数も各教科の時間数と同様に捉え週の合計時間数が30時間となるようにする。
【0029】
評価規則定義手段112は、個体についての評価を行う評価規則と個々の評価規則の持つ点数とを記憶装置103に登録する。例えば、
・2時間連続で行う科目が連続していない時間割は減点する。
・教員の都合として都合が悪い時間に教科の割り当てがされている場合は減点する。
・次の授業までの空き時間が2時間以上あるときは減点とする。
・空き教室の判定として同じ時間に教室が不足した場合は減点とする。
・同じ教科を同じ日に2度以上割り当てた場合は減点とする。
等時間割設定に関する制約についていろいろな規則を登録する。
【0030】
さらに規則の重みを勘案して減点する点数を加減し決定する。減点のみでなく規則に沿っている場合は加点してもよい。また、一旦設定した規則についての点数は固定したものでなく適宜変更することもできる。
【0031】
乱数生成手段113は、例えば1から30までの数値についてその順序をランダムに配列した順列を、生成する数を個体数Xクラス数に見合って複数組作り記憶装置103に登録する。
【0032】
初期個体生成手段114は、指定された数の初期個体を生成する。このとき、乱数生成手段113が生成した1から30までの一組の順列を取り出し、環境定義手段111によって登録された各クラスの各教科の時間数情報に従って個体の要素を作成する。例えば、1年Aクラスについて、登録された最初の教科が英会話で週当たりの合計時間数が4時間の場合、4時間の英会話を取り出した順列の先頭から4つまでの番号に従い、月曜日の1時限を1として1年Aクラスの時間割に対応する個体上にランダムに配置する。初期個体生成手段114は、すべてのクラスについて以上のような操作を行い生成した個体を記憶装置103に登録する。
【0033】
遺伝子操作手段115は、各個体を構成する教科に対し遺伝的操作(選択・淘汰、交叉、突然変異、個体生成)を実行する。
【0034】
評価手段117は、各世代についての遺伝的操作の開始前に操作の対象となる個体について、評価規則定義手段112によって登録された規則を記憶装置103から読み出し、定義された規則に従い各個体の評価を行い評価値を個体ごとに設定する。また、評価手段117は、実行した世代数をカウントし、終了する世代数を検出すると遺伝的操作処理を終了する。
【0035】
次に、本発明の実施例の動作について図面を参照して説明する。
【0036】
図2のフローチャートでは特定世代の指定がない場合を、図3のフローチャートでは特定世代の指定のある場合のフローチャートを示す。
【0037】
本発明の第1の実施例の動作について図2のフローチャートを参照して説明を行う。
【0038】
利用者は入力装置101から時間割の設定に必要な情報を入力する。時間割設定対象期間として、例えば1日、週、2週、月等がある。さらに、授業を開講する時間数を日ごとに指定する。また、対象とする学年と学年当たりの学科(クラス)数を入力する。さらに時間割設定対象期間内に実施する各クラスそれぞれについての教科種別とその教科の合計時間数を入力する。
【0039】
コンピュータ100の入力手段110では入力された情報を環境定義手段111に渡し、環境定義手段111はこの内容をもとに個体の構成要素数を含む構成情報を作成し、これを記憶装置103に環境情報として記憶する(ステップS1)。例えば、4学年、学年当たりの学科数が3、月曜から土曜日まで毎日5時間開講とした場合、各学年の各学科についての時間割についての個体の構成情報は図4に例示したようになり、この場合360の要素(遺伝子)を含むものとなる。
【0040】
利用者は続いて個々の個体を評価するための記号化された評価規則と評価規則の持つ点数を入力し、評価規則定義手段112は、これを評価規則情報として記憶装置103に登録する(ステップS2)。尚、本実施例の説明では各クラスの週当たりの合計時間数を一律30時間としたが、必ずしも同じ時間数にする必要はない。
【0041】
続いて利用者は、生成する個体数(例えば5000個体)、実行する世代数(例えば200世代)を入力する。
【0042】
入力手段110はこれを受け付けると、乱数生成手段113に生成する個体数情報を渡し、乱数の生成を指示する。
【0043】
乱数生成手段113は、環境定義手段によって生成された環境情報からクラスごとの個体を構成する要素数を取り出す。乱数生成手段113は、1からこの取り出したクラスごとの要素数までのすべての整数の順列を指示された個体数Xクラス数分ランダムに作成してこれを記憶装置103に登録し(ステップS3)、入力手段110に終了を通知する。入力手段110は、続いて、生成する個体数を指定して初期個体生成手段114に個体の生成を指示する。
【0044】
初期個体生成手段114は、環境情報から取り出した個体の構成情報と各クラスごとの教科とその教科の合計時間数、及び乱数生成手段113が生成したランダムな順列を元にランダムに教科種別を個体上に配置し、指定された個数分個体を生成すると記憶装置103に登録する(ステップS4)。
【0045】
次に、入力手段110は、評価手段117に実行する世代数、実行する個体数を通知する。
【0046】
この通知を受けた評価手段117は、初期集団発生処理を行い初期個体生成手段114によって生成され登録された記憶装置103から通知をうけた実行する個体数分の個体を取り出すとともに、世代数のカウントフィールドを1として初期化する(ステップS5)。
【0047】
評価手段117は、評価に際し評価規則定義手段112によって登録された評価規則を記憶装置103から読み出し、登録された規則を一つずつ順に評価対象となる個体に対し適用する。規則に反する場合は、ペナルティを科して減点し、規則に順ずる場合は加点する。このようにして定義された規則すべてを適用し評価を実行する。採点した結果を個体ごとに設定し記憶する(ステップS6)。尚、初期個体生成時にはある決まられた同じ点数が各個体に割り当てられている。
【0048】
次に、遺伝子操作手段115は、評価対象となる個体について遺伝的操作を行う。具体的には、以下の操作を順に行う。
(1)選択・淘汰としては以下のような方法がある。
【0049】
・評価値が最も良い個体を1または複数個残す。
【0050】
・ランダムに選んだ2つの個体で評価値の良い方を残す。
【0051】
・ランダムに選んだ個体を残す。
(2)交叉としては以下のような方法がある。尚、交叉の場合は、評価対象となる個体すべてを乱数に従い、予め2つの個体からなる組に分けておき、同じ組の個体同士で交叉を行うことにする。
【0052】
・同じ組の個体の同じクラス間同士でランダムに区切ったある箇所から後ろの遺伝子をお互いに入れ替える。例えば1年のAクラスについて、水曜日の2時限と3時限の間で区切ったとすると、同じ組の他の個体の1年Aクラスの水曜日の3時限以降から土曜日の5時限までの遺伝子情報をその組の他の個体の該当部分と入れ替える。
【0053】
・同じ組の個体の同じクラス間同士でランダムに区切った2箇所の間を他の個体の該当部分と入れ替える。
(3)突然変異としては以下のような方法がある。
【0054】
・1つの個体の同じクラスの遺伝子についてランダムに選択した2箇所を入れ替える。
【0055】
・1つの個体の同じクラスの遺伝子についてランダムに選択した複数箇所を入れ替える。
【0056】
尚、交叉と突然変異の場合は、それぞれ別個に0%から100%までの発生率を予め定義し、その発生率に従って各世代における遺伝的操作を行ったり、行わなかったりする(ステップS7)。尚、この%の数値も利用者から設定することができる。
【0057】
次に、以上の遺伝的操作を対象とするすべての個体について実行したかを確認する(ステップS8)。すべての個体について実行していない場合は、(ステップS7)に戻る。すべての個体について実行をし終えた場合は、評価手段117に戻る。
【0058】
評価手段117は、すべての世代についての遺伝的操作を終えたか確認する(ステップS9)。すべての世代についての処理を終えていない場合は、世代数のカウントフィールドに1を加算する(ステップS10)。そして(ステップS6)に戻り個体の評価を実行する。
【0059】
(ステップS8)の評価ですべての世代の評価を終えた場合は、出力手段118は、最終評価を実行し評価点数の最も高い個体または比較的高い個体の遺伝子情報とその評価点数とを指定された個体数分出力装置102に出力して終了する(ステップS11)。
【0060】
本実施例では、初期集団発生で生成した個体数は変化しない。したがって、個体数が多ければ、最適解を得る可能性は高いが、処理時間は長くなる。
【0061】
次に第2の実施例の動作について、図3のフローチャートを参照して説明する。
【0062】
図3のフローチャートには、図2のフローチャートの中ほどに(ステップS12)と(ステップS13)が追加されていて、(ステップS1)から(ステップS11)の内容は図2と同じである。
【0063】
本実施例では、利用者から特定世代数が指定されていて実行した世代数が指定された特定世代数に到達すると、評価する個体の追加を行う内容を持つものであり、その他は第1の実施例と同じである。主に第1の実施例との相違点を説明する。
【0064】
最初に利用者は、生成する個体数(例えば5000個体)、実行する世代数(例えば200世代)、最初から実行する個体数(例えば1000個体)、途中で追加する個体数(例えば4000個体)、途中で個体の追加を行う特定世代数(例えば100世代)を入力する。
【0065】
次に、入力手段110は、評価手段117に利用者の入力した情報を通知する。
【0066】
評価手段117は、(ステップS5)と(ステップS6)において、最初から実行する個体数分の個体を、記憶装置103から取り出し、世代数のカウントフィールドを1として初期化する。し、それぞれの個体について評価を実行する。
【0067】
次に評価手段117は、途中で個体を追加する特定世代数に達したかをチェックする(ステップS12)。特定世代数に達した場合は、先に受け取った途中から追加する個体数に従い、記憶装置103から未評価の個体を入力して評価の対象に追加し(ステップS13)、追加された個体も含めた(ステップS6)での評価を行う。評価を終えると(ステップS7)での遺伝的操作を行う。
【0068】
(ステップS12)の評価で特定世代ではない場合は、(ステップS6)での評価を行う。
【0069】
本実施例の場合、処理の段階に応じて個体数を変化させている。まず、初期集団発生で少数の個体を生成し、この個体に対して特定世代まで評価と遺伝的操作を繰り返す。特定世代に到達した時に個体数追加を行い、第1の実施例の場合と同じ個体数まで個体を追加する。その後は終了条件になるまで評価と遺伝的操作を繰り返す。
【0070】
第2の実施例では、初期集団生成から特定世代までの個体数を減らすことにより、処理時間短縮が可能となる。また、特定世代で個体数追加を行うため、第2の実施例の場合と同数の個体を扱うことで深い探索を行い、最適解を得る可能性を高めることができる。このように必要とする個体数を一度に処理するのではなく、段階的に個体数を増加させることで、第2の実施例の精度を保ちつつ、短時間での処理を可能にすることができる。
【0071】
最後に、以上説明した2つの実施例のそれぞれの処理時間を算定する。
【0072】
両実施例ともに扱う個体数は5,000個、終了条件(終了世代数)を200世代とし、1個体の評価と遺伝的操作に掛かる時間を1秒と仮定する。
【0073】
第1の実施例の場合、単純に5000個の個体を終了条件に到達するまで処理を繰り返すのみであり、処理時間は5000個×200世代×1秒=1、000、000秒となる。
【0074】
第2の実施例では、初期の個体数を1,000個とし、100世代目に4,000個の個体を追加することとする。
【0075】
この場合の処理時間は1,000個×100世代×1秒+5,000個×100世代×1秒=600,000秒となる。
【0076】
第2の実施例では第1の実施例に比較すると、40%処理時間を短縮していることが判る。また、第2の実施例における処理個体数は、第1の実施例と同数であるため、第1の実施例の場合と同等の精度を持つと言える。また、第2の実施例では、最初に投入する個体数、個体の追加を行う世代数、追加を行う世代における追加する個体数は適宜変更することができる。
【0077】
さらに、第2の実施例では遺伝的アルゴリズムを時間割の作成に適用する場合を元に説明をしたが、初期個体数、追加する個体数、個体数追加を行う世代数、終了世代数を指定して、様々な遺伝的アルゴリズムを用いた組み合わせ最適化問題に適用することが可能である。
【0078】
【発明の効果】
本発明の効果は3点あり、まず第1は、時間割の設定作業を遺伝的操作アルゴリズムを適用して行うことで容易に時間割が作成できることである。
【0079】
第2に「処理時間が短縮できること」、第3に「従来の手法と同等の精度を保持できること」である。これは前述しているように、初期集団生成から特定世代までの個体数を減らし、特定世代で段階的に個体数追加を行うことで、従来の手法と同数の個体を扱うことで深い探索を行い、短時間で最適解が得られるからである。
【図面の簡単な説明】
【図1】本発明の実施の形態の構成を説明するブロック図である。
【図2】本発明の第1の実施例の動作を説明するフローチャートである。
【図3】本発明の第2の実施例の動作を説明するフローチャートである。
【図4】本発明の実施例の時間割を作成するための個体の構成要素の説明図である。
【符号の説明】
100 コンピュータ
101 入力装置
102 出力装置
103 記憶装置
110 入力手段
111 環境定義手段
112 評価規則定義手段
113 乱数生成手段
114 初期個体生成手段
115 遺伝子操作手段
117 評価手段
118 出力手段[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a combinatorial optimization problem using a genetic algorithm.In particular, in the early generations, the genetic algorithm is applied to a part of individuals, and the conventional genetics are introduced by inputting the remaining individuals from intermediate generations. TECHNICAL FIELD The present invention relates to a system for shortening the search time for an optimal solution in a genetic algorithm, which has the same accuracy as a genetic algorithm, but has a short processing time until an optimal solution is obtained, a search time reducing method, and a program therefor.
[0002]
[Prior art]
In the combinatorial optimization problem, as one of the methods for obtaining an optimal solution in a relatively short time, a calculation method and a genetic algorithm using the evolutionary process of a living organism as a model are often used.
[0003]
Genetic algorithms represent a combination of elements that make up an individual as a gene, and repeat one or more genetic operations (selection / selection, crossover, mutation, individual generation) on the individual with that gene to create one or more optimal This is a method for searching for a solution.
[0004]
The selection / selection of genetic operations determines what individuals will be left in the next generation and what type of individuals will be eliminated. However, there are methods such as leaving individuals with the highest evaluation value, leaving individuals selected at random, and combining a plurality of methods.
[0005]
In the crossover, two individuals are selected, and elements (genes) constituting the individuals are switched at random positions.
[0006]
Mutation is performed by performing an operation such as exchanging two randomly selected genes in one individual, and performing a conversion that cannot be performed by crossover.
[0007]
In the individual generation, an individual that has undergone selection / selection, crossover, and mutation is generated as the next generation.
[0008]
In this way, a plurality of generations are performed on an individual targeted for genetic manipulation.
[0009]
For each individual operated as described above, the state of adaptation to the environment is evaluated, and an evaluation value is set for each individual. This is repeatedly executed until the specified number of generations or the specified evaluation value (threshold) is reached.
[0010]
As a document related to the present invention, regarding the efficiency of searching for an optimal solution by a genetic algorithm, a character distribution is determined for each character position with respect to a character string representing an individual, and each character is determined based on the character distribution.
[0011]
Further, Non-Patent
[0012]
[Patent Document 1]
JP-A-10-228460 (Page 5-13, FIG. 1)
[Non-patent document 1]
Saito Iba: Basics of Genetic Algorithms, Ohmsha, 1993 (pages 1-10)
[0013]
[Problems to be solved by the invention]
Genetic algorithms have the advantage that as the number of individuals generated increases, the type of solution increases and the possibility of obtaining an optimal solution increases, but the processing time required to obtain a solution in proportion to the number of individuals generated is It has the disadvantage of increasing.
Also, if the number of individuals is small, the processing time is shortened, but there is a problem that the possibility of convergence to a local solution (a solution that is not the optimal solution) increases because the types of solutions decrease.
[0014]
The present invention, in the first generation, by adding the remaining individuals from the middle generation starting with a part of the number of individuals, until obtaining the optimal solution while having the same accuracy as the conventional genetic algorithm An object of the present invention is to provide an optimal solution search time reduction system, a search time reduction method, and a program therefor in a genetic algorithm that solves the above-described problem that the processing time is short.
[0015]
[Means for Solving the Problems]
A first search time reduction system according to the present invention is a search time reduction method for solving a combination optimization problem by an evaluation means for evaluating an individual based on a genetic algorithm and a genetic operation means for performing a genetic operation on an individual. System
Addition of the number of individuals performing genetic operations from the first generation (hereinafter referred to as the initial number of individuals), the total number of generations performing the genetic operation (hereinafter referred to as the total number of generations), and the middle generations Input means for inputting the number of individuals (hereinafter referred to as the number of additional individuals) and the number of generations of the generation to which the individual is added (hereinafter referred to as the number of additional generations),
The evaluation means takes out the individuals of the number designated by the initial number of individuals as targets of the genetic operation and starts applying a genetic algorithm, and counts the number of generations each time the genetic operation is performed by the genetic operation means. Perform the genetic manipulation, and evaluate the individual.
The genetic manipulation means returns the individual that has performed the genetic operation by performing a genetic operation on the individual that has been evaluated by the evaluation means to the evaluation means,
Further, when the counted number of generations matches the number of additional generations, the evaluation means adds new individuals corresponding to the number of additional individuals as targets of the genetic operation, and the counted number of generations matches the total number of generations. Then preparing to end the genetic manipulation.
[0016]
In a second search time reduction system according to the present invention, in the first invention, the gene manipulation means includes, for generations from the first generation to the number of additional generations, the number of individuals specified by the initial number of individuals. Perform a genetic operation on the individuals, and for the generations from the number of additional generations +1 to the total number of generations, perform a genetic operation on the total number of the initial individuals and the additional individuals. Prepare to do.
[0017]
In a third search time reduction system according to the present invention, in the first invention, the genetic operation means performs genetic operations of selection / selection, crossover, mutation, and individual generation, and crossover and mutation are designated. Performing an operation according to the generated incidence.
[0018]
A fourth search time reduction system according to the present invention, in the first invention, comprises that the evaluation means evaluates an individual according to an evaluation rule registered in a storage device in advance.
[0019]
A first search time reduction method according to the present invention is to reduce a search time in a search time reduction system that solves a combination optimization problem by performing a genetic operation on a plurality of individuals over a plurality of generations based on a genetic algorithm. The method,
Addition of the number of individuals performing genetic operations from the first generation (hereinafter referred to as the initial number of individuals), the total number of generations performing the genetic operation (hereinafter referred to as the total number of generations), and the middle generations And the number of generations (hereinafter referred to as the number of additional generations) of the generation to which the individual is added, and the count field for the number of generations is initialized to 1. A first step to
A second step of taking out the number of individuals specified by the initial number of individuals and subjecting the individuals to processing of a genetic algorithm;
A third step of comparing whether the number of generations in the count field of the number of generations matches the number of additional generations,
A fourth step of adding as many individuals as the number of the additional individuals as targets of the genetic algorithm when they match in the comparison of the second step;
A fifth step of evaluating the individual when there is no match in the comparison of the third step and when an individual is added in the fourth step;
A sixth step of performing a genetic operation on all individuals evaluated in the fifth step,
A seventh step of comparing whether the value of the generation number count field matches the total generation number;
If the comparisons in the seventh step do not match, an eighth step is to add 1 to the value of the generation count field and return to the third step;
A ninth step of outputting information of an individual with a high evaluation score when the comparison in the seventh step matches,
Is provided.
[0020]
A first program of the present invention is a program executed by a search time reduction system that performs a genetic operation on a plurality of individuals over a plurality of generations based on a genetic algorithm and solves a combination optimization problem,
On the computer,
Addition of the number of individuals performing genetic operations from the first generation (hereinafter referred to as the initial number of individuals), the total number of generations performing the genetic operation (hereinafter referred to as the total number of generations), and the middle generations And the number of generations (hereinafter referred to as the number of additional generations) of the generation to which the individual is added, and the count field for the number of generations is initialized to 1. A first step to
A second step of taking out the number of individuals specified by the initial number of individuals and subjecting the individuals to processing of a genetic algorithm;
A third step of comparing whether the number of generations in the count field of the number of generations matches the number of additional generations,
A fourth step of adding as many individuals as the number of the additional individuals as targets of the genetic algorithm when they match in the comparison of the second step;
A fifth step of evaluating the individual when there is no match in the comparison of the third step and when an individual is added in the fourth step;
A sixth step of performing a genetic operation on all individuals evaluated in the fifth step,
A seventh step of comparing whether the value of the generation number count field matches the total generation number;
If the comparisons in the seventh step do not match, an eighth step is to add 1 to the value of the generation count field and return to the third step;
A ninth step of outputting information of an individual with a high evaluation score when the comparison in the seventh step matches,
Is executed.
[0021]
BEST MODE FOR CARRYING OUT THE INVENTION
Next, embodiments of the present invention will be described in detail with reference to the drawings.
[0022]
First, the configuration of the first and second embodiments of the present invention will be described with reference to FIG.
[0023]
The present invention includes an
[0024]
An
An environment defining means 111 for defining a component composed of genetic information of the individual;
An evaluation rule defining means 112 for defining a rule for evaluating an individual;
Random number generating means 113 for generating random numbers,
An initial individual generation unit 114 that generates a specified number of individuals based on the contents of the
Genetic manipulation means 115 for performing genetic manipulation on the individual,
Evaluation means 117 for calculating an evaluation value of an individual for each individual;
Output means 118 for outputting the individual information having a high evaluation value to the
[0025]
Hereinafter, the case where the timetable of the school is determined by applying the genetic algorithm will be described. For example, suppose that there is a university from one year to four years, and there are three classes (classes) of A, B, and C in each school year. Further, it is assumed that classes are held every day from Monday to Saturday until the fifth hour, and the total number of class hours per week for each class is 30 hours.
[0026]
The problem is to set the subjects for each class from Monday to Saturday as a timetable for each class of the fourth grade. One individual at this time shall include a continuous 30-hour timetable from Monday to Friday of one class for all classes of the fourth grade, and the gene of the individual shall be the subject of each time (for example, English conversation, English composition, etc.). And At that time, the individual is composed of 360 (= 4th grade X3 class X6 days X5 hours) elements (genes). This is shown in FIG. According to FIG. 4, the first 30 elements are the timetable from the 1st Monday to the 5th Saturday of the A-class for one year, the next 30 elements are the timetable for the one-year B class, and the last 30 elements are the four-year Class timetable.
[0027]
Genetic operations on individuals defined in this way are performed in the same class and between the same classes.
[0028]
The environment definition means 111 sets the total number of hours for each subject in each week in each class of each academic year in the
The total number of hours for this course is close to 30 hours for each class, and less than 30 hours is free time. If there is free time, the number of free hours in the week is also captured in the same manner as the number of hours in each subject, so that the total number of hours in the week is 30 hours.
[0029]
The evaluation
・ Deductions will be made for timetables in which subjects are not continuous for two consecutive hours.
-Points will be deducted if subjects are assigned at times when teachers are not convenient.
・ If there is more than 2 hours of free time until the next lesson, points will be deducted.
・ If there is a shortage of classrooms at the same time as the judgment of an empty classroom, points will be deducted.
・ If the same subject is assigned more than once on the same day, points will be deducted.
Various rules are registered for restrictions on setting the equal timetable.
[0030]
Further, the points to be deducted are adjusted by taking into account the weight of the rules. In addition to deductions, points may be added if they are in line with the rules. Also, the score for the rule once set is not fixed but can be changed as appropriate.
[0031]
The random number generation means 113 creates a plurality of sets of permutations in which the order of numbers from 1 to 30 is randomly arranged, for example, and registers them in the
[0032]
The initial individual generator 114 generates a designated number of initial individuals. At this time, a set of permutations from 1 to 30 generated by the random number generation means 113 is taken out, and individual elements are created according to the time information of each subject of each class registered by the environment definition means 111. For example, if the first registered subject is English conversation and the total number of hours per week is 4 hours for the A class for one year, the first subject on Monday is 4th from the top of the permutation of the 4-hour English conversation. The time period is set to 1, and the time period is randomly arranged on the individual corresponding to the A-class timetable for one year. The initial individual generating means 114 registers the individual generated by performing the above operation for all classes in the
[0033]
The genetic operation means 115 performs a genetic operation (selection / selection, crossover, mutation, individual generation) on subjects constituting each individual.
[0034]
The
[0035]
Next, the operation of the embodiment of the present invention will be described with reference to the drawings.
[0036]
The flowchart of FIG. 2 shows a case where a specific generation is not specified, and the flowchart of FIG. 3 shows a case where a specific generation is specified.
[0037]
The operation of the first embodiment of the present invention will be described with reference to the flowchart of FIG.
[0038]
The user inputs information necessary for setting a timetable from the
[0039]
The
[0040]
The user subsequently inputs the symbolized evaluation rule for evaluating each individual and the score of the evaluation rule, and the evaluation rule definition means 112 registers this in the
[0041]
Subsequently, the user inputs the number of individuals to be generated (for example, 5000 individuals) and the number of generations to be executed (for example, 200 generations).
[0042]
Upon receiving this, the
[0043]
The random number generation unit 113 extracts the number of elements constituting an individual for each class from the environment information generated by the environment definition unit. The random number generation means 113 randomly creates a permutation of all integers from 1 to the number of elements extracted for each class by the designated number of individuals × the number of classes, and registers it in the storage device 103 (step S3). , Is notified to the input means 110. Subsequently, the
[0044]
The initial individual generating means 114 randomly identifies the subject type based on the configuration information of the individual extracted from the environment information, the subject of each class, the total number of hours of the subject, and the random permutation generated by the random number generating means 113. When the individuals are arranged above and the specified number of individuals are generated, they are registered in the storage device 103 (step S4).
[0045]
Next, the
[0046]
Upon receiving the notification, the
[0047]
The evaluation means 117 reads out the evaluation rules registered by the evaluation rule definition means 112 from the
[0048]
Next, the genetic operation means 115 performs a genetic operation on the individual to be evaluated. Specifically, the following operations are performed in order.
(1) The following methods are available for selection and selection.
[0049]
-Leave one or more individuals with the best evaluation value.
[0050]
・ Leave two randomly selected individuals with good evaluation values.
[0051]
・ Leave randomly selected individuals.
(2) The following methods are available for crossover. In the case of crossover, all individuals to be evaluated are divided into sets of two individuals in advance according to random numbers, and crossover is performed between individuals of the same set.
[0052]
-Swap the genes behind each other from a certain place randomly divided between the same class of individuals of the same set. For example, if the class A of the year is divided between the 2nd and 3rd period on Wednesday, the genetic information from the 3rd period on the Wednesday and the 5th period on Saturday of the 1st A class of the other individual of the same group is Replace with the relevant part of the other individuals in the set.
[0053]
-The two parts of the same set of individuals that are randomly separated between the same classes are replaced with corresponding parts of other individuals.
(3) There are the following methods for mutation.
[0054]
-Swap two randomly selected genes of the same class of one individual.
[0055]
-Swap a plurality of randomly selected genes of the same class of one individual.
[0056]
In the case of crossover and mutation, the incidence of 0% to 100% is separately defined in advance, and the genetic operation in each generation is performed or not performed according to the incidence (step S7). The numerical value of this% can also be set by the user.
[0057]
Next, it is confirmed whether or not the above-described genetic operation has been performed for all individuals targeted (step S8). If the process has not been performed for all individuals, the process returns to (Step S7). When the execution has been completed for all individuals, the process returns to the evaluation means 117.
[0058]
The
[0059]
When all the generations have been evaluated in the evaluation of (Step S8), the
[0060]
In the present embodiment, the number of individuals generated by the initial outbreak does not change. Therefore, if the number of individuals is large, the possibility of obtaining an optimal solution is high, but the processing time is long.
[0061]
Next, the operation of the second embodiment will be described with reference to the flowchart of FIG.
[0062]
In the flowchart of FIG. 3, (Step S12) and (Step S13) are added in the middle of the flowchart of FIG. 2, and the contents of (Step S1) to (Step S11) are the same as those in FIG.
[0063]
In the present embodiment, when the number of specific generations is specified by the user and the number of executed generations reaches the specified specific number of generations, the content to be added is added to the individual to be evaluated. This is the same as the embodiment. Mainly, differences from the first embodiment will be described.
[0064]
First, the user generates the number of individuals (for example, 5000 individuals), the number of generations to be executed (for example, 200 generations), the number of individuals to be executed from the beginning (for example, 1000 individuals), the number of individuals to be added in the middle (for example, 4000 individuals), The number of specific generations (for example, 100 generations) to add individuals on the way is input.
[0065]
Next, the
[0066]
In (Step S5) and (Step S6), the evaluation means 117 takes out individuals corresponding to the number of individuals to be executed from the beginning from the
[0067]
Next, the evaluation means 117 checks whether the number of specific generations to which individuals are added on the way has been reached (step S12). If the number of specific generations has been reached, an unevaluated individual is input from the
[0068]
If it is not the specific generation in the evaluation in (Step S12), the evaluation in (Step S6) is performed.
[0069]
In the case of the present embodiment, the number of individuals is changed according to the processing stage. First, a small number of individuals are generated in the initial outbreak, and evaluation and genetic operations are repeated for this individual until a specific generation. When reaching the specific generation, the number of individuals is added, and individuals are added up to the same number of individuals as in the first embodiment. Thereafter, the evaluation and the genetic operation are repeated until the termination condition is satisfied.
[0070]
In the second embodiment, the processing time can be reduced by reducing the number of individuals from the initial population generation to the specific generation. Further, since the number of individuals is added in a specific generation, a deep search can be performed by treating the same number of individuals as in the second embodiment, and the possibility of obtaining an optimal solution can be increased. Rather than processing the required number of individuals at once, increasing the number of individuals in a stepwise manner enables processing in a short time while maintaining the accuracy of the second embodiment. it can.
[0071]
Finally, the processing time of each of the two embodiments described above is calculated.
[0072]
In both embodiments, it is assumed that the number of individuals handled is 5,000, the termination condition (the number of termination generations) is 200 generations, and the time required for evaluation and genetic operation of one individual is 1 second.
[0073]
In the case of the first embodiment, the processing is simply repeated until 5,000 individuals reach the termination condition, and the processing time is 5,000 × 200 generations × 1 second = 1,000,000,000 seconds.
[0074]
In the second embodiment, the initial number of individuals is 1,000, and 4,000 individuals are added at the 100th generation.
[0075]
The processing time in this case is 1,000 × 100 generation × 1 second + 5,000 × 100 generation × 1 second = 600,000 seconds.
[0076]
In the second embodiment, it can be seen that the processing time is reduced by 40% as compared with the first embodiment. In addition, since the number of processing individuals in the second embodiment is the same as that in the first embodiment, it can be said that it has the same accuracy as that in the first embodiment. In the second embodiment, the number of individuals to be initially input, the number of generations to add an individual, and the number of individuals to be added in the generation to be added can be appropriately changed.
[0077]
Further, in the second embodiment, the description has been made based on the case where the genetic algorithm is applied to the creation of the timetable. However, the initial number of individuals, the number of individuals to be added, the number of generations to add the number of individuals, and the number of end generations are specified. Thus, the present invention can be applied to a combination optimization problem using various genetic algorithms.
[0078]
【The invention's effect】
There are three effects of the present invention. First, a timetable can be easily created by performing a task of setting a timetable by applying a genetic operation algorithm.
[0079]
Secondly, "the processing time can be shortened" and thirdly, "the same accuracy as that of the conventional method can be maintained". As described above, this reduces the number of individuals from the initial population generation to the specific generation, and gradually increases the number of individuals in the specific generation, thereby conducting a deep search by treating the same number of individuals as in the conventional method. This is because the optimal solution can be obtained in a short time.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration of an embodiment of the present invention.
FIG. 2 is a flowchart illustrating an operation of the first exemplary embodiment of the present invention.
FIG. 3 is a flowchart illustrating an operation of the second exemplary embodiment of the present invention.
FIG. 4 is an explanatory diagram of individual components for creating a timetable according to the embodiment of this invention.
[Explanation of symbols]
REFERENCE SIGNS
Claims (6)
最初の世代から遺伝的操作を実行する個体の個体数(以下、初期個体数と称す)と、遺伝的操作を実行する全世代数(以下、全世代数と称す)と、途中の世代で追加をする個体の個体数(以下、追加個体数と称す)と、個体の追加を行う世代の世代数(以下追加世代数と称す)と、を入力する入力手段を備え、
前記評価手段は、前記初期個体数で指定された数の個体について遺伝的操作の対象として取り出し遺伝的アルゴリズムの適用を開始し、前記遺伝子操作手段によって遺伝的操作の実行される都度世代数のカウントを行うとともに遺伝的操作の行われた個体の評価を行い、
前記遺伝子操作手段は、前記評価手段の評価し終えた個体について遺伝的操作を行い遺伝的操作を行った個体を前記評価手段に戻し、
さらに、前記評価手段は、カウントした世代数が前記追加世代数と一致すると、前記追加個体数分の新たな個体を遺伝的操作の対象として追加し、カウントした世代数が前記全世代数と一致すると遺伝的操作を終了することを特徴とする探索時間短縮化システム。A search time reduction system for solving a combination optimization problem by an evaluation means for evaluating an individual based on a genetic algorithm and a genetic operation means for performing a genetic operation on the individual,
Addition of the number of individuals performing genetic operations from the first generation (hereinafter referred to as the initial number of individuals), the total number of generations performing the genetic operation (hereinafter referred to as the total number of generations), and the middle generations Input means for inputting the number of individuals (hereinafter referred to as the number of additional individuals) and the number of generations of the generation to which the individual is added (hereinafter referred to as the number of additional generations),
The evaluation means takes out the individuals of the number designated by the initial number of individuals as targets of the genetic operation and starts applying a genetic algorithm, and counts the number of generations each time the genetic operation is performed by the genetic operation means. Perform the genetic manipulation, and evaluate the individual.
The genetic manipulation means returns the individual that has performed the genetic operation by performing a genetic operation on the individual that has been evaluated by the evaluation means to the evaluation means,
Further, when the counted number of generations matches the number of additional generations, the evaluation means adds new individuals corresponding to the number of additional individuals as targets of the genetic operation, and the counted number of generations matches the total number of generations. Then, the genetic operation is terminated, and the search time is reduced.
最初の世代から遺伝的操作を実行する個体の個体数(以下、初期個体数と称す)と、遺伝的操作を実行する全世代数(以下、全世代数と称す)と、途中の世代で追加をする個体の個体数(以下、追加個体数と称す)と、個体の追加を行う世代の世代数(以下追加世代数と称す)と、を入力するとともに世代数のカウントフィールドを1で初期化する第1のステップと、
前記初期個体数で指定された数の個体を取り出し遺伝的アルゴリズムの処理を開始する第2のステップと、
前記世代数のカウントフィールドの世代数と前記追加世代数とが一致するかを比較する第3のステップと、
前記第2のステップの比較で一致すると、前記追加個体数分の個体を遺伝的アルゴリズムの対象として新規に追加する第4のステップと、
前記第3のステップの比較で一致しない場合、及び前記第4のステップで個体の追加が行われた場合に、全個体の評価を行う第5のステップと、
前記第5のステップで評価が行われた全個体について遺伝的操作を行う第6のステップと、
前記世代数のカウントフィールドの値が前記全世代数と一致するかを比較する第7のステップと、
前記第7のステップでの比較が一致しない場合は、世代数のカウントフィールドの値に1を足し、前記第3のステップに戻る第8のステップと、
前記第7のステップでの比較が一致すると、評価点数の高い個体の情報を出力する第9のステップと、
を備えることを特徴とする探索時間短縮化方法。A search time reduction method in a search time reduction system for performing a genetic operation over a plurality of generations on a plurality of individuals based on a genetic algorithm to solve a combination optimization problem,
Addition of the number of individuals performing genetic operations from the first generation (hereinafter referred to as the initial number of individuals), the total number of generations performing the genetic operation (hereinafter referred to as the total number of generations), and the middle generations And the number of generations (hereinafter referred to as the number of additional generations) of the generation to which the individual is added, and the count field for the number of generations is initialized to 1. A first step to
A second step of taking out the number of individuals specified by the initial number of individuals and starting processing of the genetic algorithm;
A third step of comparing whether the number of generations in the count field of the number of generations matches the number of additional generations,
A fourth step of newly adding as many individuals as the number of the additional individuals as targets of the genetic algorithm when they match in the comparison of the second step;
A fifth step of evaluating all individuals when there is no match in the comparison of the third step, and when an individual is added in the fourth step,
A sixth step of performing a genetic operation on all individuals evaluated in the fifth step,
A seventh step of comparing whether the value of the generation number count field matches the total generation number;
If the comparisons in the seventh step do not match, an eighth step is to add 1 to the value of the generation count field and return to the third step;
A ninth step of outputting information of an individual with a high evaluation score when the comparison in the seventh step matches,
A method for shortening a search time, comprising:
コンピュータに、
最初の世代から遺伝的操作を実行する個体の個体数(以下、初期個体数と称す)と、遺伝的操作を実行する全世代数(以下、全世代数と称す)と、途中の世代で追加をする個体の個体数(以下、追加個体数と称す)と、個体の追加を行う世代の世代数(以下追加世代数と称す)と、を入力するとともに世代数のカウントフィールドを1で初期化する第1のステップと、
前記初期個体数で指定された数の個体を取り出し遺伝的アルゴリズムの処理を開始する第2のステップと、
前記世代数のカウントフィールドの世代数と前記追加世代数とが一致するかを比較する第3のステップと、
前記第2のステップの比較で一致すると、前記追加個体数分の個体を遺伝的アルゴリズムの対象として新規に追加する第4のステップと、
前記第3のステップの比較で一致しない場合、及び前記第4のステップで個体の追加が行われた場合に、全個体の評価を行う第5のステップと、
前記第5のステップで評価が行われた全個体について遺伝的操作を行う第6のステップと、
前記世代数のカウントフィールドの値が前記全世代数と一致するかを比較する第7のステップと、
前記第7のステップでの比較が一致しない場合は、世代数のカウントフィールドの値に1を足し、前記第3のステップに戻る第8のステップと、
前記第7のステップでの比較が一致すると、評価点数の高い個体の情報を出力する第9のステップと、
を実行させるプログラム。A program executed by a search time reduction system that performs a genetic operation on a plurality of individuals based on a genetic algorithm over a plurality of generations and solves a combination optimization problem,
On the computer,
Addition of the number of individuals performing genetic operations from the first generation (hereinafter referred to as the initial number of individuals), the total number of generations performing the genetic operation (hereinafter referred to as the total number of generations), and the middle generations And the number of generations (hereinafter referred to as the number of additional generations) of the generation to which the individual is added, and the count field for the number of generations is initialized to 1. A first step to
A second step of taking out the number of individuals specified by the initial number of individuals and starting processing of the genetic algorithm;
A third step of comparing whether the number of generations in the count field of the number of generations matches the number of additional generations,
A fourth step of newly adding as many individuals as the number of the additional individuals as targets of the genetic algorithm when they match in the comparison of the second step;
A fifth step of evaluating all individuals when there is no match in the comparison of the third step, and when an individual is added in the fourth step,
A sixth step of performing a genetic operation on all individuals evaluated in the fifth step,
A seventh step of comparing whether the value of the generation number count field matches the total generation number;
If the comparisons in the seventh step do not match, an eighth step is to add 1 to the value of the generation count field and return to the third step;
A ninth step of outputting information of an individual with a high evaluation score when the comparison in the seventh step matches,
A program that executes
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2003150742A JP2004355220A (en) | 2003-05-28 | 2003-05-28 | Search time shortening system, search time shortening method, and program thereof |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2003150742A JP2004355220A (en) | 2003-05-28 | 2003-05-28 | Search time shortening system, search time shortening method, and program thereof |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2004355220A true JP2004355220A (en) | 2004-12-16 |
Family
ID=34046466
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2003150742A Withdrawn JP2004355220A (en) | 2003-05-28 | 2003-05-28 | Search time shortening system, search time shortening method, and program thereof |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2004355220A (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2006331394A (en) * | 2005-04-25 | 2006-12-07 | Ricoh Co Ltd | Program version management method, program, and printing system |
| JP2008117059A (en) * | 2006-11-01 | 2008-05-22 | Fuji Heavy Ind Ltd | Automatic adjustment device for control parameters |
| JP2019516148A (en) * | 2017-03-10 | 2019-06-13 | 東莞理工学院 | Global optimization, search and machine learning methods based on genetic algorithm |
-
2003
- 2003-05-28 JP JP2003150742A patent/JP2004355220A/en not_active Withdrawn
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2006331394A (en) * | 2005-04-25 | 2006-12-07 | Ricoh Co Ltd | Program version management method, program, and printing system |
| JP2008117059A (en) * | 2006-11-01 | 2008-05-22 | Fuji Heavy Ind Ltd | Automatic adjustment device for control parameters |
| JP2019516148A (en) * | 2017-03-10 | 2019-06-13 | 東莞理工学院 | Global optimization, search and machine learning methods based on genetic algorithm |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Breda et al. | On the formulation of epidemic models (an appraisal of Kermack and McKendrick) | |
| Sharabi | Finding love on a first data: Matching algorithms in online dating | |
| Pardos et al. | Using HMMs and bagged decision trees to leverage rich features of user and skill from an intelligent tutoring system dataset | |
| Sigmund et al. | Tides of tolerance | |
| Rogers et al. | Inferring population histories using cultural data | |
| Abbott | Developmentalism and dependency in Southeast Asia: the case of the automotive industry | |
| CN113010255A (en) | Interaction method and device based on binding session group and computer equipment | |
| CN112699658A (en) | Text comparison method and related device | |
| JP2004355220A (en) | Search time shortening system, search time shortening method, and program thereof | |
| CN109448697B (en) | Poem melody generation method, electronic device and computer readable storage medium | |
| KR100912027B1 (en) | Message character string output system, control method thereof, and information storage medium | |
| JP2023178758A (en) | Minute creation support device and minute creation support method | |
| Han et al. | Word of mouth propagation in online social networks | |
| Tucker | Fulfilling the promise of choice architecture interventions for addictive behaviors. | |
| JP2024046582A (en) | Project execution support device, method, and program | |
| JP2011034358A (en) | Conference management device and conference cost display method | |
| Ciscon et al. | The school timetabling problem: a focus on elimination of open periods and isolated classes | |
| JP6242995B1 (en) | Information processing apparatus, work recording system, program, and information processing method | |
| Liu et al. | Enlarger-Spreader-Controller-Taciturn Rumor Spreading Model Based on Multi-Agent Reinforcement Learning Method | |
| Syafi'i et al. | The The Effectiveness of WhatsApp Social Media Utilization in Farmer Group Communication: A Study in Wonosari Village, Tanjung Morawa District, North Sumatra | |
| US8082176B2 (en) | Message character string output system, its control method, and information storage medium | |
| JP7759629B2 (en) | Behavioral support system, behavioral support method, and behavioral support program | |
| CN109814959A (en) | Interface background display method, device, computer device and storage medium | |
| Ma et al. | Consensus time in a concealed voter model with heterogeneous activity of voters | |
| Birk | SmileyNet--Towards the Prediction of the Lottery by Reading Tea Leaves with AI |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20050117 |
|
| RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20050315 |
|
| RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20070126 |
|
| A761 | Written withdrawal of application |
Free format text: JAPANESE INTERMEDIATE CODE: A761 Effective date: 20070427 |
|
| RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20080613 |