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