首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
代做Matlab程序|代做Web开发|代做Database|代写Python程序
项目预算:
开发周期:
发布时间:
要求地区:
1 Introduction
6CCS3AIN
Coursework
This coursework exercise asks you to write code to create an MDP-solver to work in the Pacman environment that we used for the practical exercises.
Read all these instructions before starting. This exercise will be assessed.
2 Getting started
You should download the file pacman-cw.zip from KEATS. This contains a familiar set of files that implement Pacman, and version 6 of api.py which defines the observability of the environment that you will have to deal with, and the same non-deterministic motion model that the practicals used.
Version 6 of api.py, further extends what Pacman can know about the world. In addition to knowing the location of all the objects in the world (walls, food, capsules, ghosts), Pacman can now see what state the ghosts are in, and so can decide whether they have to be avoided or not.
3 What you need to do 3.1 Write code
This coursework requires you to write code to control Pacman and win games using an MDP-solver. For each move, you will need to have the model of Pacman’s world, which consists of all the elements of a Markov Decision Process, namely:
• A finite set of states S;
• A finite set of actions A;
• A state-transition function P (s′ |s, a); • A reward function R;
• A discount factor γ ∈ [0, 1];
Following this you can then compute the action to take, either via Value Iteration, Policy Iteration or Modified Policy Iteration. It is expected that you will correctly implement such a solver and optimize the choice of the parameters. There is a (rather familiar) skeleton piece of code to take as your starting point in the file mdpAgents.py. This code defines the class MDPAgent.
There are two main aims for your code:
1 Mallmann-Trenn / McBurney / 6ccs3ain-cw
(a) Win hard in smallGrid
(b) Win hard in mediumClassic
To win games, Pacman has to be able to eat all the food. In this coursework, for these objectives, “winning” just means getting the environment to report a win. Score is irrelevant.
3.1.1 Getting Excellence points
There is a difference between winning a lot and winning well. This is why completing aim (a) and (b) from previous section allows you to collect up to 80 points in the Coursework. The remaining 20 points are obtained by having a high Excellence Score Difference in the mediumClassic layout, a metric that directly comes from having a high average winning score. This can be done through different strategies, for example through chasing eatable ghosts.
A couple of things to be noted. Let W be the set of games won, i.e., |W | ∈ [0, 25]. For any won game i ∈ W define sw(i) to be the score obtained in game/run i.
• ∆Se in the marksheet is the Excellence Score Difference. You can use the following formula to calculate it when you test your code and compare the result against the values in Table 3
∆Se = (sw(i) − 1500) (1) i∈W
Losses count as 0 score and are not considered. If ∆Se < 0, we set it to 0 (you cannot have a negative excellence score difference).
• Because smallGrid does not have room for score improvement, we will only look at the mediumClassic layout
• You can still get excellence points if your code performs poorly in the number of wins; marking points are assigned independently in the two sections
• Note however that marking points are assigned such that it is not convenient for you to directly aim for a higher average winning score without securing previous sections’s aims (a) and (b) first
• We will use the same runs in mediumClassic to derive the marks for Table 2 and Table 3.
3.2 Things to bear in mind
Some things that you may find helpful:
(a) We will evaluate whether your code can win games in smallGrid by running: python pacman.py -q -n 25 -p MDPAgent -l smallGrid
-l is shorthand for -layout. -p is shorthand for -pacman. -q runs the game without the interface (making it faster).
(b) We will evaluate whether your code can win games in mediumClassic by running: python pacman.py -q -n 25 -p MDPAgent -l mediumClassic
The -n 25 runs 25 games in a row.
2 Mallmann-Trenn / McBurney / 6ccs3ain-cw
(c) The time limit for evlauation is 25 minute for mediumClassic and 5 minutes for small grid. It will run on a high performance computer with 26 cores and 192 Gb of RAM. The time constraints are chosen after repeated practical experience and reflect a fair time bound.
(d) When using the -n option to run multiple games, the same agent (the same instance of MDPAgent.py) is run in all the games.
That means you might need to change the values of some of the state variables that control Pacman’s behaviour in between games. You can do that using the final() function.
(e) There is no requirement to use any of the methods described in the practicals, though you can use these if you wish.
(f) If you wish to use the map code I provided in MapAgent, you may do this, but you need to include comments that explain what you used and where it came from (just as you would for any code that you make use of but don’t write yourself).
(g) You can only use libraries that are part of a the standard Python 2.7 distribution. This ensures that (a) everyone has access to the same libraries (since only the standard distribution is available on the lab machines) and (b) we don’t have trouble running your code due to some library incompatibilities.
(h) You should comment your code and have a consistent style all over the file.
3.3 Limitations
There are some limitations on what you can submit.
(a) Your code must be in Python 2.7. Code written in a language other than Python will not be marked.
Code written in Python 3.X is unlikely to run with the clean copy of pacman-cw that we will test it against. If is doesn’t run, you will lose marks.
Code using libraries that are not in the standard Python 2.7 distribution will not run (in particular, NumPy is not allowed). If you choose to use such libraries and your code does not run as a result, you will lose marks.
(b) Your code must only interact with the Pacman environment by making calls through func- tions in Version 6 of api.py. Code that finds other ways to access information about the environment will lose marks.
The idea here is to have everyone solve the same task, and have that task explore issues with non-deterministic actions.
(c) You are not allowed to modify any of the files in pacman-cw.zip except mdpAgents.py.
Similar to the previous point, the idea is that everyone solves the same problem — you can’t change the problem by modifying the base code that runs the Pacman environment. Therefore, you are not allowed to modify the api.py file.
(d) You are not allowed to copy, without credit, code that you might get from other students or find lying around on the Internet. We will be checking.
This is the usual plagiarism statement. When you submit work to be marked, you should only seek to get credit for work you have done yourself. When the work you are submitting is code,
3 Mallmann-Trenn / McBurney / 6ccs3ain-cw
(e) (f) (g)
4
you can use code that other people wrote, but you have to say clearly that the other person wrote it — you do that by putting in a comment that says who wrote it. That way we can adjust your mark to take account of the work that you didn’t do.
Your code must be based on solving the Pacman environment as an MDP. If you don’t submit a program that contains a recognisable MDP solver, you will lose marks.
The only MDP solvers we will allow are the ones presented in the lecture, i.e., Value iteration, Policy iteration and Modified policy iteration. In particular, Q-Learning is unacceptable.
Your code must only use the results of the MDP solver to decide what to do. If you submit code which makes decisions about what to do that uses other information in addition to what the MDP-solver generates (like ad-hoc ghost avoiding code, for example), you will lose marks.
This is to ensure that your MDP-solver is the thing that can win enough games to pass the functionality test.
What you have to hand in
Your submission should consist of a single ZIP file. (KEATS will be configured to only accept a single file.) This ZIP file must include a single Python .py file (your code).
The ZIP file must be named:
cw
.zip
so my ZIP file would be named cw mallmann-trenn frederik.zip.
Remember that we are going to evaluate your code by running your code by using variations on
python pacman.py -p MDPAgent
(see Section 5 for the exact commands we will use) and we will do this in a vanilla copy of the pacman-cw folder, so the base class for your MDP-solving agent must be called MDPAgent.
To streamline the marking of the coursework, you must put all your code in one file, and this file must be called mdpAgents.py,
Do not just include the whole pacman-cw folder. You should only include the one file that includes the code you have written.
Submissions that do not follow these instructions will lose marks. That includes submissions which are RAR files. RAR is not ZIP.
5 How your work will be marked
See cw-marksheet.pdf for more information about the marking. There will be six components of the mark for your work:
(a) Functionality
We will test your code by running your .py file against a clean copy of pacman-cw.
As discussed above, the number of games you win determines the number of marks you get. Since we will check it this way, you may want to reset any internal state in your agent using
4 Mallmann-Trenn / McBurney / 6ccs3ain-cw
final() (see Section 3.2). For the excellence marks, we will look at the winning scores for the mediumClassic layout.
Since we have a lot of coursework to mark, we will limit how long your code has to demonstrate that it can win. We will terminate the run of the 25smallGrid games after 5 minutes, and will terminate the run of the 25 mediumClassic games after 25 minutes. If your code has failed to win enough games within these times, we will mark it as if it lost. Note that we will use the -q command, which runs Pacman without the interface, to speed things up.
Code not written in Python will not be marked.
(b) Style There are no particular requirements on the way that your code is structured, but it should follow standard good practice in software development and will be marked accordingly.
Remember that your code is only allowed to interact with the Pacman environment through version 6 of api.py. Code that does not follow this rule will lose marks.
(c) Documentation
All good code is well documented, and your work will be partly assessed by the comments you provide in your code. If we cannot understand from the comments what your code does, then you will lose marks. At the same time, comments are not intended to be paragraph-long, but brief sentences. Good code should explain itself for the most part.
A copy of the marksheet, which shows the distribution of marks across the different elements of the coursework, will be available from KEATS.
5 Mallmann-Trenn / McBurney / 6ccs3ain-cw
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
代做ceng0013 design of a pro...
2024-11-13
代做mech4880 refrigeration a...
2024-11-13
代做mcd1350: media studies a...
2024-11-13
代写fint b338f (autumn 2024)...
2024-11-13
代做engd3000 design of tunab...
2024-11-13
代做n1611 financial economet...
2024-11-13
代做econ 2331: economic and ...
2024-11-13
代做cs770/870 assignment 8代...
2024-11-13
代写amath 481/581 autumn qua...
2024-11-13
代做ccc8013 the process of s...
2024-11-13
代写csit040 – modern comput...
2024-11-13
代写econ 2070: introduc2on t...
2024-11-13
代写cct260, project 2 person...
2024-11-13
热点标签
mktg2509
csci 2600
38170
lng302
csse3010
phas3226
77938
arch1162
engn4536/engn6536
acx5903
comp151101
phl245
cse12
comp9312
stat3016/6016
phas0038
comp2140
6qqmb312
xjco3011
rest0005
ematm0051
5qqmn219
lubs5062m
eee8155
cege0100
eap033
artd1109
mat246
etc3430
ecmm462
mis102
inft6800
ddes9903
comp6521
comp9517
comp3331/9331
comp4337
comp6008
comp9414
bu.231.790.81
man00150m
csb352h
math1041
eengm4100
isys1002
08
6057cem
mktg3504
mthm036
mtrx1701
mth3241
eeee3086
cmp-7038b
cmp-7000a
ints4010
econ2151
infs5710
fins5516
fin3309
fins5510
gsoe9340
math2007
math2036
soee5010
mark3088
infs3605
elec9714
comp2271
ma214
comp2211
infs3604
600426
sit254
acct3091
bbt405
msin0116
com107/com113
mark5826
sit120
comp9021
eco2101
eeen40700
cs253
ece3114
ecmm447
chns3000
math377
itd102
comp9444
comp(2041|9044)
econ0060
econ7230
mgt001371
ecs-323
cs6250
mgdi60012
mdia2012
comm221001
comm5000
ma1008
engl642
econ241
com333
math367
mis201
nbs-7041x
meek16104
econ2003
comm1190
mbas902
comp-1027
dpst1091
comp7315
eppd1033
m06
ee3025
msci231
bb113/bbs1063
fc709
comp3425
comp9417
econ42915
cb9101
math1102e
chme0017
fc307
mkt60104
5522usst
litr1-uc6201.200
ee1102
cosc2803
math39512
omp9727
int2067/int5051
bsb151
mgt253
fc021
babs2202
mis2002s
phya21
18-213
cege0012
mdia1002
math38032
mech5125
07
cisc102
mgx3110
cs240
11175
fin3020s
eco3420
ictten622
comp9727
cpt111
de114102d
mgm320h5s
bafi1019
math21112
efim20036
mn-3503
fins5568
110.807
bcpm000028
info6030
bma0092
bcpm0054
math20212
ce335
cs365
cenv6141
ftec5580
math2010
ec3450
comm1170
ecmt1010
csci-ua.0480-003
econ12-200
ib3960
ectb60h3f
cs247—assignment
tk3163
ics3u
ib3j80
comp20008
comp9334
eppd1063
acct2343
cct109
isys1055/3412
math350-real
math2014
eec180
stat141b
econ2101
msinm014/msing014/msing014b
fit2004
comp643
bu1002
cm2030
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!