Simple play icon Course
Skills Expanded

Understanding Genetic Algorithms and Genetic Programming

by Greg Sommerville

Artificial intelligence is everywhere these days. This course teaches you how to implement two types of AI using simple C#. You'll use concepts from biology to evolve solutions to complex problems like optimal subset selection and data ordering.

What you'll learn

Certain problems can't be solved by brute force. Combinatorial problems that involve finding an optimal ordering or subset of data can be extremely challenging to solve if the number of items is too large since the time to test each possible solution can often be prohibitive. In this course, you'll learn how to write artificial intelligence code that uses concepts from biology (like evolution, genetic crossover, and mutation) so the software can evolve optimal solutions to complex problems. The code will be written in fairly simple C#, and no external libraries will be used, so you'll understand all of the details. First, you'll learn how to write a genetic algorithm, which is a technique to manipulate data. You'll learn about different ways to represent potential solutions, as well as techniques for evolving solutions over a number of generations. Different types of crossover and mutation will be discussed, as well as various factors related to evaluating each candidate solution's fitness, which influences which candidates are selected for reproduction. After looking at how genetic algorithms can be used to find optimal solutions for data, you'll learn about genetic programming, which uses similar concepts but evolves actual executable code, rather than simply manipulating data. Genetic programming is particularly well-suited to finding an expression that fits a set of training data. The results of this technique can be used for prediction, estimates, and the like. Finally, you'll discover how genetic programming can be used to perform many complex tasks - controlling processes and making decisions, in particular. The code that results can be quite complex, balancing many different competing factors and constraints. By the end of this course, you'll have a solid foundation to apply these concepts to your own programs.

Table of contents

Course Overview
1min
Introduction to Genetic Algorithms and Genetic Programming
5mins

About the author

Greg Sommerville is an experienced software developer who has worked in a wide variety of business domains, including health care research, medical devices, enterprise-level software ordering and licensing, environmental science, and online banking. He specializes in web and mobile development using JavaScript, jQuery, Bootstrap, C#, SQL Server, Entity Framework, and ASP.NET. He is also deeply interested in UI design (UX, these days) and usability. He can be reached through his blog at http://gr... more

Ready to upskill? Get started