首页 > 其他分享 >JC4004 – Computational Intelligence

JC4004 – Computational Intelligence

时间:2024-12-13 18:43:20浏览次数:3  
标签:code play JC4004 Intelligence fox should goose game Computational

Programming assignment – Groupwork by a team of 4-5 students

Title: JC4004 – Computational Intelligence Note: This assignment accounts for 30% ofthe total mark of the course.Deadline: Submit the assignment in MyAberdeen by 19. December 2024 at 23:00 (China time).Information for Plagiarism and Collusion: The source code and your report may be submitted forassessment. Excessive useof large language models, such as ChatGPT, for writing the code or the report can also be considered

 plagiarism. In addition, submitting similar work with another group can be considered ascollusion.

Information about Extensions: According to the new extension policy of University of Aberdeen,

teachers are no longer allowed to give deadline extensions for coursework assignments. Extensionsmay be requested from the school administration by e-mail: uoa-jienquiries@abdn.ac.uk.Extensions require strong justifications (such as serious illness or grievance), and extension requestsshould be accompanied with supporting evidence, such as a medical certificate. See also a separatedocument for the extension policy. Since this assignment is a groupwork assignment, extensionswould be granted in very exceptional situations only.page 2 of 6

Introduction

In this assignment, your task is to build an artificial intelligence game bot for playing the traditionalboard game Fox and Goose. Your game bot should be able to play the game on both sides, as a foxand as a goose. The detailed rules of the game are explainedbelow.Please note that there aredifferent versions of the game: for this assignment, you should follow therules described in thisdocument.Fox and Goose is a two-player board game. One of the players is a fox trying to capture all the geese.Another player represents the geese and tries to surround the fox so that it cannot move any more.The game is played on a board with 33 possible locations for the fox and the geese. In the beginning,there are 15 geese and one fox on the board, as illustrated inthe Figure 1. The white pieces are thegeese, and the red piece is the fox.The game is played in turns. In this version of the game, the fox and the geese can both move onestep horizontally, vertically, or diagonally on their turn along the lines on the board. The playerplaying goose can select any of the geese on the board to move. Please note that diagonal movement is only allowed from some of the positions, as indicated by the lines on the board. You cannot move a piece to a position that is already taken by another piece. However, the fox cancapture (or eat) a goose by jumping over it to a freeposition. The captured goose is removed from

he board. It is also possible to capture multiple geese in one turn by chaining the jumps like inCheckers. A goose cannot capture the fox. It is not mandatory to capture even if it is possible, but it

s mandatory for both the fox and the geese to make a move in their turn. Examples of legal movesTheoretically, the minimum of four geese would be enough

to surround the fox; therefore, the fox wins when there are 代写JC4004 – Computational Intelligence  less than four geese left on the board.Examples of winning the game are shown in Figure 3.Since the fox and the geese have a different goal and follow different rules, the game is unbalanced.Therefore, the players usually play an even number of games, swapping their roles. The player thatFigure 1. Initial positions in Fox and Goose.wins more games is the final winner. In this assignment, your task is to implement the game logic forboth the fox and the goose.Figure 2. Examples of legal moves for the geese (left) and the fox (right), respectively.Figure 3. Examples of the fox winning the game (left) and the geese winning the game (right).General Guidance and Requirements

In this assignment, you are required to write a Python class Player that is able to play Fox andGoose game through methods play_fox() and play_goose(). The current game board ispassed to the methods as a parameter, and the methods will return the next move as a fox or as aoose, respectively. Python file TestFoxAndGoose.py will be shared to demonstrate how the gameesting framework uses the Player class.ge 3 of 6page 4 of 6 he board is a 2-D list object with 7 × 7 characters representing the state of the game. Characters

F' and 'G' mark the fox and the geese, respectively. An empty position is marked with a dot '.'and a space ' ' marks a position that is off the playing area. The board is initialised in classFoxAndGoose in file TestFoxAndGoose.py as follows:

The play_fox() and play_goose()methods in your code should take the board as defined

above as an input parameter. As an output parameter, the method should return a list object withtwo or more pairs of integers, where the first value represents the row,and the second valuerepresents the column on the board. The first pair is the initial position, and the second pair is thetarget position. For example, return value [[3,2],[3,3]] meansthat the piece in the 4th row, 3rdcolumn will be moved to the 4th row, 4th column. Note that the numbering starts from zero: for

example, position [0,1] is the 2 nd column of the 1 st row.The play_fox()method can return a longer list with several target positions in case the foxcaptures more than just one goose in one move. For example, return value [[3,3],[3,1],[5,3]] meansthat the fox first jumps from position [3,3] to position [3,1], capturing the goose

in position [3,2], and then continues to position [5,3], capturing the goose in position [4,2].You can decide freely what kind of techniques of computational intelligence you use to implemente game logic. You can implement additional functions and classes ifnecessary. However, thePlayer class should interact with the game framework only through the lay_fox() anday_goose()methods, as described above. The bot should have a reasonable complexity: in theesting phase, a time limit of 5 seconds will be applied to consider the moves. If your implementationequires time-consuming initialisation, such as downloading a deep neural network, initialisationshould be done in the class Player constructor __init__, not the play_fox() andplay_goose()methods.You can use code generation tools and code from external sources moderately for assistingmplementation of parts of the code, but the use of any sources or tools should be explained, andthe references should be given in the project report.

]Submission Requirements You should submit the work in the course page in MyAberdeen. Your submission should include atleast two files: file TeamXX.py that includesthe Python code implementing class Player withmethods play_fox() and play_goose(), and ReportXX.pdf that is the project report. In thefile names, replace XX with team number, for example 05. As an example, we provide file Team00.py that allows you to play the game manually with moves entered by a human user. If your code requiresany additional files to run, such as pre-trained neural network, you should include them also in yourubmission.Please note that it is your responsibility to make sure that the code in TeamXX.py works when wetest it: you should use file TestFoxAndGoose.py to import your class and to test that your code workswith the testingframework. Replace module name Team00 in module=__import__("Team00") with your own file name without .py extension. If your code has external

dependencies requiring additional installations, they should be clearly explained in the project reportor readme file included in the submission.

Note that the game bots implemented by different groups will play against each other, so it is

essential to ensure compatibility. You should use Python 3. If you use any third-party packages such

as TensorFlow or PyTorch, we recommend using the latest stable version and to avoid using features

with known backwards compatibility problems. We suggest starting with a clean environment and tokeep track of all the installed packages and their version numbers and reporting them in the projectreport or readme file.Note that at the time of writing, the latest TensorFlow version is not compatible with the latest stablePython release 3.13.0. Therefore, if you plan to use TensorFlow, the Python version should be 3.12.7 or earlier.The length of the project report should be approximately 1,500 words. It is recommended to includegraphical illustrations, but screenshots of the program code should be avoided. If the codeimplements some complex algorithms that are difficult to explain otherwise, flowcharts orpseudocode can be used as tools of illustration. The report should include the following sections:

  1. Introduction: about 200 words. Theoretical basis, including description of the used methods and algorithms with a briefjustification why those techniques were chosen: about 600 words.
  1. Implementation details, including the used libraries and e.g., an UML diagram or a list of thessential methods and their parameters: about 300 words.
  1. Conclusions, including self-reflection, difficulties faced, experiences from testing the code,and ideas for future improvements: about 300 words.
  1. Summary of the individual roles, including brief description of team members’ contributions:about 100 words.

References.If you wish the results for your group to be published in the leaderboard in MyAberdeen, please givea name for your group in the report!page 5 of 6page 6 of 6

Marking Criteria

The assignment will be marked based on the project report (40 marks), methodology (40 marks), andperformance (20 marks).

The project report will be marked according to the coverage of the required aspects, clarity ofpresentation (including language and illustrations), consistency betweetheand thesubmitted code, and relevance of the referencese methodology will be evaluated based on the suitability of the chosen methods and algorithmsor the given task, creativity (for example, combining different methods in an unconventional way),and implementation (e.g., clarity of the source code, computational efficiency).For performance evaluation, we will test all the submitted assignments by arranging them to playagainst each other. Every submission will play against each of the other submissions twice, once as afox and once as a goose. The results will be aggregated in a league table, where a win gives one point,and a loss gives zero points. The winner will be awarded 20 marks, and the other groups will beawarded marks based on the formula:

标签:code,play,JC4004,Intelligence,fox,should,goose,game,Computational
From: https://www.cnblogs.com/CSE2425/p/18604781

相关文章

  • JC4004 Computational Intelligence
    Programmingassignment–Groupworkbyateamof4-5studentsTitle:JC4004–ComputationalIntelligenceNote:Thisassignmentaccountsfor30%ofthetotalmarkofthecourse.Deadline:SubmittheassignmentinMyAberdeenby19.December2024at23:00(C......
  • 人工智能(Artificial Intelligence,简称AI)
    人工智能(ArtificialIntelligence,简称AI)是一种模拟人类智能的科学与技术,它通过模拟人类的思维和行为,实现智能化的计算机系统。人工智能在现代科技中的应用越来越广泛,涵盖了各个领域。在医疗领域,人工智能可以用于辅助诊断和治疗。通过分析大量的医疗数据和图像,人工智能可以提高......
  • COMP3702 Artificial Intelligence
    COMP3702ArtificialIntelligence(Semester2,2024)Assignment2:BeeBotMDPKeyinformation:Due:1pm,Friday20September2024Thisassignmentassessesyourskillsindevelopingdiscretesearchtechniquesforchallengingproblems.Assignment1contrib......
  • AAAI(the Association for the Advance of Artificial Intelligence)近十年研究热点词云
    AAAI(theAssociationfortheAdvanceofArtificialIntelligence)近十年研究热点词云图AAAI近十年(2015-2024)研究热点追踪......
  • ACL(Annual Meeting of the Association for Computational Linguistics)近十年研究热
    ACL(AnnualMeetingoftheAssociationforComputationalLinguistics)近十年研究热点追踪ACL近10年研究热点追踪......
  • COMP3702 Artificial Intelligence BeeBot MDP
    COMP3702ArtificialIntelligence(Semester2,2024)Assignment2:BeeBotMDPKeyinformation:Due:1pm,Friday20September2024Thisassignmentassessesyourskillsindevelopingdiscretesearchtechniquesforchallengingproblems.Assignment2contrib......
  • Robotics: computational motion planning 部分笔记—— week 3 Sampling base planni
    随机路标图思想空间过大,无法遍历,由此采用随机路标图(ProbabilisticRoadMaps)进行采样。基本就是采样点,连线,判断是否发生碰撞,在生成起点终点间的路径之前,该算法试图通过采样的方式搜索整个构型空间。在生成足够多样本后,可以用A*等算法进行路径规划。由于采样的随机性,生成......
  • CITS1401 Computational Thinking with Python
    CITS1401ComputationalThinkingwithPythonProject1,Semester2,2024DepartmentofComputerScienceandSoftwareEngineeringTheUniversityofWesternAustraliaCITS1401ComputationalThinkingwithPythonroject1,Semester2,2024(Individualprojec......
  • MAST90083: Computational Statistics and Data Science
    SchoolofMathematicsandStatisticsMAST90083:ComputationalStatisticsandDataScienceAssignment1Duedate:Nolaterthan08:00amonMonday9thSeptember2024Weight:20%Question1LinearRegressionInthisquestion,wewillapplylinearregression,......
  • 2024 International Conference on Artificial Intelligence and Digital Management
    文章目录一、会议详情二、重要信息三、大会介绍四、出席嘉宾五、征稿主题六、咨询一、会议详情二、重要信息大会官网:https://ais.cn/u/vEbMBz提交检索:EICompendex、IEEEXplore、Scopus大会时间:2024年9月20-22日大会地点:中国-南京三轮截稿:2024年9月14日三、大会......