Lecture 11: Genetic Algorithms

Hasonló dokumentumok
Cluster Analysis. Potyó László

Miskolci Egyetem Gazdaságtudományi Kar Üzleti Információgazdálkodási és Módszertani Intézet Nonparametric Tests

Intelligens Rendszerek I. Problémamegoldás kereséssel: informált kereső eljárások (Optimálási módszerek)

Statistical Inference

Correlation & Linear Regression in SPSS

Miskolci Egyetem Gazdaságtudományi Kar Üzleti Információgazdálkodási és Módszertani Intézet. Hypothesis Testing. Petra Petrovics.

Miskolci Egyetem Gazdaságtudományi Kar Üzleti Információgazdálkodási és Módszertani Intézet. Nonparametric Tests. Petra Petrovics.

Performance Modeling of Intelligent Car Parking Systems

Genome 373: Hidden Markov Models I. Doug Fowler

FAMILY STRUCTURES THROUGH THE LIFE CYCLE

Construction of a cube given with its centre and a sideline

Mapping Sequencing Reads to a Reference Genome

Create & validate a signature

Angol Középfokú Nyelvvizsgázók Bibliája: Nyelvtani összefoglalás, 30 kidolgozott szóbeli tétel, esszé és minta levelek + rendhagyó igék jelentéssel

Csima Judit április 9.


Efficient symmetric key private authentication

A rosszindulatú daganatos halálozás változása 1975 és 2001 között Magyarországon

KIEGÉSZÍTŽ FELADATOK. Készlet Bud. Kap. Pápa Sopr. Veszp. Kecsk Pécs Szomb Igény

Véges szavak általánosított részszó-bonyolultsága

Can/be able to. Using Can in Present, Past, and Future. A Can jelen, múlt és jövő idejű használata

Tudományos Ismeretterjesztő Társulat

Klaszterezés, 2. rész

On The Number Of Slim Semimodular Lattices

TÉRGAZDÁLKODÁS - A TÉR MINT VÉGES KÖZÖSSÉGI ERŐFORRÁS INGATLAN NYILVÁNTARTÁS - KÜLFÖLDI PÉLDÁK H.NAGY RÓBERT, HUNAGI

3. MINTAFELADATSOR KÖZÉPSZINT. Az írásbeli vizsga időtartama: 30 perc. III. Hallott szöveg értése

OLYMPICS! SUMMER CAMP

Grammatical Evolution. Department of Cybernetics, CTU Prague.

MATEMATIKA ANGOL NYELVEN

Bevezetés a kvantum-informatikába és kommunikációba 2015/2016 tavasz

Ensemble Kalman Filters Part 1: The basics

Széchenyi István Egyetem

MATEMATIKA ANGOL NYELVEN

STUDENT LOGBOOK. 1 week general practice course for the 6 th year medical students SEMMELWEIS EGYETEM. Name of the student:

SQL/PSM kurzorok rész

discosnp demo - Peterlongo Pierre 1 DISCOSNP++: Live demo

Adatbázisok 1. Rekurzió a Datalogban és SQL-99

ELEKTRONIKAI ALAPISMERETEK ANGOL NYELVEN

Dependency preservation

USER MANUAL Guest user

Ültetési és öntözési javaslatok. Planting and watering instructions

Gottsegen National Institute of Cardiology. Prof. A. JÁNOSI

MATEMATIKA ANGOL NYELVEN

SAJTÓKÖZLEMÉNY Budapest július 13.

MATEMATIKA ANGOL NYELVEN

2. Local communities involved in landscape architecture in Óbuda

Correlation & Linear Regression in SPSS

INDEXSTRUKTÚRÁK III.

MATEMATIKA ANGOL NYELVEN

Miskolci Egyetem Gazdaságtudományi Kar Üzleti Információgazdálkodási és Módszertani Intézet. Correlation & Linear. Petra Petrovics.

MATEMATIKA ANGOL NYELVEN

PIACI HIRDETMÉNY / MARKET NOTICE

MATEMATIKA ANGOL NYELVEN

ENROLLMENT FORM / BEIRATKOZÁSI ADATLAP

Expansion of Red Deer and afforestation in Hungary

ANGOL NYELV KÖZÉPSZINT SZÓBELI VIZSGA I. VIZSGÁZTATÓI PÉLDÁNY

MATEMATIKA ANGOL NYELVEN

MATEMATIKA ANGOL NYELVEN

EN United in diversity EN A8-0206/419. Amendment

AZ ACM NEMZETKÖZI PROGRAMOZÓI VERSENYE

Computer Architecture

Kezdőlap > Termékek > Szabályozó rendszerek > EASYLAB és TCU-LON-II szabályozó rendszer LABCONTROL > Érzékelő rendszerek > Típus DS-TRD-01

2. Tavasz Kupa. Uszonyos és Búvárúszó Verseny Kiírása

Website review acci.hu

Adattípusok. Max. 2GByte

ELEKTRONIKAI ALAPISMERETEK ANGOL NYELVEN

16F628A megszakítás kezelése

Abigail Norfleet James, Ph.D.

Adattípusok. Max. 2GByte

Hogyan használja az OROS online pótalkatrész jegyzéket?

MATEMATIKA ANGOL NYELVEN MATHEMATICS

Vizsgáztatás multimédia eszközökkel

Supplementary Figure 1

Sebastián Sáez Senior Trade Economist INTERNATIONAL TRADE DEPARTMENT WORLD BANK

Bel SE Hungary IDPA. Stage 1st: Jewelry store 1. pálya: Ékszerész. Course Designer:Attila Belme

Proxer 7 Manager szoftver felhasználói leírás

Unit 10: In Context 55. In Context. What's the Exam Task? Mediation Task B 2: Translation of an informal letter from Hungarian to English.

First experiences with Gd fuel assemblies in. Tamás Parkó, Botond Beliczai AER Symposium

A modern e-learning lehetőségei a tűzoltók oktatásának fejlesztésében. Dicse Jenő üzletfejlesztési igazgató

Word and Polygon List for Obtuse Triangular Billiards II

Contact us Toll free (800) fax (800)

Block cipher modes. - five standardized modes (operation, properties)

Block cipher modes. Cryptographic Protocols (EIT ICT MSc) Dr. Levente Buttyán

ANGOL NYELV KÖZÉPSZINT SZÓBELI VIZSGA I. VIZSGÁZTATÓI PÉLDÁNY

ANGOL NYELVI SZINTFELMÉRŐ 2013 A CSOPORT. on of for from in by with up to at

NASODRILL ORRSPRAY: TARTÁLY- ÉS DOBOZFELIRAT, VALAMINT A BETEGTÁJÉKOZTATÓ SZÖVEGE. CSECSEMŐ GYERMEK FELNŐTT 100 ml-es üveg

PIACI HIRDETMÉNY / MARKET NOTICE

A évi fizikai Nobel-díj

Using the CW-Net in a user defined IP network

Tudok köszönni tegezve és önözve, és el tudok búcsúzni. I can greet people in formal and informal ways. I can also say goodbye to them.

ELEKTRONIKAI ALAPISMERETEK ANGOL NYELVEN

There is/are/were/was/will be

ADATREJTÉS ÉS SZÖVEGSTATISZTIKÁK A BMF-SzGTI kriptográfiai tárgycsoportjához kapcsolódó hallgatói projektek és kutatások

MATEMATIKA ANGOL NYELVEN

Tavaszi Sporttábor / Spring Sports Camp május (péntek vasárnap) May 2016 (Friday Sunday)

ANGOL NYELVI SZINTFELMÉRŐ 2012 A CSOPORT. to into after of about on for in at from

Supporting Information

ELEKTRONIKAI ALAPISMERETEK ANGOL NYELVEN

Nemzetközi Kenguru Matematikatábor

Smaller Pleasures. Apróbb örömök. Keleti lakk tárgyak Répás János Sándor mûhelyébõl Lacquerware from the workshop of Répás János Sándor

Átírás:

Lecture 11 1 Linear and Combinatorial Optimization Lecture 11: Genetic Algorithms Genetic Algorithms - idea Genetic Algorithms - implementation and examples

Lecture 11 2 Genetic algorithms Algorithm is based on ideas from nature: Natural selection - the most fit survive Reproduction Mutation We assume during the lecture that the problem is formulated as a maximization problem with a positive objective function. One has to be able to represent feasible solutions as strings. max f(x) x D

Lecture 11 3 Example D - set of 5-bit strings Each string is binary coding of an integer. Objective function is f = x 2. string x fitness of total 1 01101 13 169 0.144 2 11000 24 576 0.492 3 01000 8 64 0.055 4 10011 19 361 0.309 1170 1 Consider the string as individuals in a small population. Let the strings reproduce proportionally to their objective function.

Lecture 11 4 Genetic algorithms Consider the objective function for each string in the population. Let strings reproduce proportionally to their objective function. At reproduction, two parent strings are mixed randomly together - crossover. In addition, there is a small risk of individual bits being mutated. Repeat with next generation.

Lecture 11 5 Crossover After reproduction, one proceeds with crossover - the strings of two parents are mixed. An integer position k is randomly chosen. First, copy parents and then swap all bits between k+1 and the length of the string. Example: String nr 1 and 2 reproduce. Swapping occurs after bit nr 4. Parent 1 Child * 01101 01100 ****- Parent 2 Child - 11000 11001 ----*

Lecture 11 6 Schemata Singular: Schema Introduce a new letter in the alphabet * - don t care symbol. Schema 1*000 = the set {10000,11000} How many schemata are there? 3 5 Consider two strings 1***0 and **11* which one has highest probability of surviving to the next generation?

Lecture 11 7 More about schemata Define the length δ(h) of schema H as the distance between the first and last specific string position. Example: δ( 10 1 ) = 4 δ( 10 ) = 1 Define the order o(h) of a schema H as the number of specific string positions. Example: o( 10 1 ) = 3 o( 10 ) = 2

Lecture 11 8 Particulars Scaling: It may be advantageous to rescale the objective function. For small populations, often one uses f max 2f average. Dominant and recessive genes Several sexes. Different strategies for genetic optimization. Tribes with different strategies, migration.

Lecture 11 9 Implementation 1. Initiate generation 1 randomly. 2. Create next generation through: (a) Randomly select parents according to the objective function (fitness). (b) Compute children through crossover and mutation. (c) Compute the objective function for the children. 3. Go to step 2 if the stop criterion is not fulfilled.

Lecture 11 10 Vigenere cipher The key is short string, for example, HELLO. At encryption and decryption, the key is written periodically below the text. Each letter in the key gives the number of (cyclic) shifts for the above letter in the alphabet a -> b -> c ->... -> y -> z -> a -> b... A means no shift, B one step, C two steps etc. Example abcdefghijklmnopqrstuvwxyz thistextshouldbeencrypted HELLOHELLOHELLOHELLOHELLO altdhlbedvvywopliynfftepr

Lecture 11 11 Solving the Vigenere cipher Optimization problem: max f(key,encryptedtext) key Keys f can be a statistical estimate of how well the text decrypted with key follows natural language, using statistics for bigrams or trigrams of letters. Start with a number of random key strings. We assume that the length of the key is known. The strings then breed with the ordinary crossover rules.

Lecture 11 12 Generation 1 sdxmmhär zähh oqb hzxövåca mehtrvub åbqulykg yzsfqiii cgvkegvc faevshbs Generation 2 faeh oqb zähvshbs faevshvc cgvkegbs fdxmmhär saevshbs mehtrvub zähh oqb

Lecture 11 13 Results Example 1: Text with 200 letters. Key with 4 letters. Alphabet with 30 letters. t fmin fmean fmax fstd totalmax 1 0.53 1.7018 4.7282 0.6563 4.7282 2 0.72 1.9231 5.5949 0.7805 5.5949 3 0.71 2.2287 5.5949 0.9491 5.5949 4 0.75 2.5825 7.1498 1.0967 7.1498 5 0.75 3.0904 7.1498 1.2335 7.1498 6 0.95 3.5107 7.1498 1.2409 7.1498 7 1.26 3.9777 7.1498 1.3030 7.1498 8 1.26 4.4479 7.1498 1.2314 7.1498 9 1.60 4.7831 7.1498 1.1794 7.1498 10 1.62 5.0292 9.8270 1.2037 9.8270 11 2.25 5.3183 9.8270 1.2417 9.8270 12 2.25 5.5270 9.8270 1.2638 9.8270 Key: komb Score: 9.827 Text: två grannar jag har i min boning den ene är sentimental jag hör honom högt deklamera om sorg och livets kval

Lecture 11 14 Results Example 2: Text with 2000 letters. Key with 24 letters. Alphabet with 30 letters. The number of feasible solutions: 30 24 = 2.824310 35. 10 9 8 7 6 5 4 3 2 1 0 0 50 100 150 200 250 300 350 400 fmin, fmean and fmax for population as a function of generation

Lecture 11 15 Part of population at generation 1. pleqrwxsyqnyqjomooäkiyrv poinvrtönaöbjdwihzmyzeju g up kå xivöäkqyhykyroäz deeofazcdkpikermödrlbrix slzajprta mäömgcåånpqåoh fönpzhexejyqjfenyiiecemd guesijpfzök dwibmzäöhuj jawvzfyäötonfteozwguäyhs xrjjåfrmpxdääybxäyukqrix qxasösjgqustbuljbpåszgtv åiavöewonkj kjxhnuåbc po ölxleyswjyyäeåqoflksunvq pdimö huäblomc evqåcäqqå qhdwgbtk ö jarxmrypvwägy qajq mpitgfiht ölrt eözl vu åpäzgmätwözgrqäomfynä hrs antobbulssd laucu xå xhsvqicljvznrasrlipnqsvö srvdhnhgtlsdbqcdehqlqöay t cälyyocsntjbccwqjtcöuh

Lecture 11 16 Part of population at generation 400. omginatokink optimering kombinatorisk oktimldfnd kombilatorisknoptimering kombinatoriåk optimerivg kombinatoriskhoptmmering kombinatofisk optomering kombinatorisg optimering kombinatorisk oprimering kompinatbrisk oprimering komkinatyrisk optimwrsnq koqbinatorisk optimering kombinaeorisk ogtimerifg kombinaworjsk opåiperung kompinatorisk optimezing uombonayolävk optimaring kombinathrisk optimering kombisttoriskåoptimeriig kombinatorisk optimering kombinatorvuk optimerind kombixatorisk wttimeoing

Lecture 11 17 The best solution Key: kombinatorisk optimering Score: 9.72 Text: två grannar jag har i min boning den ene är sentimental jag hör honom högt deklamera om sorg och livets kval... lejon lurar hon i sitt förstäck och såsom en modig rövarska

Lecture 11 18 Conclusions Ideas from nature Hard to analyse Easy to implement Room for improvements - creative ideas welcome