Python代写:CS4157 Evolutionary Algorithms

使用进化算法实现一个产品原型,解决场景问题。

Portfolio Assessment Details

The portfolio is comprised of two elements, one each for agent-based simulation and evolutionary algorithms. You must complete both elements. In each element, you must analyse a given problem, design a solution, implement and test your solution, and write up your results as a report. Formative feedback will be provided during lab-based practical sessions, where students will work on weekly-set tasks.

Please note: the page limit for each element report is ten pages. Do not exceed this limit for either report. Anything over the ten page limit will not be marked. You should not feel obliged to use the full ten pages per element report; it is a limit, not a target. Please ensure that you use a sensible font size (]= 10 pt) and reasonable margins/line spacing.

Element 1: Software Agents

For this portfolio element, you must design an agent-based simulation, implement it, use your implementation to explore the possibilities afforded by the simulation, and write a report describing this work (from design through to analysis).

This element is used to assess learning outcome 3: Formulate and implement agent-based simulation solutions to specific problems.

Two possibilities for your agent-based simulation are given here. You should choose one to complete.

Possible Scenarios

  1. A game of competitive evolution.
    For this simulation, you should implement a two-dimensional space as your world, with agents designed by the game player to populate the world. Agents have a fixed total number of resources which can be divided among several characteristics (e.g. attack strength, defence strength, metabolism rate, …), as specified by the player. The agents then compete in the world to survive.
    There are several decisions to be made in the design of this simulation: the choice of characteristics and how to balance them is the most obvious, but you should also consider just what the 2D world would be (e.g. does it provide resources?), how the agents will interact with each other and the world, and more.
  2. A simulation of energy supplier choice.
    For this simulation, you should implement a society of people or households who can make decisions about their energy supplier (based, for example, on factors such as price, customer service, reliability, energy type (e.g. green versus coal-fired electricity). Agents have individual preferences, which may change over time due to experience and influence of other agents. This simulation will require a social network of agents (to model influence). Design decisions include (but are not limited to) how this social network is constructed, and how agents make decisions regarding supplier switches.

Completion of this Portfolio Element

You will spend the second half of term 1 working on this portfolio element in lab classes for this unit, and should expect to spend additional time outside of scheduled classes working on it. Detailed instructions about the various stages involved in completing this work will be given in class, while an outline is given on the following pages. Additional support is available with Dr Norling during scheduled contact hours, or at other times by appointment. The laboratory classes in the first half of term will introduce the Repast agent toolkit, which you will use to complete this project. The toolkit comes with many example simulations, and you may find these useful when considering the design of your own simulation.

Design

The details of the design will very much depend upon the scenario that you are modelling, but generally, the design of an agent-based simulation consists of three key parts:

  1. The world in which the agents will be situated.
  2. The agents themselves.
  3. The presentation of data.

Do not ignore the third point. Agent-based simulations usually evolve over time. Which data is important to look at over the period of a simulation? How should it be displayed?

Implementation

You are expected to implement your simulation using the Repast agent toolkit, which will be introduced in laboratory classes during the first few weeks of term. Repast provides a wealth of tools to build different types of agents, and visualise data. Make as much use of these as possible, rather than trying to reinvent the wheel.
Your code must be submitted for assessment. Please ensure that it not only performs correctly, but is well-structured and readable. (See details of what is being looked for in the marking rubric on later pages, and seek formative feedback from Dr Norling.)

Report

Your report will also be submitted for assessment. See the marking rubric to ensure that you address all the marking criteria. Your report should include the following headings:

  1. Introduction - description of the scenario
    Flesh out the scenario that you have chosen, as the introduction to your report. Essentially here you should be setting out what you would like to capture in your simulation, and what you would like to achieve with the simulation.
  2. Design
    In this section, describe the design of the three components of your simulation (world, agents, visualisation of data).
  3. Implementation
    In this section, discuss any particularly challenging parts of the implementation of your simulation, or places in which you had to modify your design in order to implement your simulation.
  4. Analysis
    With your implementation complete, what did you explore, and what were the results of your exploration. Make sure that you complete your implementation in a timely manner so that you can get formative feedback in class about what sort of exploration you should be performing.

Timeline

The suggested timeline for completion of your work is given below. You are free to start on your work earlier if you wish, but should make sure you complete the exercises that introduce the Repast agent toolkit before you start your design, as the design should be influenced by the capabilities of the toolkit that you are using.

Week (Term 1)Activity
1-6Introduction to Repast and examples.
7Choice of scenario and design.
8Implementation.
9Implementation.
10Implementation/Exploration.
11Exploration.
12Write up and submission.

Submission

Your work should be submitted via the link provided for this portfolio element on Moodle, in the area corresponding to the last week of term 1. You should submit your code and the report as a single archive file (zip, tar or similar) via the submission link.

Element 2: Evolutionary Algorithms

For this portfolio element, you must design an evolutionary algorithm solution to a specific problem, implement your solution, use your implementation to investigate aspects of the problem, and write a report (from design through to analysis).

This element is used to assess learning outcome 4: Apply evolutionary algorithms to the solution of specific problems.

Completion of this Portfolio Element

You will spend the second half of term 2 working on this portfolio element in lab classes for this unit, and should expect to spend additional time outside of scheduled classes working on it. Detailed instructions about the various stages involved in completing this work will be given in class, while an outline is given on the following pages.

Additional support is available from Prof. Amos during scheduled contact hours, or at other times by appointment. The laboratory classes in term 2 will introduce evolutionary algorithms in Processing, which you will use to complete this project.

This element concerns the problem of packing circles into a given space. Circle packing is a challenging computational problem, which has applications in a number of different domains (e.g., engineering). For this component of the coursework, you will be required to solve specific instances of the circle packing problem, using an evolutionary algorithm approach. A certain proportion of the marks are allocated to investigations which go beyond the basic implementation and write-up.

Design

Your design should consider the following elements: (1) the encoding scheme you will use for the problem, (2) your fitness function, and (3) details of any local search you deem necessary.

Implementation

You must implement your solution using an evolutionary algorithm written in Processing, which will be introduced in laboratory classes during the first few weeks of term. You will be supplied with a number of reference instances with known solutions (in order that you may benchmark your implementation), along with a set of test problem instances on which your code must be run.
Your code must be submitted for assessment. Please ensure that it not only performs correctly, but is well-structured and readable. (See details of what is being looked for in the marking rubric on later pages, and seek formative feedback from Prof. Amos.)

Report

Your report will also be submitted for assessment. See the marking rubric to ensure that you address all the marking criteria. Your report should include the following headings:

  1. Introduction - description of the problem: Briefly describe the circle packing problem, and give a short review of existing approaches to its solution.
  2. Design: In this section, describe your proposed approach to solving the problem, and present a design of the three components of your solution (encoding, fitness function, local search (if applicable)).
  3. Implementation: Describe how you translated your design into Processing code, with specific reference to the data structures and classes used, how the fitness function and any local search was implemented, and any other salient features of your code.
  4. Results and exploration
    Results: Demonstrate that your solution works correctly on the reference instances, and give your results for the test instances. Exploration: Give the result of any investigations you performed with respect to further optimisations of the code, the effect of different parameter settings on the speed/quality of your solution, comparison between your code and other methods, etc.

Timeline

The suggested timeline for completion of your work is given below. You are free to start on your work earlier if you wish, but should make sure you complete the exercises that introduce evolutionary algorithms in Processing before you start your design, as the design should be influenced by what you learn from completing the labs.

Week (Term 2)Activity
1-3Introduction to evolutionary algorithms in Processing.
4-5Continue introduction, design.
6-8Implementation.
9-10Analysis and exploration. Write-up and submission.

Submission

Your work should be submitted via the link provided for this portfolio element on Moodle, in the area corresponding to the last week of term 2. You should submit your code and the report as a single archive file (zip is preferable, please do not submit RAR files) via the submission link, with the filename format Surname_Firstname.zip.