Skip to main content
留学咨询

墨尔本大学COMP90054 assignment2课业解析

By May 15, 2020No Comments

墨尔本大学COMP90054 assignment2课业解析题意:这个项目的目的是实现一个可以参加比赛的吃豆人pacman的自治代理 解析:Pac Man Agent的实现:
可以使用手工编码的决策树来表达特定于Pac Man的行为。可交付部分中提到的技术比if-else规则的决策树更容易地处理不同的规则。如果决定计算一个策略,可以将其保存到一个文件中,在游戏开始时加载它,在每场游戏之前都有15秒的时间来执行预计算。 Pac Man作为PDDL的经典规划
规划的典型应用包括对规划人员的一次或多次调用。实例由前端动态生成,解决方案被解释为可执行指令。吃豆人和幽灵又不同的目标:吃豆人的目标是为了生存而吃所有网格的点,幽灵的目标是杀死吃豆人。假设游戏是回合制的,因此在每一步都会生成一个实例,其中包含当前世界的状态,即网格中的点和幽灵位置。从吃豆人的角度来看,幽灵不会移动,反之亦然,也就是说,环境是静态的。在每一步,planner都会拿出一个计划,吃掉所有的点,同时避免静态幽灵,并计划让幽灵杀死静态吃豆人。pacman引擎对计划的一个简单解释是,只执行计划的第一个动作,忽略其余的动作,并在下一个步骤中调用planner,更新计算幽灵的新位置。知识点:搜索算法,PDDL,决策树,游戏理论更多可加微信讨论微信号: yzr5211234pdfCOMP90054 AI Planning for Autonomyhttp://ai.berkeley.edu/contest.htmlNote that the Pacman tournament has different rules as it is a two teams game, where your Pacmans become ghostsin certain areas of the grid. Please read carefully the rules of the Pacman tournament. Understanding it well anddesigning a controller for it is part of the expectations. To help you develop your solution you must provide:(i) A working Pac Man Agent that is capable of playing Pac-Man and competing in the tournament. Your Agentcan use any technique, or combination of techniques, that you choose. For example using a classical offthe-shelf planner, Reinforcement Learning, Heuristic Search, Monte Carlo Tree Search or a purpose builtdecision tree of your own making (24 marks).(ii) A recorded 5-minute oral presentation that outlines the theoretical or experimental basis for the design ofyour agents (i.e. why you did what you did), challenges faced, and what you would do differently if you hadmore time. Your presentation must end with a live demo of your different implementations, i.e. showing howthe different techniques your tried work. The video will be shared with us through an unlisted youtube linkin the Wiki of your GitLab repository. (10 marks).(iii) A WIKI: describing the approaches implemented, a small table comparing your different agents showingtheir performance in several scenarios. Discuss briefly the table. The link for the recorded oral-presentationshould be included in the wiki. (6 marks).This project follows up from your Search agents for project 1. You should be familiarized with the pacmanenvironment, and you can use variations of your search agents as a starting point for this project.Corrections: From time to time, students or staff find errors (e.g., typos, unclear instructions, etc.) in theassignment specification. In that case, corrected version will be uploaded to the course LMS as quickly as possibleand an announcement will posted in the course LMS and also to the forum (if they issue was related to a forummessage). The date of the latest specification can be found in the bottom right of each page (S2 2019- Date).Silent Policy: A silent policy will take effect 48 hours before this assignment is due. This means that noquestion about this assignment will be answered, whether it is asked on the newsgroup, by email, or in person.Team Registration & GitLab Repo SetupThis is a group/team project assignment (groups of 3 or 4 students). There will be no need to explicitly submitanything for this assignment project, except filling the certification, as the repository on GitLab will represent theteam’s submission (more details below).COMP90054 AI Planning for Autonomy 1 S2 2019- September 15, 2019A team should do the following (only one student member needs to do these steps):1. Set-up project GIT repository:• One of the members of the new team should fork privately the following template project repositoryin UoM GitLab using their Unimelb student account:https://gitlab.eng.unimelb.edu.au/nlipovetzky/comp90054-pacmanThis repository has the initial template for the contest under subdirectory pacman-contest/. Make sure:• Click on the gitlab link above and Fork the repository forllowing these instructions.• Repository name must be slightly changed to “comp90054-pacman-”, where is the student number of the owner of the repository. In order to change thename of the project follow these instructions• Set and keep your repository private. Respect the wishes of the creators of the UC-Pacman: “Pleasedo not distribute or post solutions to any of the projects.”– Go to your forked project gitlab page and click on Poject’s Settings ! General ! Expand permissions tab ! Change ”Visibility Level” to Private.• Give write permissions to all the other students who are part of team. Follow these instructions. Addeach member as a mantainer role.• Give mantainer permission to me (Nir) by registering my username: nlipovetzky.• Set up a Wiki in the repo: Wiki page should list team name, team member names and student numbers,and can have information for each project. See a template here.• Do not alter the directory structure of the forked repository.Note: The team is expected to develop their solution incrementally in this repository and apply good SoftwareEngineering practices and group working by regularly updating this repository (for example, a submissioncontaining the final solution in just a few commits is not good practice). The repository will be used as a wayto gauge any anomalies in the effort put in the semester for any student. This could lead to fairly differentmarks within the same team if deemed necessary.2. Register the group team for this project by filling this form:https://forms.gle/KacSUFnukeCJvFrV7Once your team is registered, the team is ready to work and will be able to submit its solutions!DeliverablesA final submission, by the official deadline, for this project should consist of:(1) A working Pacman agent that is capable of competing in the tournament in Python by suitably modifying file myTeam.py as per instructions in the UC Berkeley Contest page. The code should be internallycommented at high standards and be error-free and never crash.In your solution, You have to use at least 2 of the techniques (3 techniques at least for groups of 4) thathave been discussed in COMP90054. Feel free to combine them in any form. The candidate techniques are:(a) Heuristic Search Algorithms (using general or pacman specific heuristic functions)(b) Classsical Planning (PDDL and calling a classical planner, see subsection below)(c) Policy iteration or Value Iteration (Model-Based MDP)(d) Monte Carlo Tree Search or UCT (Model-Free MDP)(e) Reinforcement Learning – classical, approximate or deep Q-learning (Model-Free MDP)(f) Goal Recognition techniques (to infer intentions of opponents)(g) Game Theoretic Methods(2) A group.txt plain text file listing your group members’ student number, full name, and email, one per line.(3) A Wiki in your repository, including the link to your youtube presentation at the top of the Wiki. Make youryoutoube video unlisted if you don’t want it to be searchable. The Wiki should explain and analyse criticallyCOMP90054 AI Planning for Autonomy 2 S2 2019- September 15, 2019your Pacman agent system. Besides explaining the technique used, the wiki can include, but is not limitedto, experiments to show how different variations of your agent perform against each other, assumptions thatyou made, analysis of the strengths and weaknesses of your solution, techniques tried but not used in thefinal version, etc. The techniques implemented that did not make it to the final submission should have theirassociated commit tag so we can explore and run the code. Otherwise we cannot mark techniques that wecannot see the code.The above files must all be placed in folder pacman-contest/ of your repo and with the exact name andcapitalization as described above. Please check submission details below.Submission InstructionsTo submit you must follow the next two steps:1. Submit your solution by simply tagging “submission-contest” the commit you want to submi
t:• See this guide for tagging using the command line or this video, and here for tagging via GitLabinterface directly.• To re-submit another version you need to delete previous submission tags– First delete it from the GIT server by running: git push –delete origin – Second, delete the local tag in your repo by running: git tag –delete tagnameFor the marking process, we will automatically extract files myTeam.py, group.txt in the folderpacman-contest/ of your repository. You can still import other files if needed; see item 5 below.2. Each student must certify the submission and contribution details by filling the following form onceyou finish the project (16-oct), no later than 20-oct:Contest – Certification of SubmissionEach member of the team must certify in order to get a mark for the assignment project. Lack of certification will attract zero marks for the whole assignment project (for the corresponding student).While the project can be done as a team, we reserve the right to assess members of a team individually.Important: When submitting a solution, please make absolutely sure you adhere to the following instructions:1. Your code must run on Linux and adhere to Python 3.6. Staff will not debug or fix any code.2. At the very minimum, your code should be error-free. If your code crashes in any execution, it will disqualified from the contest. Again, staff will not debug or fix code that crashes.3. The deliverables must be placed in folder pacman-contest/ of your repo (i.e., not in other folders).4. You are not to change or affect the standard output or error (sys.stdout and sys.sterr) in anyway. These are used to report each game output and errors, and they should not be altered as you will beintefering negatively with the contest and with the other team’s printouts. If your file mentions any of them itwill be disqualified automatically.5. Your code will be copied into a directory called teams// in the contest package.This means that if you import from other files outside myTeam.py they will not be found unless you tellPython to look in your team dir. You can do so by having the following code on top of your myTeam.py:import syssys.path.append(’teams//’)6. Your code will be run by the following command:python3 capture.py –delay 0.0 -r teams//myTeam.py -b teams//myTeam.pyplease make sure your AgentFactory is defined in myTeam.py.COMP90054 AI Planning for Autonomy 3 S2 2019- September 15, 20197. We’ve added some useful options 1) –delay to slow down the execution if you want to visualize in slowmotion, 2) –record or –replay. Use –help to check all the options.8. Do *NOT* use the current working directory to write temporary files; instead, redirect all output to yourown folder ./teams//. For example, if you use a planner online, and generatePDDL files and solutions, redirect your planner call, solution outputs, etc., to your own folder. You canuse python code to do it automatically, or you can hardcode it assuming that your team will be located in./teams// folder.9. If you want to use any other 3rd-party executable please discuss with us before submission. You can assume that TensorFlow, keras, sklearn, numpy, scipy and neat-python libraries areinstalled in our running environment, using the latest version available in Ubuntu 18.04. ff executable version 2.1 of the Metric-FF planner (https://fai.cs.uni-saarland.de/hoffmann/metric-ff.html) is available in /usr/local/bin.10. Finally, submit your project substantially before the deadline, preferably one day before. Submitting closeto the deadline could be risky and you may fail to submit on time, for example due to lose of Internetconnection or server delays. There will be no extensions based on these unforeseen problems.1Submissions not compatible with the instructions above will attract zero marks and do not warrant a resubmission. Staff will not debug/fix your submission.General Comments (optional read)1. Implementation of Pac Man AgentsYou can always use hand coded decision trees to express behaviour specific to Pac-Man, but they won’t countas a required technique. You are allowed to express domain knowledge, but remember that we are interested inAutonomy, and hence using techniques that generalise well. The 7 techniques mentioned in the Deliverables sectioncan cope with different rules much easier than any decision tree (if-else rules).If you decide to compute a policy, you can save it into a file and load it at the beginning of the game, as youhave 15 seconds before every game to perform any pre-computation.While a classical planning approach is perhaps the simplest way to get a working agent (quick prototype), it isunlikely to do well in the tournament play if not combined with other techniques. That is, you should think abouteach possible situation that may arise during the game, and use the best technique you know. You do not need touse classical planning for each situation, actually you don’t need to use it at all. Just use at least 2 (3 if groups of 4)different techniques from the list in Deliverables Section.2. Pac Man as Classical Planning with PDDLTypical applications of planning consist on one or several calls to a planner. The instances are generated on thefly by a front–end (the pacman engine), and the solutions (plans) are interpreted as executable instructions. As thepacman is not a classical single agent problem, you could implement two points of view: The point of view of thepacman, where its goal is to stay alive while eating all the dots of the grid, and The point of view of the ghost,whose goal is to kill pacman. Assume that the game is turn-based, so at each step an instance is generated withthe current state of the world, i.e. the dots and ghosts locations in the grid. From the point of view of pacman, theghosts don’t move, and vice-versa, that is, the environment is static.At each step the planner would come out with a plan to eat all the dots while avoiding static ghosts, and plans toenable ghosts to kill the static pacman. A simple interpretation of the plans by the pacman engine is to execute onlythe first action of the plan, ignore the remaining actions, and call the planner in the next step with a new updatedinstance accounting for the new locations of the ghosts and the pacman.1Extensions will only be permitted in exceptional circumstances. Note that workload and/or heavy load of assignments will not beaccepted as exceptional circumstances for an extension.COMP90054 AI Planning for Autonomy 4 S2 2019- September 15, 2019The axiomatisation should define the state model for pacman using PDDL, and another PDDL for a ghost statemodel. If you try this approach, explain clearly the assumptions made, e.g. pacman do not move to cell X when Yholds, Ghosts are static, etc., and describe several initial states or goals to illustrate interesting situations.Use one PDDL domain file for pacman, and one domain file for the ghost containing the predicates and theactions of the world. The problem file describes the ‘initial’ state and goals. Therefore, with a single domain foreither the pacman or the ghost, several problems can be generated by only updating the problem file.By reading the state of the Pacman from the engine and converting this into PDDL predicates, you can describethe state of the game in PDDL and, at each step that an action is required, call your favourite planner using thatstate as the initial state. Then, parse the solution in order to choose the best action.Different domains can be used to encode different strategies.Make sure that your PDDL files can be solved using the online solver in http://editor.planning.domains.Preliminary Contest SubmissionWe will be running informal tournaments based on preliminary submissions in the weeks before the final projectsubmission. We will start once five teams have submitted their preliminary agents (by tagging their repos). Wewill group teams randomly in 4 different leagues. Given that we expect ≈200 teams, you will be playing against≈50 teams.Participating in these pre-contests will give you a lo
t of insights on how your solution is performing (bydownloading and re-playing each game) and how to improve it. Results, including replays for every game,will be available only for those teams that have submitted in https://people.eng.unimelb.edu.au/nlipovetzky/comp90054tournament/.The pre-competitions will run every night at 0:10AM using your latest tagged version. In order to increasethe amount of feedback, we will be running your team against the staff teams every 2hours, from 8AM untill10PM.You can re-submit multiple times, as long as your repository has a submission tag, and they carry no marking at all; they are just for debugging and improving your solution! You do not need to certify the preliminarysubmissions, only the final one (you do need to register your team though).Marking criteriaA final contest using many layouts will be run juts after final submission. The top-8 will play quarterfinals, semifinals and finals, time permitting live in the last day of class or in week 13 in a day specified for that (these finalphases will not be part of the marking criteria, just bonus marks).The final contest and the quality of the Wiki and Presentation will be used to derive the final marks for theproject.Part (i) Pacman Agent– 24 marksMarks will be given according to final position in the tournament with respect to staffTeam:• Pacman competitor finishes above the staffTeamBasic agent [9 marks].• Pacman competitor finishes above the staffTeamMedium agent [6 marks].• Pacman competitor finishes above the staffTeamTop agent [6 marks].• Pacman competitor finishes above the staffTeamSuper agent [3 marks].• Final competition place (up to 2 bonus marks).– Winner team of each league in the preliminary competition will receive 1 bonus mark.– Winner of the Final Tournament will receive 1 bonus mark.The precise mark will depend how far your agent system is from these reference agents in the final contest.COMP90054 AI Planning for Autonomy 5 S2 2019- September 15, 2019Part (ii) Video– 10 marks• A clear presentation of the design decisions made, challenges experienced, and possible improvements [3marks]• A clear demonstration and understanding of the subject material [2 marks]• Demo of the different agents implemented across a variety of scenarios, showcasing pitfalls and benefits ofeach approach. No need of full game demo, just edit interesting parts and explain your insights [5 marks]Part (iii) Wiki– 6 marks• A clear written description of the design decisions made, approaches taken, challenges experienced, andpossible improvements [3 marks]• An experimental section that justifies and explains the performance of the approaches implemented, includinga table and discussion [3 marks]The staffTeams are the reference baselines: the farther an agent is from the base reference agents (Basic,Medium, and Top), the more marks it will attract. The only exception is staffTeamSuper, any team that finishesabove it, will earn full marks (24 points). This together with the quality of the Wiki and the presentation willdetermine the final mark, then adjusted as per individual contribution2 . So this means that if an agent systemis between staffTeamMedium and staffTeamTop and has a VERY GOOD (all marks earned) Wiki andPresentation, then it will score between 77.5% and 92.5% overall (the closer to staffTeamTop, the closer to92.5%).Inter-University CompetitionThe top teams of the tournament will qualify to the yearly championship accross RMIT and The University ofMelbourne, which will run each semester along with the best teams since 2017 onward (given you grant us permission). Note that the top-8, i.e. 1st and 2nd of each of the 4 leagues, will play quarterfinals, semifinals and finals,time permitting live in the last day of class. This is just “for fun” and will attract no marks, but is something thatprevious students have stated in their CVs!https://sites.google.com/view/pacman-capture-hall-fame/I hope you enjoy this open-ended contest-based project and learn much from it. If you still havedoubts about the project and/or this specification do not hesitate asking in the Course Forum.GOOD LUCK!Academic MisconductThe University misconduct policy3 applies. Students are encouraged to discuss the assignment topic, but all submitted work must represent the individual’s understanding of the topic.The subject staff take academic misconduct very seriously. In this subject in the past, we have successfullyprosecuted several students that have breached the university policy. Often this results in receiving 0 marks for theassessment, and in some cases, has resulted in failure of the subject.2We will use the team code repository as a way to gauge any anomalies in the effort put in throughout semester for any student. Thiscould lead to fairly different marks within the same team if deemed necessary. Plagiarism detection software will also be used.3See https://academichonesty.unimelb.edu.au/policy.htmlCOMP90054 AI Planning for Autonomy 6 S2 2019- September 15, 2019

admin

Author admin

More posts by admin