- Implement 5-queens problem solvers with Python 3 by using the hill-climbing algorithm and the genetic algorithm.
- Implement a program that performs the Hill-Climbing algorithm to find a solution.
- Implement a program that performs the Genetic algorithm with 8 states including the three operations, i.e., selection, crossover, mutation to find a solution.
Program specification.
- Find the py. You can modify the Board class.
- The function fitness in the py returns the number of attacking pairs.
- Sometimes the algorithms can stuck in local minima. Please implement the randomrestart procedure when they stuck.
- Please measure the running time and the number of restart.
- An expected output.
Running time: 200ms
# of restart: 1
1
- 1
- 1
- 1
- 1
- Submit ipynb, genetic.ipynb, and board.py.
Reviews
There are no reviews yet.