在这项任务中,你要做的是实现一个进化算法,并将其应用于问题如下所示。您将进行各种实验,以帮助找出算法最适合这个问题。算法的实现可以在程序中您选择的语言。在下面的部分中,提供了问题的详细信息,然后是基本细节算法的描述,最后是对你应该进行的实验的描述。最后一节指出你的报告中应该交什么。问题在一家银行工作,你被要求开发一个基于进化算法的系统,该系统将找到能装进安全车的最大金额的钱。钱被分成
100个不同面额的袋子,每个袋子的钱的重量和价值显示

1.Nature-Inspired Computation

Assignment One: Problem Solving with an Evolutionary AlgorithmHand-out date: 17th October 2022Hand-in date: 16th November 2022
This CA is worth 40% of the overall module markThis is an individual assessment and you are reminded of the University's Regulations on Collaborationand Plagiarism. You are required to cite the work of others used in your solution and include a list ofreferences, and must avoid plagiarism, collusion and any academic misconduct behaviours. Furtherdetails about Academic Honesty and Plagiarism can be found athttps://vle.exeter.ac.uk/course/view.php?id=1957Task
What you will do in this assignment is to implement an evolutionary algorithm and apply it to theproblem shown below. You will do a variety of experiments to help find out what parameters for thealgorithm are best for this problem. Implementation of the algorithm can be in the programminglanguage of your choice. In the following sections, details of the problem are provided, then basic detailsof the algorithm, and finally a description of the experiments you should carry out. The final sectionindicates what should be in your report to be handed in.

2.The Problem

Working for a bank, you have been asked to develop an evolutionary algorithm based system which willfind the largest amount of money that can be packed into a security van. The money is separated into100 bags of different denominations and the weight and value of the money of each bag is shown onthe outside of the bag, e.g.,Bag 1 Weight = 9.4Kg, Value = £57Bag 2 Weight = 7.4Kg, Value = £94Bag N Weight = iKg, Value = £x,The security van can carry only a limited weight, so your system must try and decide which bags to puton the van, and which ones to leave behind. The best solution will be the one which packs the mostmoney (in terms of value) into the van without overloading it. Your system should read in the 100 bag values from the file “BankProblem.txt” which isprovided along with this document. The file contains the weight limit for the security van and the values and weights for eachbag of money. Weights are all in kilos and the values are all in pounds sterling. You must decide how to represent this problem to the evolutionary algorithm, you mustalso decide what the fitness function should be.

3.The Evolutionary Algorithm

The evolutionary algorithm should be implemented as follows:1. Generate an initial population of p randomly generated solutions (where p is a reasonablepopulation size discussed in lectures and in the module reading), and evaluate the fitness ofeverything in the population.2. Use the binary tournament selection twice (with replacement) to select two parents a and b.3. Run crossover on these parents to give 2 children, c and d.4. Run mutation on c and d to give two new solutions e and f. Evaluate the fitness of e and f.5. Run weakest replacement, first using e, then f.6. If a termination criterion has been reached, then stop. Otherwise return to step 2.Termination Criterion: Will simply be having reached a maximum number of fitness evaluations whichis 10,000 (see Implementation and Experimentation below)Binary Tournament Selection: Randomly choose a chromosome from the population; call it a. Randomlychoose another chromosome from the population; call this b. The fittest of these two (breaking tiesrandomly) becomes the selected parent.Single-Point Crossover: Randomly select a ‘crossover point’ which should be smaller than the totallength of the chromosome. Take the two parents and swap the gene values between them ONLY forthose genes which appear AFTER the crossover point to create two new children.Mutation: This is dependent on your representation, look at the lecture slides for some ideas on whichmutation to implement given your representation. Your mutation function must take a single integerparameter which will determine how many times it is repeated on a solution (e.g., M(1) – onemutation per chromosome, M(3) – 3 mutations).Weakest Replacement: If the new solution is fitter than the worst in the population, then overwrite theworst (breaking ties randomly) with the new solution.Implementation and ExperimentationImplement the described EA in such a way that you can address the above problem and then run theexperiments described below and answer the subsequent questions. Note that, in all of the below, asingle trial means that you run the algorithm once and stop it when 10,000 fitness evaluations havebeen reached. Different trials of the same algorithm should be seeded with different random numberseeds.
You should devise your own set of experiments to determine what effect (if any) the followingparameters have on the performance of the optimisation:1. Tournament size(t) Population size (p) Mutation rate (i.e. the parameter identified in the mutation operator above) (m)Your experiments should assess the performance of the algorithm over a number of randomly seededtrials for each setting of t, p, m, to provide robust results.Analysis
Record the best fitness reached at the end of each trial and any other variables during the run that youthink will be important in answering the following questions.Hint: You should think carefully about how best to present your results to show the behaviour of thealgorithm during your trials
Question 1: Which combination of parameters produces the best results?Question 2: Why do you think this is the case?Question 3: What was the effect when you removed mutation? What about crossover?Question 4: If you were to extend your EA to work with a multi-objective version of this problem,which functions in your program would you change and why?In your answers, describe your observations of the results, and describe any tentative explanations orconclusions you feel like making, in addition to any further experiments you felt it interesting or usefulto do to answer the above questions or to further your understanding of the algorithm parameters.Submission
Submit both your report and clearly commented code as a zip file using E-BART(https://bart.exeter.ac.uk/) by 12noon on the hand-in date shown above. The report should have amaximum of 4 pages (4 sides of A4, references do not count towards the limit) which shouldinclude adescription of your experiments where tables and/or graphs ofresults should take up no more than 2-3 pages, and your answers to thequestions/descriptions in the remaining space.Marking SchemeCorrect and efficient implementation of the algorithm15%Documentationof code 5%Correct results from the EA runs 20%Quality (e.g., readability & usefulness) of tables and graphs 20%Answers to Questions 20%Tentative Conclusions & FurtherExperiments
WX:codehelp


豪气的饭盒
1 声望0 粉丝