
Explore optimization algorithms in Python from theory to from-scratch implementations, including random search, simulated annealing, and the genetic algorithm, and apply them to flight scheduling, resource allocation, and product transport.
Explore how optimization algorithms solve real-world problems, from itinerary planning and flight scheduling to school timetables, truck loading, network routing, and genetics-inspired solutions.
Explore a case study on flight schedule optimization across six cities to minimize airport waiting times and ticket costs, using random search and three optimization algorithms in Python.
Explore a first optimization task in Google Colab to optimize two variables and reduce airport waiting time. Build a Python list of people with city and airport initials.
Explore a flights dataset in python by loading a text file into colab, modeling flights with an origin-destination dictionary storing departure, arrival, and price, and preparing optimization for cheapest options.
Represent the flight scheduling problem in Python with a list-based encoding that captures city names, origins, destinations, and times, enabling optimization algorithms to find best schedules while minimizing waiting time.
Install Anaconda and PyCharm, create a Python 3.7 environment in the Anaconda navigator, and run optimization algorithms in Python from a local project while referencing Google Colab scripts.
Create a get_minutes function to convert hours and minutes into total minutes, using the time library for parsing, enabling airport waiting-time calculations with tests like 6:13 and 0:00.
Craft the fitness function, heart of an optimization algorithm, by combining time and price into a cost to minimize, accounting for constraints like waiting time and early or late flights.
Implement the fitness function to minimize total price and total wait by looping through travelers, calculating flight prices and waiting times, including penalties when last arrival exceeds first departure.
Debug the fitness function for an airline routing optimization, calculating total price, last arrival, and first departure across six cities, including wait times and Minot's function.
Explore random search in Python to generate random solutions, evaluate their cost or fitness function, define the domain for the cost function, and compare results with future optimization algorithms.
Implement a basic random search to generate flight schedules, evaluate them with a fitness function, and select the best solution within a defined domain; study how trials affect results.
Explore how a random search generates solutions, evaluates cost with a fitness function, and updates the best cost and solution within a domain of minimum and maximum values in Python.
Introduce the hill climbing algorithm, covering its theory, name, and intuition, then implement it in Python and compare its results with random search on a flight schedule.
Explore the hill climb optimization, starting from random solutions, moving to better neighbors toward lower costs (minimization) or higher costs (maximization), and distinguish global minimum vs local minima.
Implement a hill climb optimization in Python by starting from a random solution, generating 24 neighbors, and evaluating with a fitness function to improve flight schedules.
Explore the hill climb optimization algorithm with implemented code, generating neighbor solutions from a random starting point, evaluating costs, and updating to the best solution.
Compare hill climb with random search, showing 500 iterations yield similar results to 10,000 calls, about 20 times faster. Demonstrate that using a predefined initial solution further reduces time.
Explore the theory and intuition behind simulated annealing and implement it in Python. Compare its results with random search and hill climbing, seed the climb with random search results.
Learn the theory of simulated annealing, inspired by metal cooling. Start from a random solution, lower temperature, and change one value at a time, occasionally accepting worse moves.
Learn how to implement simulated annealing in python, defining the domain and cost (fitness) function, configuring temperature and cooling, and generating neighbor solutions to improve results.
Demonstrate how simulated annealing optimizes solutions by generating neighbors, evaluating costs, and using temperature and acceptance probability to guide search in Python.
Compare hill climb, random search, and simulated annealing in Python by counting generated solutions, tuning temperature and cooling, and using initial or random solutions to improve fitness results.
Explore the genetic algorithm as the core optimization method in Python, covering its theory, population evaluation, crossover, mutation, and a step-by-step implementation with comparisons to random search and simulated annealing.
Learn the basics of genetic algorithms for optimization, from populations of individuals with chromosomes and genes to fitness evaluation by cost and waiting time, using selection, crossover, mutation, and elitism.
Implement a crossover function in Python for a genetic algorithm, using a random cut point to combine left genes from one solution with right genes from another, and test.
Implement a complete genetic algorithm by defining the domain and fitness function and initializing a 100-solution population; evolve 500 generations with 0.2 mutation and 20% elitism.
Explore the genetic algorithm workflow by implementing mutation and crossover on an initial population of 15, iteratively selecting the top solutions, evaluating costs, and evolving across generations.
Apply random search to generate the initial population for a genetic algorithm, compare it with Randles search, and explain how the fitness function and domain guide the initialization.
analyze the results to show the genetic algorithm outperformed hill climb and simulated annealing, while random search sometimes matched or exceeded them; the cost averaged two thousand six hundred seventy-seven.
Outline the plan of attack for solving the bedrooms optimization problem using Python. Define the problem domain, implement a fitness function, and compare multiple optimization algorithms across runs.
Explore a case study of limited resource allocation using optimization algorithms to assign students to rooms based on primary and secondary preferences, with two beds per room.
Define the domain for the bedrooms optimization problem in python with a bed allocation representation, linking rules and preferences, enabling random search, simulated annealing, and genetic algorithms.
Implement a step-by-step function to allocate bedrooms to each person, using a vacancies list and bed indexing to print the solution for a constrained optimization in python.
Implement a fitness function for assignment optimization in Python, applying penalties for first option, second option, and third option bedrooms, managing vacancies, and computing a cost to guide optimal solutions.
Compare optimization algorithms by multiple trials and averages; the genetic algorithm is best, while hill climb and simulate underperform random search on this small dataset.
Explore a case study on transporting products for an e-commerce company, balancing most profitable items with maximum truck space within a 3 cubic meter capacity using Randle's search.
Learn to apply optimization algorithms to a transport problem by defining a binary domain for loading products, comparing maximization and minimization, and printing the selected solution.
Implement a fitness function in python for truck loading optimization; evaluate a 0/1 solution, accumulate value and space, and apply a penalty if space exceeds three cubic meters.
Plan to tackle optimization problems using prebuilt libraries, focusing on Rose Library implementations of genetic algorithms, hill climbing, and simulated annealing, and solve flight schedule problem with the fitness function.
Apply the Melrose library in Python to optimization problems with simulated annealing and genetic algorithms, including the traveling salesman problem; install, define a fitness function, and model for minimization.
Finish implementing the flight's casual problem by defining the fitness function and problem representation with the MLROSe library 2, and compare hill climb, simulated annealing, and genetic algorithms.
Explains solving the transport problem using the Rose library as a maximization task, with a fitness function, product list, and available space, and compares from-scratch and library solutions.
Represent intelligent problems in Python, implement flight-schedule optimization with random search, hill climb, simulated annealing, and genetic algorithms, compare results, and apply to minimization and maximization tasks using Rose Library.
What would an “optimal world” look like to you? Would people get along better? Would transport run faster? Would we take better care of our environment?
Many data scientists choose to optimize by using pre-built machine learning libraries. But we think that this kind of 'plug-and-play' study hinders your learning. That's why this course gets you to build an optimization algorithm from the ground up.
In Artificial Intelligence: Optimization Algorithms in Python, you'll get to learn all the logic and math behind optimization algorithms. With two highly practical case studies, you'll also find out how to apply them to solve real-world problems.
In the first case study, we'll optimize travel plans for six friends who want to fly out from the same airport. In the second case study, we'll optimize the way university administrators allocate dorm rooms to new students.
On the way, we'll learn what optimization algorithms are. We'll find out how they can be applied to daily business practice. And we'll see how they can learn by themselves.
This course introduces you to four types of optimization algorithms:
- random search
- hill climb
- simulated annealing, and
- genetic
Don't worry if you're not yet sure what any of these are. We'll go through each one in detail, and you'll find out how to build each of them in our two case studies."