Prev: W9 ; Next: W11

# Lecture Note

📗 Slides
Lecture 17: Slides, With Quiz
Lecture 18: Slides, With Quiz
Annotated Lecture 17 Section 1: Slides
Annotated Lecture 18 Section 1: Slides
Annotated Week 10 Section 2: Part I, Part II

📗 Websites
Simulated Annealing Map: Link
SAT Solver: Link
Genetic Walkers: Link
Genetic Cars: Link
Genetic Eater: Link
Genetic Image: Link

📗 YouTube Video
How to find reproduction probabilities? Link
How to solve the lions game? Link
How to solve the pirate game? Link
How to solve the wage competition game (sequential version)? Link

# Written (Math) Problems

Submit on Canvas: PDF
Submit to M10 due August 5.

# Programming Problem

📗 Short Instruction
(1) Play Flappy Bird to get an idea of the rule of the game. To simplify the problem, assume on a discrete timeline, at each time t = 1, 2, 3, ... there could be a mouse click to increase the position of the bird by x = 2, or the position of the bird will decrease by y = 1 otherwise. (Update: you can use different x and y values if it is easier to solve). The position of the bird starts with 5 and is an integer between 0 and 10. The game is over if the bird flies to a position above 10 or below 0 or it hits a pipe. The score is amount of the time it flies (NOT the number of pipes it passes).
(2) Given random test games based on your ID. The 100 numbers represent the height of the lower pipe (0 means no pipe). The distance between the upper and lower pipes is always 2. All heights are between 1 and 7. Use genetic algorithm with a population of 100 birds to estimate the highest possible point for 5 different random games. Use both cross over and mutation.
Type in your ID:
x = , y =
Input the game:
Input the sequence of actions (binary 1's and 0's, nothing in between, comma separated for multiple birds):


📗 Files to submit
(1) output.txt contains five lines. Each line contains 100 integers, comma separated, representing the scores of each bird in the population.
(2) population.txt contains 101 lines, the first line is the heights of the pipes, and the remaining 100 lines represent the sequence of actions of each individual bird for one of the games. Each line contains a string of length 100 (or 99) of zeros and ones, (zero means no mouse click). No commas. You can also submit population.png showing the pipes and the paths of the 100 birds.
(3) comments.txt contains information on how to run your program, in particular, the names of the data files are required.
(4) code.

📗 Things to try
(1) Try different schemes of mutation and compare the results.
(2) Try different schemes of cross over and compare the results.

More (nonessential) details and hints: PDF.

📗 TAs' Solution
(1) Java: Link written by Ainur
(2) Python: Link written by Tan
Important note: You are not allowed to copy any code from the solution. The deadline for resubmission without 50 percent penalty is August 18.





Last Updated: November 09, 2021 at 12:05 AM