Modeling & Simulation, SYCS 410
Program #2 Alternate
Professor: Dr. Kathleen M. Kaplan,
Dept. of Systems & Computer Science
This site is used in conjunction with the course. It does not
contain all the material given in class.
There may be errors in this material, and it should not be used in
place of material given in the classes.
Programming Assignment #2 (The Other One!)
Evolutionary Computing
Due November 29, Thursday
Write a program in C or C++ to program example given in class.
- The user will input two vectors, the cross-over point, and the threshold heuristic.
- The program will calculate the heuristics of these parent vectors, perform the cross-over, and give the child vectors with heuristics and whether or not the child vectors will be allowed to propagate the next generation.
- The program will then randomly generate two vectors, and give these vectors with heuristics.
- The program will mate these vectors according to the same cross-over point given above.
- The program will then state whether or not each of these children will be allowed to propagate.
- Any remaining children from both sets will then mate and their children will be given with heuristics and whether or not they will be allowed to propagate to the next generation.
So, here we have two sets of parents - the parents given by the user, and the parents randomly generated. These sets will each mate and produce at most two children each. These children will be selected or rejected, and if all are chosen, at most 6 more matings will occur - {1, 2}, {1, 3}, {1, 4}, {2, 3}, {2, 4}, and {3, 4} - to produce the next generation.
Given the eleven constraints given in class:
- B ¹ 3
- C ¹ 2
- A ¹ B
- B ¹ C
- C < D
- A = D
- E < A
- E < B
- E < C
- E < D
- B ¹ D
Let the user input:
- Two vectors as defined in class in order [ A B C D E ].
- The cross-over position. The user can be queried as to all possible positions and the user can choose one.
- The heuristic threshold used for eliminating and selecting next generation.
The output is as follows:
- The heuristic of the vectors. This is calculated within the program, not given by the user.
- The child vectors with heuristics.
- Whether or not each child vector will be allowed to live for next generation propagation.
- The next generation of the remaining children from both sets with heuristics and whether or not they will be allowed to propagate the next generation.
Submit:
- A hard copy with two runs.
- Email your program(s) to me - not the executable - at [email protected].
Notes:
- Your name, ID, SYSC 410, Programming Assignment #2, Evolutionary Computing, Dr. Kaplan, Fall 2001, must be typed into the comments of your program at the top.
- The program must be fully commented.
- The program must be written as an upper class student should - with appropriate data structures, etc.
- The program must be your own work.
- The input and output given must be described to the user.
- No late assignments will be accepted.
Modeling & Simulation, 410
Dr. K. Kaplan, Fall 2001