Python和NetLogo代写-COM00177M
时间:2022-04-29
Module Code
COM00177M
MEng and MMath Degree Examinations 2021–22
DEPARTMENT OF COMPUTER SCIENCE
Evolutionary & Adaptive Computing
EVAC-2
Open Individual Assessment
Issued: 12 noon on 16 March 2022 (Spr/10/Wed)
Submission due: 12 noon on 20 April 2022 (Sum/1/Wed)
Feedback and marks due: 25 May 2022 (Sum/6/Wed)
All students should submit their answers through the electronic submission system:
http://www.cs.york.ac.uk/student/assessment/submit/ by 12 noon on 20 April 2022
(Sum/1/Wed). An assessment that has been submitted after this deadline will be
marked initially as if it had been handed in on time, but the Board of Examiners will
normally apply a lateness penalty.
Your attention is drawn to the section about Academic Misconduct in your
Departmental Handbook: https://www.cs.york.ac.uk/student/handbook/.
Any queries on this assessment should be addressed by email to Dimitar Kazakov at
dlk2@york.ac.uk. Answers that apply to all students will be posted on the VLE.
Your submission should identify you through your exam number only.
Page 1 of 4
Module Code
COM00177M
Rubric
Your submission should be a single zip file named after your exam number,
Yxxxxxxx.zip. You may choose to use Python in the form of a Colab notebook or
NetLogo.
A submission using Python should contain a Colab notebook evac2.ipynb
combining code and explanations, and a PDF evac2.pdf of the state of the same
notebook after all of its code has been executed. In case of any discrepancies between
the contents and output of the Google Colab notebook and the PDF, the former will be
used for marking. Your code should assume any auxiliary files that you provide or
generate are in the same folder as the notebook from which they are accessed. All
Python code should be in Python3. Your Python code must run correctly on Google
Colab. Your notebook should contain a text note about the time it took to execute the
main part of your code and whether you used any hardware accelerator. Your code
does not require the user to have administrative rights.
A submission using NetLogo should consist of a single *.zip archive containing the
NetLogo file evac2.nlogo with your solution. All text should be included in the ‘Info’
part of the corresponding NetLogo file, which may contain links to local images
supplied separately in the submitted archive. Use as much as possible the standard
headings of the ‘Info’ part of the NetLogo file to introduce your model, explain how it
works and how to use it. Report the results and their evaluation under the heading
‘Things to Notice’. Use the rest of the headings as appropriate.
Make sure you do not use archive formats other than zip. If your submission is not a
single zip archive, you will be penalised. Unless otherwise indicated there are no
word limits on your answers, but a large amount of irrelevant comments can affect
negatively your mark.
Page 2 of 4
Module Code
COM00177M
Society-based Cooperation
1 Setup
A population of agents exists in an environment in which the location of an agent is
unknown and irrelevant; the only possible event in this environment is for a pair of
agents chosen at random to play a game. The game is very simple: each agent carries
out one of two possible actions, ‘cooperate’ or ‘be selfish’. The game payoffs to both
agents are described by the following table:
Agent 2
Agent 1 Cooperate Be selfish
Cooperate (4,4) (0,6)
Be selfish (6,0) (1,1)
Table 1: Payoffs: (Agent1, Agent2)
Every agent is a member of exactly one society, and there are four societies with
different rules of conduct to choose from. Each agent’s action is fully determined by the
rules of the society it belongs to, and whether the other agent belongs to the same
society or not. However, after the payoff from each encounter is received (and added to
the total payoff from all previous encounters), each agent may decide to leave its
current society and join another in an attempt to maximise its future payoff.
The four societies and their rules of conduct are as follows. Members of the “Saints”
society cooperate with everyone. Members of the “Buddies” Society always cooperate
with each other, but never with anyone else. Members of the “Fight Club” never
cooperate with each other, but always cooperate with everyone else. Members of the
“Vandals” Society never cooperate with anyone.
When an agent is selected to play a game, it must follow the strategy prescribed by the
society it is a member of. Once both players have determined their move, the
appropriate payoffs are handed out as listed in Table 1. After each game played, each
player is shown the total wealth of the other player, the current society that other player
belongs to, and it is allowed to leave its current society and join another one. (An agent
must always remain a member of exactly one of the four societies.) Each agent’s
personal objective is to maximise its total payoff over the course of the whole
simulation, which consists of repeating the above game N times, where the agents do
not know that number in advance, and for each round of the game, the pair of
participating agents is chosen afresh. The population size should be appropriately
chosen, with the available computational power in mind, among other factors.
Page 3 of 4
Module Code
COM00177M
2 To Do
Your main objective is to use evolutionary algorithms, possibly in combination with
machine learning, in order to develop a strategy that will allow an agent to maximise its
total payoff by changing its society membership over time as appropriate.
1. For 10 marks, choose a simple and efficient representation of your agents’
behaviour that would also allow for adaptation (and learning, if needed). Describe
the chosen representation in your submission and explain the reasons behind it.
2. For 15 marks, write the necessary code and describe how running the simulation
is going to provide the basis for estimating the fitness of your agents’ adaptive
behaviour and/or generate training examples for your learning algorithm.
3. Describe the design of (15 marks), and implement (20 marks) a procedure that
uses adaptation, and possibly learning, to produce a viable behaviour for your
agents.
4. For 15 marks, design and describe an evaluation procedure that allows you to
compare the behaviour obtained through adaptation (and possibly learning) to a
non-adaptive behaviour preserving the initial assignment to societies, and draw
conclusions that are supported by results that are statistically significant, and
based on the most appropriate statistical tests (where applicable). Assume all
agents are capable of changing (learning/adaptation) their behaviours at the
same time.
5. For 10 marks, collect experimental evidence, carry out, and show the results of
the evaluation procedure described above.
6. Use simulations to study whether membership in each of the 4 societies is an
evolutionary stable strategy (8 marks), and to draw conclusions about the viability
of cooperation and its expected levels in this setup (7 marks).
3 Marking Criteria
All of the above assumes there is working code implementing the individual objectives.
Partial marks may be allocated for design alone. No results will be accepted, if the
corresponding parts of the code involved in their generation cannot be executed.
The criteria to be used in the marking also include clarity, simplicity, generality and
rigour of the methods chosen, as well as the ability to describe, analyse and visualise
experimental results in an effective way.
End of examination paper
Page 4 of 4
essay、essay代写