[SOLVED] CECS451 Assignment 2

30.00 $

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

Description

5/5 - (1 vote)
  1. (50 points) Implement a 5-queens problem solver with Python 3 by using the hillclimbing algorithm and the genetic algorithm.
  2. I strongly recommend you follow the object-oriented programming style.
  3. Find n-queens.zip.
  • Follow the specification
    • The program should use the as the number of nonattacking pairs as the heuristic/fitness function.
    • hill climb.py should perform the Hill-Climbing algorithm.
    • py should perform the Genetic algorithm including the three operations, i.e., selection, crossover, mutation to find a solution.
    • The program should track the number of required steps (no steps) to solve a problem.
    • The program should output a solution and be terminated.
    • An expected output format.

The number of required steps: 5

1 – – – –

  • – – 1 –
  • 1 – – –
  • – – – 1
  • – 1 – –
  1. Submit n-queens.zip that includes your solutions, i.e., hill climb.py and py.
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.