Skip to content

Small project for the "Fundamentals of AI" course at Politecnico di Milano

Notifications You must be signed in to change notification settings

MatteoGobbiF/genetic-algorithm-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Genetic Algorithm Project

Small project for the "Fundamentals of AI" course at Politecnico di Milano.

Contents

The project consists of the following files:

  • Report.pdf (In italian): This document provides an overview of the project, explaining the code implemented in mastermind.cpp and the concepts of genetic algorithms. It also presents the application by hand of a genetic algorithm to optimize the parameters of mastermind.cpp.
  • mastermind.cpp: This C++ file contains the implementation of the game of Mastermind, which utilizes a genetic algorithm to solve itself. It prints out the number of generations required to find the correct solution.

Project Scope

The main objective of this project was to gain an understanding of genetic algorithms and their application. The mastermind.cpp file serves as a self-solving version of the game of Mastermind, providing the number of generations required for convergence.

In the report.pdf file, a genetic algorithm was manually applied to optimize the parameters used in mastermind.cpp. This optimization process involved adjusting variables such as the probability of mutation, type of crossover, type of fitness function and so on. The number of generations taken by mastermind.cpp served as the fitness function for the genetic algorithm described in the report.

About

Small project for the "Fundamentals of AI" course at Politecnico di Milano

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages