
Define a product class in Python, initialize attributes (name, space, price), instantiate objects, and build a 14-item products list for the genetic algorithms.
Evaluate the fitness function to measure chromosome quality and maximize profits by selecting products within the truck capacity.
Implement a function to sum the score evaluations of all individuals in the population, returning total fitness to guide parent selection for crossover and mutation.
Implement a visualize generation function for a Python genetic algorithm to display partial results, evaluate individuals, and highlight the best in each generation across multiple runs.
Learn to connect a genetic algorithm to a MySQL database, fetch product data, and run a GA across generations to optimize truck loading, with plotting of results.
Plan to apply genetic algorithms in Python using pre-built libraries, compare to from-scratch implementations, and solve transportation profit maximization and airline ticket price minimization.
Explore a flight schedule optimization case study to minimize airline costs for six travelers meeting in Rome, selecting the cheapest outbound and return flights across six european cities.
solve the flight schedule problem with the deap library in python by defining toolbox, fitness, and individuals to minimize total price using crossover, mutation, and an order-based star ornaments selection.
Genetic algorithms are an important area of Artificial Intelligence responsible for solving complex real world problems. There are several practical applications of this type of algorithm, which can be applied to problem solving in everyday business situations. A classic example is solving the problem of teacher schedule in schools, in which there are different combinations of schedules and classes and the goal is to build the schedule dynamically according to the number of classes and the availability of each teacher. Other examples are: telecommunications companies can design new optical networks, carriers can better plan the delivery route for goods, investors can choose the best investments; among several others.
In this course, you will learn everything you need to enter the world of genetic algorithms! What makes this course unique is that you will learn the basic intuition and especially, the step-by-step implementation without using pre-built libraries. In other words, we are going to implement genetic algorithms from scratch using Python. If you have never heard about this subject, at the end of the course you will have all the theoretical and practical basis to solve your own problems or the problems of the company you work for!
In part 1, we are going to implement a genetic algorithm from scratch to solve a very common problem that is related to transportation of products. Let's suppose we need to load some products on the truck, but we need to select the most profitable products and also take into account that there is not enough space on the truck to load them all. So, the goal of the genetic algorithm will be to choose the best set of products to maximize the profit of the company. At the end we will integrate our algorithm with a database in MySql, so it will be easier to know how to deal with commercial applications!
In part 2 (after you learn the whole intuition and implement genetic algorithms from scratch), it's time to learn how to work with libraries to solve the same problem. In addition to the case study of product transportation, we will also solve another problem that is related to finding the lowest prices of airline tickets for people traveling in group. We will solve both problems using two libraries: DEAP (Distributed Evolutionary Algorithms in Python) and MLROSe. The interesting is that we will be able to compare the results of the libraries with the results of our genetic algorithm implemented from scratch.
This can be considered the first course on genetic algorithms, and after completing it, you can move on to more advanced materials. At the end you will have the practical background to develop some simple projects and take more advanced courses. During the lectures, the code will be implemented step by step using Google Colab, which will ensure that you will have no problems with installations or configurations of software on your local machine.