
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.
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 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.
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.
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.
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 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.
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.
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."