Skip to content

Genetic and Hill-Climbing Algorithms Implementation on the N-Queens problem using 5 queens on a 5x5 board

Notifications You must be signed in to change notification settings

jchaidez23/5-Queens-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

**N Queens Problem Implementation Using 5 Queens **

The given task is to implement the N-Queens Problem in Artificial Intelligence using a 5x5 board which holds 5 queens. In order to solve this problem I was tasked with implementing the hill-climbing algorithm and genetic algorithm in order to find the most optimal solutions given the beginning state for the board.

Concepts

The project focuses on the following concepts: Genetic Algorithm: Search heuristic inspired by Charles Darwin's theory of evolution. The algorithm reflects the process of natural selection in order to find the most optimal "candidate." Hill-Climbing Algorithm: Simple optimization algorithm used to find the best possible solution for a given problem by, making small changes until the optimal solution is found. Hill-Climbing belongs to the local search family in Artificial Intelligence.

** Files**

Board.py: Given file that will create the board and choose the random starting state for the five queens Genetic.py: Genetic algorithm implementation that finds the most optimal solution for the board and prints out the run time Hill.py: Hill-Climbing algorithm implementation that finds the most optimal solution for the board given the starting state

About

Genetic and Hill-Climbing Algorithms Implementation on the N-Queens problem using 5 queens on a 5x5 board

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages