Workshop GA1. Introduction to the genetic algorithm

Similar documents
Laboratorio di Intelligenza Artificiale e Robotica

Laboratorio di Intelligenza Artificiale e Robotica

Module 12. Machine Learning. Version 2 CSE IIT, Kharagpur

Learning Methods for Fuzzy Systems

Learning Optimal Dialogue Strategies: A Case Study of a Spoken Dialogue Agent for

HARPER ADAMS UNIVERSITY Programme Specification

A GENERIC SPLIT PROCESS MODEL FOR ASSET MANAGEMENT DECISION-MAKING

Introduction to Simulation

TABLE OF CONTENTS TABLE OF CONTENTS COVER PAGE HALAMAN PENGESAHAN PERNYATAAN NASKAH SOAL TUGAS AKHIR ACKNOWLEDGEMENT FOREWORD

ICTCM 28th International Conference on Technology in Collegiate Mathematics

Ordered Incremental Training with Genetic Algorithms

(Sub)Gradient Descent

Firms and Markets Saturdays Summer I 2014

A Neural Network GUI Tested on Text-To-Phoneme Mapping

Axiom 2013 Team Description Paper

A SURVEY OF FUZZY COGNITIVE MAP LEARNING METHODS

Integrating simulation into the engineering curriculum: a case study

EECS 700: Computer Modeling, Simulation, and Visualization Fall 2014

Knowledge-Based - Systems

Guidelines on how to use the Learning Agreement for Studies

On the Combined Behavior of Autonomous Resource Management Agents

Cooperative evolutive concept learning: an empirical study

DIANA: A computer-supported heterogeneous grouping system for teachers to conduct successful small learning groups

MASTER OF SCIENCE (M.S.) MAJOR IN COMPUTER SCIENCE

Agent-Based Software Engineering

Answer Key Applied Calculus 4

CS 101 Computer Science I Fall Instructor Muller. Syllabus

Timeline. Recommendations

A simulated annealing and hill-climbing algorithm for the traveling tournament problem

Visual CP Representation of Knowledge

BA 130 Introduction to International Business

Decision Analysis. Decision-Making Problem. Decision Analysis. Part 1 Decision Analysis and Decision Tables. Decision Analysis, Part 1

Seminar - Organic Computing

A Reinforcement Learning Variant for Control Scheduling

Radius STEM Readiness TM

Artificial Neural Networks written examination

Evolutive Neural Net Fuzzy Filtering: Basic Description

Georgetown University at TREC 2017 Dynamic Domain Track

Lecture 1: Basic Concepts of Machine Learning

Research Article Hybrid Multistarting GA-Tabu Search Method for the Placement of BtB Converters for Korean Metropolitan Ring Grid

Mathematics subject curriculum

Ricopili: Postimputation Module. WCPG Education Day Stephan Ripke / Raymond Walters Toronto, October 2015

Evidence for Reliability, Validity and Learning Effectiveness

PH.D. IN COMPUTER SCIENCE PROGRAM (POST M.S.)

Thesis-Proposal Outline/Template

Grade 6: Correlated to AGS Basic Math Skills

An OO Framework for building Intelligence and Learning properties in Software Agents

Certified Six Sigma Professionals International Certification Courses in Six Sigma Green Belt

Pragmatic Use Case Writing

A Genetic Irrational Belief System

MATH 1A: Calculus I Sec 01 Winter 2017 Room E31 MTWThF 8:30-9:20AM

Control Tutorials for MATLAB and Simulink

ReinForest: Multi-Domain Dialogue Management Using Hierarchical Policies and Knowledge Ontology

CONCEPT MAPS AS A DEVICE FOR LEARNING DATABASE CONCEPTS

INPE São José dos Campos

Ph.D. in Behavior Analysis Ph.d. i atferdsanalyse

PRODUCT COMPLEXITY: A NEW MODELLING COURSE IN THE INDUSTRIAL DESIGN PROGRAM AT THE UNIVERSITY OF TWENTE

An Interactive Intelligent Language Tutor Over The Internet

Classification Using ANN: A Review

S T A T 251 C o u r s e S y l l a b u s I n t r o d u c t i o n t o p r o b a b i l i t y

PESIT SOUTH CAMPUS 10CS71-OBJECT-ORIENTED MODELING AND DESIGN. Faculty: Mrs.Sumana Sinha No. Of Hours: 52. Outcomes

The dilemma of Saussurean communication

We are strong in research and particularly noted in software engineering, information security and privacy, and humane gaming.

Math 181, Calculus I

Reinforcement Learning by Comparing Immediate Reward

Utilizing Soft System Methodology to Increase Productivity of Shell Fabrication Sushant Sudheer Takekar 1 Dr. D.N. Raut 2

CS 1103 Computer Science I Honors. Fall Instructor Muller. Syllabus

Rover Races Grades: 3-5 Prep Time: ~45 Minutes Lesson Time: ~105 minutes

AP Calculus AB. Nevada Academic Standards that are assessable at the local level only.

Edexcel GCSE. Statistics 1389 Paper 1H. June Mark Scheme. Statistics Edexcel GCSE

Sociology 521: Social Statistics and Quantitative Methods I Spring 2013 Mondays 2 5pm Kap 305 Computer Lab. Course Website

ME 443/643 Design Techniques in Mechanical Engineering. Lecture 1: Introduction

Curriculum for the Academy Profession Degree Programme in Energy Technology

AUTOMATED TROUBLESHOOTING OF MOBILE NETWORKS USING BAYESIAN NETWORKS

GACE Computer Science Assessment Test at a Glance

Switchboard Language Model Improvement with Conversational Data from Gigaword

Action Models and their Induction

Development of an IT Curriculum. Dr. Jochen Koubek Humboldt-Universität zu Berlin Technische Universität Berlin 2008

How to Do Research. Jeff Chase Duke University

Tuesday 24th January Mr N Holmes Principal. Mr G Hughes Vice Principal (Curriculum) Mr P Galloway Vice Principal (Key Stage 3)

Course Content Concepts

Course outline. Code: ICT310 Title: Systems Analysis and Design

Software Maintenance

Python Machine Learning

Bachelor Programme Structure Max Weber Institute for Sociology, University of Heidelberg

Merchandise plants and other relevant products

Document number: 2013/ Programs Committee 6/2014 (July) Agenda Item 42.0 Bachelor of Engineering with Honours in Software Engineering

Maximizing Learning Through Course Alignment and Experience with Different Types of Knowledge

Functional Skills Mathematics Level 2 assessment

STUDENT ASSESSMENT BOOKLET

EGRHS Course Fair. Science & Math AP & IB Courses

Unit purpose and aim. Level: 3 Sub-level: Unit 315 Credit value: 6 Guided learning hours: 50

Major Milestones, Team Activities, and Individual Deliverables

AGS THE GREAT REVIEW GAME FOR PRE-ALGEBRA (CD) CORRELATED TO CALIFORNIA CONTENT STANDARDS

AGENDA. Truths, misconceptions and comparisons. Strategies and sample problems. How The Princeton Review can help

Evolution of Symbolisation in Chimpanzees and Neural Nets

A Study of the Effectiveness of Using PER-Based Reforms in a Summer Setting

SEDRIN School Education for Roma Integration LLP GR-COMENIUS-CMP

TEACHING AND EXAMINATION REGULATIONS (TER) (see Article 7.13 of the Higher Education and Research Act) MASTER S PROGRAMME EMBEDDED SYSTEMS

Bachelor of Science in Engineering Technology in Construction Management Technology with Co-op

Transcription:

Workshop GA1 Introduction to the genetic algorithm Functional Programming and Intelligent Algorithms Module: Genetic Algorithms Spring 2017 Department of ICT and Natural Sciences Norwegian University of Science and Technology Robin T. Bye Last updated: 22 March 2017 email: robin.t.bye@ntnu.no; website: www.robinbye.com; phone: 70 16 15 49; room: B315.

Contents 1 Workshop overview 2 1.1 Topics.......................................... 2 1.2 Reading material.................................... 2 1.3 Specific learning outcomes............................... 3 1.4 Schedule......................................... 3 2 Exercises 4 2.1 Introduction to AI and optimisation.......................... 4 2.2 Minimum-seeking algorithms.............................. 5 2.3 Nature-inspired algorithms............................... 6 2.4 Introduction to the GA................................. 7 3 Homework 7 1 Workshop overview 1.1 Topics Today s topics include: introduction to artificial intelligence (AI) introduction to optimisation minimum-seeking algorithms nature-inspired algorithms introduction to the genetic algorithm (GA) 1.2 Reading material Compulsory reading to be studied before this workshop is Chapter 1 in Haupt & Haupt (2004) and Chapters 9 10 in Marsland (2015). Supplementary reading include Chapter 9.5 in Negnevitsky (2005), Chapter 1 in Goldberg (1989), and Chapters 1 2 in Russell & Norvig (2010). 2017 Robin T. Bye www.robinbye.com 2 Available under the Creative Commons BY-NC-SA 4.0 License.

1.3 Specific learning outcomes After completing this workshop, including self-study, reading and exercises, the students should be able to provide a proper definition of artificial intelligence (AI) and list several topics and tools in AI. explain what is meant by optimisation both in general terms and from a systems point of view (inputs system output) and provide examples of absolute and relative optimisation. find exact global optima of simple analytical functions such as the parabola using calculus (analytical methods such as finding derivatives) and plot the same functions. write small Haskell programmes able to implement mathematical functions as well as simple minimum-seeking algorithms for optimising such functions. categorise problems as solvable analytically or not and give examples of methods that may be used in each case. explain and exemplify common terminology and methodology from the field of optimisation and computational intelligence. recognise the problem of getting stuck in local optima and suggest methods for avoiding this problem. list examples of a few nature-inspired optimisation algorithms and explain some fundamental mechanisms such as natural selection. demonstrate knowledge about the history of the GA and explain its basic principles. list a number of advantages of the GA and explain why they are advantages. define a variety of selection methods and parameters such as mutation rate and selection rate. 1.4 Schedule We begin with an overview of the remaining weeks of the course dedicated to this module on genetic algorithms (GAs), before we proceed with a lecture that gives an introduction to prerequisite topics of GA, namely, artificial intelligence (AI) and optimisation. Then we proceed with some exercises, before a lecture that gives an introduction to nature-inspired algorithms and the GA. Finally, we do some more exercises. The workshop will roughly follow the schedule below: 09.15 Module overview and status update. 09.45 Lecture: Introduction to AI and optimisation. 2017 Robin T. Bye www.robinbye.com 3 Available under the Creative Commons BY-NC-SA 4.0 License.

11.15 Lunch. 12.00 Exercises. 13.15 Lecture: Introduction to the GA. 14.15 Exercises. 2 Exercises 2.1 Introduction to AI and optimisation Exercise 2.1: Explain what is meant by AI. Exercise 2.2: Do a literature search and find a real-world problem that has been solved using AI techniques. Write a half- to one-page summary of the problem justifying why the solution belongs to the field of AI. Exercise 2.3: Explain what is meant by optimisation. Exercise 2.4: Consider optimisation of the functions f 1 = x + cos x, x (2.1) f 6 = (x 2 + x) cos x 10 x 10 (2.2) f 7 = x sin 4x + 1.1y sin 2y, 0 x, y 10 (2.3) For each function, is the optimisation problem (a) constrained or unconstrained? (b) single-variable or multivariable? Give the number of dimensions of the problem. (c) static or dynamic? (d) discrete or continuous? (e) solvable analytically (using calculus and derivative methods)? Provide explanations to all your answers. Exercise 2.5: Two functions are given by For each function, answer the following: g(z) = (z + 3) 2 (2.4) h(y) = (y + 1) 2 2 (2.5) (2.6) 2017 Robin T. Bye www.robinbye.com 4 Available under the Creative Commons BY-NC-SA 4.0 License.

(a) Explain why the function can be optimised analytically. (b) Use calculus to find the optimum (ignore values at infinity) and determine if it is a maximum or a minimum. (c) Draw a diagram by hand and indicate the optimum. Exercise 2.6: Consider the function f 2 given by f 2 = x + sin x 20 x 20 (2.7) Implement the function f 2 and the other functions f 1, f 6, and f 7 defined previously as Haskell functions. Test your functions in the interpreter. 2.2 Minimum-seeking algorithms Exercise 2.7: You have written a computer program that finds the minimum of a given cost function. One day you are asked to write another computer program that finds the maximum a given fitness function. How can you easily modify your initial program to maximise a fitness function instead of minimising a cost function? Give an example of a cost function and convert it to a fitness function. Exercise 2.8: Investigate the Nelder-Mead local minimisation algorithm by performing a search on the Internet. Is the algorithm able to find a global minimum in each case (within the given constraints)? How does the choice of initial guess affect your results? Exercise 2.9: Write your own simple version of a local minimiser as a function fminsimple that given a single-variable cost function costfunction starts at an initial guess x0 in the search space and moves in fixed moves with an increment of stepsize in a downhill direction until it cannot move downwards anymore. You should also include lower and upper boundaries, l and u, respectively. The minimiser should return the found input variable value, xmin, and the minimum function value evaluated at xmin, namely costfunction xmin, for example in a tuple. A possible function signature is given by fminsimple : : ( Double > Double ) c o s t f u n c t i o n > Double x0 > Double s t e p s i z e > Double lower boundary l > Double upper boundary u > ( Double, xmin ( optimal value o f x ) Double ) c o s t f u n c t i o n xmin (minimum c o s t ) fminsimple costfunction x0 stepsize l u = <... your code h e r e... > 2017 Robin T. Bye www.robinbye.com 5 Available under the Creative Commons BY-NC-SA 4.0 License.

Test your local minimiser function on some one-dimensional cost functions such as those presented above, which can be found with plots and solutions in Appendix I of Haupt & Haupt (2004). Observe when the minimiser succeeds and when it fails in finding the global minimum. Exercise 2.10: Expand your function to also display the number of iterations to complete the search for a minimum. A possible function signature is given by fminsimple ' : : ( Double > Double ) c o s t f u n c t i o n > Double x0 > Double s t e p s i z e > Double lower boundary l > Double upper boundary u > Int counter > ( Double, xmin Double, c o s t f u n c t i o n xmin Int ) counter + 1 fminsimple ' costfunction x0 stepsize l u c = <... your code h e r e... > How does choice of initial guess x0 and the stepsize affect the number of iterations? Exercise 2.11: Both the Nelder-Mead algorithm and your homemade function fminsimple can get stuck in local minima. Suggest how you could make your algorithm above more sophisticated so that there is a greater chance of finding a global minimum. 2.3 Nature-inspired algorithms Exercise 2.12: List five nature-inspired optimisation algorithms. Do a search and find at least one real-world problem that has been solved for each of the five algorithms. Exercise 2.13: What are the two components of natural selection? Exercise 2.14: Provide short explanations of gene, chromosome, and DNA. Exercise 2.15: List four steps of simulating natural evolution. 2017 Robin T. Bye www.robinbye.com 6 Available under the Creative Commons BY-NC-SA 4.0 License.

2.4 Introduction to the GA Exercise 2.16: Who is usually mentioned as the founding father of the GA and who popularised it? Exercise 2.17: What does encoding in a GA mean? Exercise 2.18: List five advantages of using a GA and explain why they are advantages. Exercise 2.19: List the steps of a basic GA. You may draw a diagram if you prefer. Exercise 2.20: Explain the following genetic operators and use diagrams to aid your explanation: (a) Crossover. (b) Mutation. Exercise 2.21: Explain the following selection methods: (a) Single-point crossover. (b) Two-point crossover. (c) Uniform crossover. (d) Tournament selection. (e) Truncation selection. (f) Roulette wheel selection. 3 Homework Complete all the exercises above. Read through (again!) the specific learning outcomes in Section 1.3 to check which outcomes you have not attained yet. Study today s material and prepare questions for tomorrow about learning outcomes you have missed. Skim through the lecture notes for tomorrow s lecture and the suggested literature. References Goldberg, D. E. (1989). Genetic Algorithms in Search, Optimization and Machine Learning. Addison Wesley Longman, Inc. Haupt, R. L., & Haupt, S. E. (2004). Practical Genetic Algorithms. Wiley, 2nd ed. 2017 Robin T. Bye www.robinbye.com 7 Available under the Creative Commons BY-NC-SA 4.0 License.

Marsland, S. (2015). Machine learning: an algorithmic perspective. CRC press, 2nd ed. Negnevitsky, M. (2005). Artificial Intelligence: A Guide to Intelligent Systems. Addison-Wesley, 2nd ed. Russell, S., & Norvig, P. (2010). Artificial Intelligence: A Modern Approach. Pearson, 3rd ed. 2017 Robin T. Bye www.robinbye.com 8 Available under the Creative Commons BY-NC-SA 4.0 License.