CSCI5260 Lab 3–Beyond Classical Search Solved

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: . zip solution files instantly, after Payment

Description

Rate this product

 

Overview

You may want to review the code for search.py, in the aima-python repository for additional context.

Code Exploration

  • Download the genetic_search_example.py file from the D2L dropbox. This requires the following Python libraries (some of which you may need to install using pip install).
  1. os
  2. operator
  3. math
  4. random
  5. time
  6. copy à deepcopy

Genetic Algorithm Understanding

  1. Run the code and examine it to explain each of the following. In your explanation, also note why the particular strategy might make sense for this problem.

 

Initialization Strategy  
Selection Strategy  
Reproduction Strategy  
Mutation Strategy  
  1. Given the field sizes of 10×10, 20×20, and 30×30, what are the minimum possible fitness value? (Always assume the upper left is the starting location and the lower right is the ending location).

 

Code Performance

  1. Alter the code to run the GA with the varying parameters, and fill in the following table. Try to get the best possible results. Note that the start location is always 0,0, but the end location should be (SIZE-1, SIZE-1).

 

Field Size # Generations Population Size Mutation Rate Lowest Fitness Generation

Lowest

Fitness

Reached

Method Timing
10×10            
20×20            
30×30            

CSCI 5260 – Artificial Intelligence                                   P a g e 1 Show which runs found the optimal solution. Updated Code

  1. Update the following within the code:
    1. Change the GA selection strategy to be purely random.
    2. Change the GA reproduction strategy to a different method (I suggest multipoint crossover).
  2. Given your changes to the strategy, rerun the code as necessary to fill in the following table:

 

Field Size # Generations Population Size Mutation Rate Lowest Fitness Generation

Lowest

Fitness

Reached

Method Timing
10×10            
20×20            
30×30