Ming-Feng Yeh1-102 4. Genetic Algorithm Genetic algorithms are a part of evolutionary computing, which is a rapidly growing area of artificial intelligence.

Slides:



Advertisements
Similar presentations
6-1 指標簡介 6-2 指標與陣列 6-3 動態配置記憶體 6-4 本章綜合練習
Advertisements

本章結構 前言 符號介紹與立透法則 指數機率分配 基本無限來源模式 基本有限來源模式 等候系統的經濟分析-最佳化 進階等候模式 16-1.
布林代數的應用--- 全及項(最小項)和全或項(最大項)展開式
第七章 抽樣與抽樣分配 蒐集統計資料最常見的方式是抽查。這 牽涉到兩個問題: 抽出的樣本是否具有代表性?是否能反應出母體的特徵?
: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 Advanced Chemical Engineering Thermodynamics Appendix BK The Generalized van der Waals Partition Function.
:New Land ★★★★☆ 題組: Problem Set Archive with Online Judge 題號: 11871: New Land 解題者:施博修 解題日期: 2011 年 6 月 8 日 題意:國王有一個懶兒子,為了勞動兒子,他想了一個 辦法,令他在某天早上開始走路,直到太陽下山前,靠.
: OPENING DOORS ? 題組: Problem Set Archive with Online Judge 題號: 10606: OPENING DOORS 解題者:侯沛彣 解題日期: 2006 年 6 月 11 日 題意: - 某間學校有 N 個學生,每個學生都有自己的衣物櫃.
第一章 變數、常數及資料型態. 變數 C 程式語言的變數名稱 第一個字必須是英文字母或底線 (_) 之後可以是數字, 英文字母或底線 (_) 不可以是保留字 例: Num (Ο) _score (Ο) C&C (X) 8num (X)
: ShellSort ★★☆☆☆ 題組: Problem D 題號: 10152: ShellSort 解題者:林一帆 解題日期: 2006 年 4 月 10 日 題意:烏龜王國的烏龜總是一隻一隻疊在一起。唯一改變烏龜位置 的方法為:一隻烏龜爬出他原來的位置,然後往上爬到最上方。給 你一堆烏龜原來排列的順序,以及我們想要的烏龜的排列順序,你.
1.1 電腦的特性 電腦能夠快速處理資料:電腦可在一秒內處理數百萬個 基本運算,這是人腦所不能做到的。原本人腦一天的工 作量,交給電腦可能僅需幾分鐘的時間就處理完畢。 電腦能夠快速處理資料:電腦可在一秒內處理數百萬個 基本運算,這是人腦所不能做到的。原本人腦一天的工 作量,交給電腦可能僅需幾分鐘的時間就處理完畢。
第 4 章 迴歸的同步推論與其他主題.
1. 假設以下的敘述為一未提供 “ 捷徑計算 ” 能力的程式段,試用程 式設計的技巧,使此敘述經此改 寫的動作後,具有與 “ 捷徑計算 ” 之 處理方法相同之處理模式。 if and then E1 else E2 endif.
Section 2.2 Correlation 相關係數. 散佈圖 1 散佈圖 2 散佈圖的盲點 兩座標軸的刻度不同,散佈圖的外觀呈 現的相聯性強度,會有不同的感受。 散佈圖 2 相聯性看起來比散佈圖 1 來得強。 以統計數字相關係數做為客觀標準。
第三章 變數與繫結 陳維魁 博士 儒林圖書公司. 2 大綱  變數的定義  變數元件  儲存區配置問題  參考的透明性  完全計算  捷徑計算  繫結 (binding)  繫結時間  精選習題.
8.1 何謂高度平衡二元搜尋樹 8.2 高度平衡二元搜尋樹的加入 8.3 高度平衡二元搜尋樹的刪除
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.
Integrated single vendor single buyer model with stochastic demand and variable lead time 指導教授:林燦煌 博士 指導教授:林燦煌 博士 研 究 生:黃笙源 研 究 生:黃笙源 M. Ben-Daya, M. Hariga.
Introduction to Java Programming Lecture 17 Abstract Classes & Interfaces.
最新計算機概論 第 5 章 系統程式. 5-1 系統程式的類型 作業系統 (OS) : 介於電腦硬體與 應用軟體之間的 程式,除了提供 執行應用軟體的 環境,還負責分 配系統資源。
: Tight words ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: : Tight Words 解題者:鐘緯駿、林一帆 解題日期: 2006 年 03 月 14 日 題意: 給定數字 k 與 n (0 ≦ k.
選舉制度、政府結構與政 黨體系 Cox (1997) Electoral institutions, cleavage strucuters, and the number of parties.
資料結構實習-一 參數傳遞.
GA Genetic Algorithm.  Introduction  Algorithm  GA Operations  Chromosome representation  Fitness function  Demonstration of LibGA.
Lecture 7 Sorting in Linear Time. Sorting in Linear Time2 7.1 Lower bounds for sorting 本節探討排序所耗用的時間複雜度下限。 任何一個以比較為基礎排序的演算法,排序 n 個元 素時至少耗用 Ω(nlogn) 次比較。
4 堆疊與佇列 4.1 前言 四種基本的資料結構 (可儲存資料的容器) 陣列 (Array)、串列(List): 最基本
第 9 章 TSR 程式基本教練. 本章提要 TSR 程式 以熱鍵 (Hot key) 叫用 TSR 程式 Clock 中斷 int 08h 、 int 1ch DOS reentrant 的問題 有用的 TSR 程式.
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.
資料結構實習-二.
1 第七章 植基於可調整式量化表及離散餘 弦轉換之浮水印技術. 2 Outlines 介紹 介紹 灰階浮水印藏入 灰階浮水印藏入 灰階浮水印取回 灰階浮水印取回 實驗結果 實驗結果.
845: Gas Station Numbers ★★★ 題組: Problem Set Archive with Online Judge 題號: 845: Gas Station Numbers. 解題者:張維珊 解題日期: 2006 年 2 月 題意: 將輸入的數字,經過重新排列組合或旋轉數字,得到比原先的數字大,
Chapter 2. Recurrence Relations (遞迴關係)
Intro to AI Genetic Algorithm Ruth Bergman Fall 2002.
兔子進化的例子. 物競天擇 (Selection) 交配 ( 換 )(Cross Over) 突變 (Mutation)
Chapter 10 m-way 搜尋樹與B-Tree
: Function Overloading ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 11032:Function Overloading 解題者:許智祺 解題日期: 2007 年 5 月 8 日 題意:判對輸入之數字是否為.
What is Computer.
描述統計 描述統計(Descriptive Statistics)-將蒐集到的資料加以整理和記錄,並以數字和統計圖表的方式來分析及解釋資料所具有的特性. 基本統計值(平均數,中位數,標準差,變異量….) 相關性測量(卡方,相關係數,迴歸…)
Probability Distribution 機率分配 汪群超 12/12. 目的:產生具均等分配的數值 (Data) ,並以 『直方圖』的功能計算出數值在不同範圍內出現 的頻率,及繪製數值的分配圖,以反應出該 機率分配的特性。
Batching orders in warehouses by minimizing travel distance with genetic algorithms Chih-Ming Hsu, Kai-Ying Chen & Mu-Chen Chen.
2005/7 Linear system-1 The Linear Equation System and Eliminations.
連續隨機變數 連續變數:時間、分數、重量、……
Teacher : Ing-Jer Huang TA : Chien-Hung Chen 2015/6/30 Course Embedded Systems : Principles and Implementations Weekly Preview Question CH7.1~CH /12/26.
指導教授 : 林啟芳 教授 組員 : 邱秉良 林育賢. 何謂 GPS  GPS 即全球定位系統,是一個中距離圓 型軌道衛星導航系統。它可以為地球表面 絕大部分地區( 98% )提供準確的定位、 測速和高精度的時間標準。
第九章  基因演算法則.
1 Introduction to Java Programming Lecture 3 Mathematical Operators Spring 2008.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2004.
數字系統與資料表示法 教師: 陳炯勳 數系轉換 r進制數字 稱為 base r或 radix r 有r個計數符號,計數順序逢r歸零(進位) A n A n - 1 ‥‥A 2 A 1 A 0 ﹒A -1 A -2 ‥‥A -m 其中A n 及A.
:Rings and Glue ★★☆☆☆ 題組: Problem Set Archive with Online Judge 題號: 10301: Rings and Glue 解題者:施博修 解題日期: 2011 年 5 月 18 日 題意:小約翰有了個大麻煩,他不小心將 rings.
1 Knapsack Cryptosystems 2 ◎ Merkle-Hellman Knapsack Cryptosystem 觀察: (1) 0/1 knapsack problem (i.e. sum of subset) 例:已知 C = 14, A = (1, 10, 5, 22, 3)
CH 14-可靠度工程之數學基礎 探討重點 失效時間之機率分配 指數模式之可靠度工程.
McGraw-Hill/Irwin © 2003 The McGraw-Hill Companies, Inc.,All Rights Reserved. 肆 資料分析與表達.
Chapter 6: Transform and Conquer Genetic Algorithms The Design and Analysis of Algorithms.
Genetic Algorithm.
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
1 Consider a system of linear equations.  The variables, or unknowns, are referred to as x 1, x 2, …, x n while the a ij ’s and b j ’s are constants.
Chapter 3 Visual Basic.Net Visual Basic, like most programming languages, uses variables for storing values. Variables have a name (the word you use to.
Genetic Algorithms What is a GA Terms and definitions Basic algorithm.
Chapter 12 FUSION OF FUZZY SYSTEM AND GENETIC ALGORITHMS Chi-Yuan Yeh.
Genetic Algorithms. The Basic Genetic Algorithm 1.[Start] Generate random population of n chromosomes (suitable solutions for the problem) 2.[Fitness]
D Nagesh Kumar, IIScOptimization Methods: M8L5 1 Advanced Topics in Optimization Evolutionary Algorithms for Optimization and Search.
Genetic Algorithm Dr. Md. Al-amin Bhuiyan Professor, Dept. of CSE Jahangirnagar University.
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal Evolutionary Computation.
1 Comparative Study of two Genetic Algorithms Based Task Allocation Models in Distributed Computing System Oğuzhan TAŞ 2005.
Genetic Algorithms.
Artificial Intelligence Methods (AIM)
GENETIC ALGORITHMS & MACHINE LEARNING
Presentation transcript:

Ming-Feng Yeh Genetic Algorithm Genetic algorithms are a part of evolutionary computing, which is a rapidly growing area of artificial intelligence. Based on Darwinian principles of biological evolution. “ 物競天擇,適者生存 ” First proposed by Prof. John Holland and his colleague at Univ. of Michigan.

Ming-Feng Yeh1-103 Biological Background: 1 Chromosomes are strings of DNA and serves as a model for the whole organism. A chromosome consists of genes. Each gene encodes a trait. Complete set of genetic material (all chromosomes) is called genome. Particular set of genes in genome is called genotype.

Ming-Feng Yeh1-104 Biological Background: 2 During reproduction, first occurs recombination (or crossover). Genes from parents form in some way the whole new chromosome. The new created offspring can then be mutated. Mutation means, that the elements of DNA are a bit changed. This changes are mainly caused by errors in copying genes from parents. The fitness of an organism is measured by success of the organism in its life.

Ming-Feng Yeh1-105 Search Space The space of all feasible solutions (it means objects among those the desired solution is) is called search space (also state space). Each point in the search space represent one feasible solution. The looking for a solution is then equal to a looking for some extreme (minimum or maximum) in the search space. Search methods: hill climbing, tabular search, simulated annealing and genetic algorithm.

Ming-Feng Yeh1-106 Basic Description of GA Algorithm is started with a set of solutions (represented by chromosomes) called population. Solutions from one population are taken and used to form a new population. The new population (offspring) will be better than the old one (parent). Solutions which are selected to form new solutions are selected according to their fitness - the more suitable they are the more chances they have to reproduce.

Ming-Feng Yeh1-107 Basic Genetic Algorithm

Ming-Feng Yeh1-108 Basic GA: part 1 Step 1: [Start] Generate random population of n chromosomes (suitable solutions for the problem.) Step 2: [Fitness] Evaluate the fitness f(x) of each chromosome x in the population. Step 3: [New population] Create a new population by repeating following steps until the new population is complete.

Ming-Feng Yeh1-109 Basic GA: part 2 Step 3: Create a new population: 1. [Selection] Select two parent chromosomes from a population according to their fitness. 2. [Crossover] With a crossover probability cross over the parents to form a new offspring (children). If no crossover was performed, offspring is an exact copy of parents. 3. [Mutation] With a mutation probability mutate new offspring at each locus. 4. [Accepting] Place new offspring in a new population

Ming-Feng Yeh1-110 Basic GA: part 3 Step 4: [Replace] Use new generated population for a further run of algorithm Step 5: [Test] If the end condition is satisfied, stop, and return the best solution in current population Step 6: [Loop] Go to step 2.

Ming-Feng Yeh1-111 Operators of GA: Encoding The chromosome should in some way contain information about solution which it represents. The most used way of encoding is a binary string. Chromosome 1  Chromosome 2  Each bit in this string can represent some characteristic of the solution. One can encode directly integer or real numbers.

Ming-Feng Yeh1-112 Operators of GA: Selection Chromosomes are selected from the population to be parents to crossover. According to Darwin's evolution theory the best ones should survive and create new offspring. For example: roulette wheel selection, Boltzman selection, tournament selection, rank selection, steady state selection and some others.

Ming-Feng Yeh1-113 Roulette Wheel Selection Parents are selected according to their fitness. The better the chromosomes are, the more chances to be selected they have.

Ming-Feng Yeh1-114 Example fitness values f(x)=x 2 xstringfitness f(x)% of total total

Ming-Feng Yeh1-115 Rank Selection: 1 Rank selection first ranks the population and then every chromosome receives fitness from this ranking.

Ming-Feng Yeh1-116 Rank Selection: 2 After this all the chromosomes have a chance to be selected. But this method can lead to slower convergence, because the best chromosomes do not differ so much from other ones.

Ming-Feng Yeh1-117 Operators of GA: Crossover Crossover selects genes from parent chromosomes and creates a new offspring. Chromosome 1  | Chromosome 2  | Offspring 1  | Offspring 2  | “ | “ is the crossover point

Ming-Feng Yeh1-118 Crossover Single point crossover: = Two point crossover: = Uniform crossover : = Arithmetic crossover: = (AND)

Ming-Feng Yeh1-119 Operators of GA: Mutation Prevent falling all solutions in population into a local optimum of solved problem Mutation changes randomly the new offspring. Original offspring 1  Mutated offspring 1  Original offspring 2  Mutated offspring 2 

Ming-Feng Yeh1-120 Control Parameters GA has two control parameters: crossover rate (p c ) and mutation rate (p m ). p c (0.5~1.0): The higher the value of p c, the quicker are the new solutions introduced into the population. p m (0.005~0.05): Large values of p m transform the GA into a purely random search algorithm, while some mutations are required to prevent the premature convergence of the GA to suboptimal solutions.

Ming-Feng Yeh1-121 Numerical Example No.string xfitness% of total (max) total

Ming-Feng Yeh1-122 Numerical Example No.actual count (max)1.97 (max)2 (max) average

Ming-Feng Yeh1-123 Numerical Example No.string mate crossover site new string 10110| | | |

Ming-Feng Yeh1-124 Numerical Example No. new population xf(x)=x (max) (max)

Ming-Feng Yeh1-125 Real-Valued GA Basic (binary) GA 當系統參數增多時,編碼 (encoding) 及解碼 (decoding) 過程相當耗時,尤 其當字串長度不足時,亦可能造成浮點數運算 之精確度不足,而導致無法搜尋到「真正」的 最佳值。 實數型基因演算法是直接以實數參數運算,無 須透過離散式的編碼形式。故可以免除編碼及 解碼過程,亦可以提高系統之精確度。

Ming-Feng Yeh1-126 交配過程及突變過程 假設 P 1 與 P 2 為父代, C 1 與 C 2 為子代 交配過程: C 1 =   P 1 + (1  )  P 2 C 2 =   P 1 + (1   )  P 2 其中  和  為隨機值,且 ,   [0, 1] 突變過程: C ’ = C + random_noise 其中 random_noise 為所加入之隨機雜訊

Ming-Feng Yeh1-127 整數型基因演算法 直接以整數型態作為運算之基本單位,無須再 進行二進位轉換。 設變數之區間為 [0,  ] ,若以 4 位元編碼,則 可將此區間均分為 15 等分: 二進位 整數 實數 0  /  / 

Ming-Feng Yeh1-128 交配過程及突變過程 交配過程: 與 Binary GA 相似 突變過程:交換法 例:原始字串  突變後字串 