GA Genetic Algorithm.  Introduction  Algorithm  GA Operations  Chromosome representation  Fitness function  Demonstration of LibGA.

Slides:



Advertisements
Similar presentations
Divide-and-Conquer. 什麼是 divide-and-conquer ? Divide 就是把問題分割 Conquer 則是把答案結合起來.
Advertisements

6-1 指標簡介 6-2 指標與陣列 6-3 動態配置記憶體 6-4 本章綜合練習
Chapter 10 馬可夫鏈 緒言 如果讀者仔細觀察日常生活中所發生的 諸多事件,必然會發現有些事件的未來 發展或演變與該事件現階段的狀況全然 無關,這種事件稱為獨立試行過程 (process of independent trials) ;而另一些 事件則會受到該事件現階段的狀況影響。
第七章 抽樣與抽樣分配 蒐集統計資料最常見的方式是抽查。這 牽涉到兩個問題: 抽出的樣本是否具有代表性?是否能反應出母體的特徵?
:Word Morphing ★★☆☆☆ 題組: Problem Set Archive with Online Judge 題號: 10508:word morphing 解題者:楊家豪 解題日期: 2006 年 5 月 21 日 題意: 第一行給你兩個正整數, 第一個代表下面會出現幾個字串,
Speaker: Pei-Ni Tsai. Outline  Introduction  Fitness Function  GA Parameters  GA Operators  Example  Shortest Path Routing Problem 2.
1.1 線性方程式系統簡介 1.2 高斯消去法與高斯-喬登消去法 1.3 線性方程式系統的應用(-Skip-)
: OPENING DOORS ? 題組: Problem Set Archive with Online Judge 題號: 10606: OPENING DOORS 解題者:侯沛彣 解題日期: 2006 年 6 月 11 日 題意: - 某間學校有 N 個學生,每個學生都有自己的衣物櫃.
: ShellSort ★★☆☆☆ 題組: Problem D 題號: 10152: ShellSort 解題者:林一帆 解題日期: 2006 年 4 月 10 日 題意:烏龜王國的烏龜總是一隻一隻疊在一起。唯一改變烏龜位置 的方法為:一隻烏龜爬出他原來的位置,然後往上爬到最上方。給 你一堆烏龜原來排列的順序,以及我們想要的烏龜的排列順序,你.
1. 假設以下的敘述為一未提供 “ 捷徑計算 ” 能力的程式段,試用程 式設計的技巧,使此敘述經此改 寫的動作後,具有與 “ 捷徑計算 ” 之 處理方法相同之處理模式。 if and then E1 else E2 endif.
JAVA 程式設計與資料結構 第十四章 Linked List. Introduction Linked List 的結構就是將物件排成一列, 有點像是 Array ,但是我們卻無法直接經 由 index 得到其中的物件 在 Linked List 中,每一個點我們稱之為 node ,第一個 node.
AI: 人工智慧簡介  人工智慧 (Artificial intelligent, AI) 簡介  問題與求解  知識表示方法  推理機制與專家系統  類神經網路  模糊控制  基因演算法  智慧型代理人.
: The Playboy Chimp ★★☆☆☆ 題組: Problem Set Archive with Online Judge 題號: 10611: The Playboy Chimp 解題者:蔡昇宇 解題日期: 2010 年 2 月 28 日 題意:給一已排序的數列 S( 升冪.
Department of Air-conditioning and Refrigeration Engineering/ National Taipei University of Technology 模糊控制設計使用 MATLAB 李達生.
Monte Carlo Simulation Part.2 Metropolis Algorithm Dept. Phys. Tunghai Univ. Numerical Methods C. T. Shih.
第一章 演算法:效率、分析與量級 1.1演算法 1.2發展有效率演算法的重要性 1.3演算法的分析 1.4量級(Order)
JAVA 程式設計與資料結構 第十章 GUI Introdution III. File Chooser  File Chooser 是一個選擇檔案的圖形介面, 無論我們是要存檔還是要開啟檔案,使 用這個物件都會讓我們覺得容易且舒適。
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
Introduction to Java Programming Lecture 17 Abstract Classes & Interfaces.
: The largest Clique ★★★★☆ 題組: Contest Archive with Online Judge 題號: 11324: The largest Clique 解題者:李重儀 解題日期: 2008 年 11 月 24 日 題意: 簡單來說,給你一個 directed.
: Happy Number ★ ? 題組: Problem Set Archive with Online Judge 題號: 10591: Happy Number 解題者:陳瀅文 解題日期: 2006 年 6 月 6 日 題意:判斷一個正整數 N 是否為 Happy Number.
7.1 背景介紹 7.2 多解析度擴展 7.3 一維小波轉換 7.4 快速小波轉換 7.5 二維小波轉換 7.6 小波封包
CH.8 偵錯 Visual Basic CH.8 偵錯 Visual Basic  資三甲   章乃云 三種類型的錯誤 三種類型的錯誤.
: Problem A : MiniMice ★★★★☆ 題組: Contest Archive with Online Judge 題號: 11411: Problem A : MiniMice 解題者:李重儀 解題日期: 2008 年 9 月 3 日 題意:簡單的說,題目中每一隻老鼠有一個編號.
: Ahoy, Pirates! ★★★★☆ 題組: Contest Archive with Online Judge 題號: 11402: Ahoy, Pirates! 解題者:李重儀 解題日期: 2008 年 8 月 26 日 題意:有一個海盜島有 N 個海盜,他們的編號 (id)
Fugacity Coefficient and Fugacity
: Multisets and Sequences ★★★★☆ 題組: Problem Set Archive with Online Judge 題號: 11023: Multisets and Sequences 解題者:葉貫中 解題日期: 2007 年 4 月 24 日 題意:在這個題目中,我們要定義.
資料結構實習-一 參數傳遞.
4 堆疊與佇列 4.1 前言 四種基本的資料結構 (可儲存資料的容器) 陣列 (Array)、串列(List): 最基本
: A-Sequence ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 10930: A-Sequence 解題者:陳盈村 解題日期: 2008 年 5 月 30 日 題意: A-Sequence 需符合以下的條件, 1 ≤ a.
: Beautiful Numbers ★★★★☆ 題組: Problem Set Archive with Online Judge 題號: 11472: Beautiful Numbers 解題者:邱經達 解題日期: 2011 年 5 月 5 日 題意: 若一個 N 進位的數用到該.
第 9 章 TSR 程式基本教練. 本章提要 TSR 程式 以熱鍵 (Hot key) 叫用 TSR 程式 Clock 中斷 int 08h 、 int 1ch DOS reentrant 的問題 有用的 TSR 程式.
: 05-2 Rendezvous ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 11015: 05-2 Rendezvous 解題者:池明洋 解題日期: 2006 年 4 月 16 日 題意: 給 node N 個 , edge.
Section 4.2 Probability Models 機率模式. 由實驗看機率 實驗前先列出所有可能的實驗結果。 – 擲銅板:正面或反面。 – 擲骰子: 1~6 點。 – 擲骰子兩顆: (1,1),(1,2),(1,3),… 等 36 種。 決定每一個可能的實驗結果發生機率。 – 實驗後所有的實驗結果整理得到。
JAVA 程式設計與資料結構 第二十章 Searching. Sequential Searching Sequential Searching 是最簡單的一種搜尋法,此演 算法可應用在 Array 或是 Linked List 此等資料結構。 Sequential Searching 的 worst-case.
演算法 8-1 最大數及最小數找法 8-2 排序 8-3 二元搜尋法.
Chapter 3 Entropy : An Additional Balance Equation
845: Gas Station Numbers ★★★ 題組: Problem Set Archive with Online Judge 題號: 845: Gas Station Numbers. 解題者:張維珊 解題日期: 2006 年 2 月 題意: 將輸入的數字,經過重新排列組合或旋轉數字,得到比原先的數字大,
兔子進化的例子. 物競天擇 (Selection) 交配 ( 換 )(Cross Over) 突變 (Mutation)
Chapter 10 m-way 搜尋樹與B-Tree
: Function Overloading ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 11032:Function Overloading 解題者:許智祺 解題日期: 2007 年 5 月 8 日 題意:判對輸入之數字是否為.
1 Pseudorandom-Permutation Index. 2 Outline Introduction Goh’s Z-IDX PRP-Index Secure game.
Probability Distribution 機率分配 汪群超 12/12. 目的:產生具均等分配的數值 (Data) ,並以 『直方圖』的功能計算出數值在不同範圍內出現 的頻率,及繪製數值的分配圖,以反應出該 機率分配的特性。
2005/7 Linear system-1 The Linear Equation System and Eliminations.
5 重複迴圈 5.1 增減運算符號 增量運算符號 減量運算符號
: Ordering Tasks ☆☆☆☆☆ 題組: Problem Set Archive with Online Judge 題號: 10305: Ordering Tasks 解題者:陳相廷 解題日期: 2006 年 6 月 12 日 題意:給定兩兩工作的先後關係,求出整體合 法執行順序。
連續隨機變數 連續變數:時間、分數、重量、……
: Wine trading in Gergovia ★★☆☆☆ 題組: Contest Volumes with Online Judge 題號: 11054: Wine trading in Gergovia 解題者:劉洙愷 解題日期: 2008 年 2 月 29 日 題意:在 Gergovia.
第九章  基因演算法則.
: Searching for Nessy ★☆☆☆☆ 題組: Problem Set Archive with Online Judge 題號: 11044: Searching for Nessy 解題者:王嘉偉 解題日期: 2007 年 5 月 22 日 題意: 給定 case 數量.
Visual C++重點複習.
Microsoft Excel.
第五章IIR數位濾波器設計 濾波器的功能乃對於數位信號進行處理﹐ 以滿足系統的需求規格。其作法為設計一 個系統的轉移函數﹐或者差分方程式﹐使 其頻率響應落在規格的範圍內。本章探討 的是其中一種方法﹐稱為Infinite impulse register(IIR)。 IIR架構說明。 各種不同頻帶(Band)濾波器的設計方法。
幼兒行為觀察與記錄 第八章 事件取樣法.
CH 14-可靠度工程之數學基礎 探討重點 失效時間之機率分配 指數模式之可靠度工程.
第 1 章 PC 的基本構造. 本章提要 PC 系統簡介 80x86 系列 CPU 及其暫存器群 記憶體: Memory 80x86 的分節式記憶體管理 80x86 的 I/O 結構 學習組合語言的基本工具.
: How many 0's? ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 11038: How many 0’s? 解題者:楊鵬宇 解題日期: 2007 年 5 月 15 日 題意:寫下題目給的 m 與 n(m
Chapter 6: Transform and Conquer Genetic Algorithms The Design and Analysis of Algorithms.
Evolutionary Intelligence
More on Heuristics Genetic Algorithms (GA) Terminology Chromosome –candidate solution - {x 1, x 2,...., x n } Gene –variable - x j Allele –numerical.
Ming-Feng Yeh Genetic Algorithm Genetic algorithms are a part of evolutionary computing, which is a rapidly growing area of artificial intelligence.
Genetic Algorithms What is a GA Terms and definitions Basic algorithm.
Chapter 12 FUSION OF FUZZY SYSTEM AND GENETIC ALGORITHMS Chi-Yuan Yeh.
EE749 I ntroduction to Artificial I ntelligence Genetic Algorithms The Simple GA.
D Nagesh Kumar, IIScOptimization Methods: M8L5 1 Advanced Topics in Optimization Evolutionary Algorithms for Optimization and Search.
取樣 3.1 量化 3.2 向量量化 第1頁第1頁 3.1 取樣  數位影像:  數位影像:在空間座標和亮度都離散化的影像  取樣:  取樣:取不同空間位置的函數 ( 灰階 ) 值當樣本  量化:  量化:用一組整數值來表示這些樣本.
1 Contents 1. Basic Concepts 2. Algorithm 3. Practical considerations Genetic Algorithm (GA)
Genetic Algorithms. Underlying Concept  Charles Darwin outlined the principle of natural selection.  Natural Selection is the process by which evolution.
Genetic Algorithm Dr. Md. Al-amin Bhuiyan Professor, Dept. of CSE Jahangirnagar University.
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal Evolutionary Computation.
Presentation transcript:

GA Genetic Algorithm

 Introduction  Algorithm  GA Operations  Chromosome representation  Fitness function  Demonstration of LibGA

Introduction 基因演算法最早由 Holland (1975) 所提出, 它是一種隨機全域搜尋之求解技術,可以仿照 自然界生物適者生存之智慧型演化法則,逐步 的將解答空間收斂在很小的範圍內,然後從中 選取滿意解。 求解方式乃將可行解以字元串形式表示基因 串列,然後將之置入交配池,作為後續之基因 演化之交配或突變之群體。求解過程屬一重複 性的程序,朝向事先規範的方向(適應函數) 重複執行,直到收斂解或設定條件出現為止。

Genetic algorithm and application  Holland initially introduced the genetic algorithm (GA), which is a global search technique (Holland, 1975).  GA has received much attention and was applied successfully in many research fields over the last decade.  GA explores the solution space using concepts taken from natural genetics and evolution theory.  The search algorithm analyses and extracts superior evolving information from the search space, and guides the search in a pre-specified direction.

GA Algorithm Step 1. Generate a random initial population of chromosomes of size P. Step 2. Encode all chromosomes and evaluate the objective function of their corresponding candidate solutions. Step 3. Determine the fitness values of the chromosomes using the predetermined objective function. Step 4. If the elitism policy is employed, insert the best chromosomes into the new generation pool.

GA Algorithm Step 5. Choose a pair of parent chromosomes from the current population without replacement. Apply the crossover and mutation operators to yield a pair of new chromosomes. Step 6. Insert the new chromosomes into the new population. If the new population is smaller than P, return to Step 5. Step 7. If the pre-specified stopping criterion has been met, go Step 8; otherwise, return to Step 2. Step 8. Select and decode the overall best chromosome to be the final solution.

GA Operations The basic operations of GA –Reproduction –Selection –Crossover –Mutation

Reproduction If the elitism policy is employed, insert the best chromosomes into the new generation pool. The chromosomes with higher fitness are more likely to become parents of new chromosomes. The reproduction gap defined in the GA configuration file determines the proportion of elite chromosomes. The best chromosomes in the last generation are copied directly into the next generation.

Selection The selection policy employed commonly is a combination of the rotating roulette wheel strategy and the elite strategy. The elite strategy can force the best surviving chromosomes, based on the fitness values of the current generation, into the next generation.

Crossover LibGA provides ten crossover methods, only “ORDER1”, “ORDER2”, “PMX” and “CYCLE,” which are suited to permutation processing, are employed here. The procedures of each method are briefly described below. The crossover operation is processed whether or not it is determined by a value generated randomly. If the value exceeds the crossover rate that was established in the configuration file of GA parameters, then the clone operation, rather than the crossover operation, is performed.

Order1 Initially, select two random crossover points. Then, the offspring inherits the elements between the two crossover points from the selected parent, in the order and position in which the parent appeared. The remaining elements are inherited from the other parent in the order in which they appeared in that parent, beginning with the first position, followed by the second crossover point, and skipping over all elements that are already present in the offspring.

Order2 Select four random crossover points as key positions to determine the order in which these genes appear in one parent and are subsequently imposed on the other parent to produce two offspring.

PMX Randomly select two crossover points. Then, the offspring inherits the elements between the two starting positions in one of the parents. Each element between the two crossover points of the other parent is mapped to the position of this element in the first parent. Then, the remaining elements are inherited from the other parent.

CYCLE Randomly select a crossover point as a cycle starting point. The offspring inherits the element at the starting point of the selected parent. The element that is located in the corresponding position in the other parent cannot then be placed in this position, and thus it takes a position in the selected parent from which the offspring then inherits it. This procedure is repeated until the initial item in the unselected parent is encountered, completing the cycle. The offspring inherits from the unselected parent any elements that are not yet present.

Mutation The swap method is normally used as the mutation operation. The swap procedure randomly selects two points to determine the two changing points of the selected parent. The mutation operation is processed whether or not it is determined by a value generated randomly. If the value exceeds the mutation rate established in the configuration file of GA parameters, no mutation is performed and the selected parent is passed directly into the new generation.

The demonstration of crossover operation Bit string Parent Offspring Parent

The demonstration of mutation operation Parent | | Offspring | |

Chromosome representation  Integers are employed to represent the operation of assigning task to workstation in successive number of 1, 2, …, N, respectively.  A candidate solution can be encoded as a string by a permutation of {1, 2, …, N} to form a chromosome.

Encoding Example: ‘ ’ is one possible chromosome in the example of 3 tasks ×3 machines shown as follows: Chromosome representation abc W1123 W2456 W3789

Decoding Example: String of ‘ ’ can be decoded as:  Task a is assigned to Workstation W1 (String 1),  Task b to Workstation W2 (String 5), and  Task c to Workstation W3 (String 9).  Strings 4 (Task a), 2 (Task b), 6 (Task c), 8 (Task b), 7 (Task a), and 3 (Task c) are dummies. Chromosome representation

 A weighting function (Eq. 9) is derived from the five system objective functions to evaluate the fitness values (FV) of a given chromosome.  In Eq. (9), w i represents the weighting values of objectives.  A smaller FV means that the chromosome is more likely to survive to the next generation. Fitness function