CSCI 5260 Lab 3 – Beyond Classical Search solution

$24.99

Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment

Description

5/5 - (10 votes)

CSCI 5260 – Artificial Intelligence
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
2. 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
3. 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 Page 2
Show which runs found the optimal solution.
Updated Code
4. Update the following within the code:
a. Change the GA selection strategy to be purely random.
b. Change the GA reproduction strategy to a different method (I suggest multipoint crossover).
5. 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
Submission
Create a Word Document named SurnameLab3.docx with your responses above.
Submit your altered code in file genetic_search_example.py.
Submit to the Lab 3 dropbox at or before Monday, February 8, 2021 by 11:59 PM.
Grading
A letter grade will be assigned for each response. The letter grades are based on both correctness and the
adequacy of answers. Points are assigned as follows:
A B C D F Zero
Excellent Above
Average Average Below
Average Poor No Attempt
10 8 6 4 2 0
GA
Understanding
Q1
Q2
Code
Performance Q3
Updated Code Q4
Q5