Skip to content

roshniRam/Sudoku-Solver

Repository files navigation

Sudoku-Solver

forthebadge
Sudoku solver using Genetic Algorithm AI

Approach

  1. Created a helper matrix which is a list of list containing all possible values a cell can contain.
  2. Initialized population of size 200 randomly using the helper.
  3. Calculated the fitness of each candidate and sorted them.
  4. Took first 120 (having greater fitness) as elites. Elites would definately be part of the next generation.
  5. For the remaining 80, randomly selected two candidates from the population and performed crossover among them. Mutation is done on each candidate.
  6. We continue doing this until we get a fitness value of 1. This indicates we have successfully found a solution to the sudoku problem.

Output

image

About

Sudoku solver using Genetic Algorithm AI

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages