[SOLVED] CECS451-Homework 3

15.99 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

Rate this product
  1. 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.

  1. Find the py. You can modify the Board class.
  2. 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.
  1. Please measure the running time and the number of restart.
  2. An expected output.

Running time: 200ms

# of restart: 1

1 – – – –

  • – – 1 –
  • 1 – – –
  • – – – 1

– 1 –

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.