Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

COMP222 - 2022 - Second CA Assignment

Individual coursework

Game AI

Assessment Information

Assignment Number

2 (of 2)

Weighting

12%

Assignment Circulated

Friday 18 March 2022

Deadline

Thursday 5 May 2022, 17:00

Submission Mode

Electronic

Learning outcome assessed

2. An appreciation of the fundamental concepts associ- ated with game development: game physics, game arti- ficial intelligence, content generation;

3. The ability to implement a simple game using an existing game engine

Purpose of assessment

To design and implement a tank bot for the Robocode tank battle game or to extend Assignment 1 with AI

Marking criteria

The marking scheme can be found in Section 4

Submission necessary in order   to satisfy Module requirements?

No

Late Submission Penalty

Standard UoL Policy

I enforce a “no error policy” in this module:  If your code does not compile, your mark will be capped at 40%.   Thus, you may get a higher mark for an incomplete solution than for an advanced sketch.

 

1   Disclaimer

There are two options to complete this assignment:

❼ OPTION 1: Implement a tank in Robocode.

❼ OPTION 2: Integrate Game AI to CA Assignment 1


2    Objectives for OPTION 1

Robocode is a programming game, where the goal is to develop a robot battle tank to battle against other tanks. The robot battles are running in real-time and on-screen.  Robots can move, shoot at each other, scan for each other, and hit the walls (or other robots).  More details can be found on the project web site: http://robocode.sourceforge.net/

This assignment requires you to design and implement a  “tank bot” for the Robocode tank battle game.  You need to choose a game AI behaviour model (such as, for example, finite state machine, decision trees, behaviour trees, or any other mechanism of your choice) and implement your robot based on this behaviour model.

 

3    Objectives for OPTION 2

This assignment requires you to integrate game AI into Assignment 1. You need to choose   a game AI behaviour model (such as, for example, finite state machine, decision trees, be-   haviour trees, or any other mechanism of your choice) and implement one or more game agents based on this behaviour model. The integration of AI should result in a gameplay that is nei-   ther too easy, nor too hard. Also, the gameplay should be getting increasingly more difficult   as the game progresses.

Hint   You can choose which of the game entities will become “intelligent”.  For example, you may choose to make (some of) the asteroids in your game intelligent.  That is, instead of “blindly” floating in the field, the intelligent asteroid can “sense” that it is close” to the spaceship and purposefully change its direction to “seek” the player’s spaceship in order to crash onto it. Also it can “sense” that it is being shot at and purposefully change its direction to  “dodge” the player’s bullets.   The game’s difficulty can be adjusted by programming slower or faster movement of the intelligent asteroid(s).   Another example is to create a second spaceship in the field whose purpose will be to shoot down the player’s spaceship. The intelligent spaceship can exhibit similar behaviour to the one described above (“seeking” the spaceship and “avoiding” incoming bullets) and is also susceptible to collisions with the floating asteroids.

Machine Learning   AI can also be integrated into Assignment 1 using machine learning     methods. E.g. the spaceship can learn how to pass the level (without control from the user)     using reinforcement learning to adjust reward-and-punishment costs improved over many     training iterations of the game. To integrate machine learning to your game, follow the links     for jMonkeyEngine: https://wiki.jmonkeyengine.org/docs/3.4/contributions/ai/     jme3_ai.html, Unity3D:https://unity.com/products/machine-learning-agents and     Unreal Engine: https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/ ArtificialIntelligence/.

 

4   Marking scheme

You are required to submit the executable and the code of your implementation, as well as an electronic document describing your design and implementation.  In principle, marking will assess how close your implementation is to your submitted design.

 

4.1    Documentation (40% of the mark)

You are required to submit a 700 to 1 000 words document containing:

1. A short description of the behaviour model of your choice (e.g., FSM, Decision trees, etc.).  You only need to write a couple of paragraphs to show your understanding of how the model works.                                                                                10% of 40%

2. A design description of your Robocode tank bot or AI agent(s).  In your design you should use the chosen behaviour control mechanism. For example, if you choose FSMs to represent bot’s behaviour, give a graphical representation of states, transitions, and conditions under which the machine switches from one state to another. If you choose a tree-based model, give a graphical representation of the tree and clearly indicate tests and actions. Justify your design decisions, in particular, comment on why you believe these design decisions makes your bot more likely win the tournament or why your agent(s) make the gameplay interesting.                                                   20% of 40%

3. A description of your implementation. Explain what classes and methods are used to implement the chosen behaviour model. You are not restricted in HOW you implement the bot (you can hard-code the behaviour in an ad-hoc manner, implement a general scheme, or use a third-party library) but your mark will depend on how closely you follow the design. You are allowed to deviate from the design; however, if your imple- mentation does differ from the design, clearly identify and justify the modifications.

10% of 40%

4.2    Implementation (30% of the mark)

The implementation will be marked as follows:

❼ Providing response to gameplay:  1.  The AI agent responds to gameplay.  OR 2.  the

bot responds to battle events (onScannedRobot, onHitByBullet, onHitWall,. . . )  10% of 30%

❼ Following the design

❼ Clarity and style of code


10% of 30%

10% of 30%


Note for OPTION 1 Submissions   When you create a new robot in the editor use the

following naming convention

Robot name:  Please try to give your robot a unique name.  That could be FirstnameSec- ondname (for example, I would use KonstantinosTsakalidis) without spaces and special characters or a name that is unlikely to be chosen by others, e.g., Crusher15041991.

Please put your full name and student ID as a comment in the beginning of every Java file that you submit.

Package name: use comp222

If you use a dierent package name, your bot might be lost and not make it to the competition.

 

4.3    Runtime evaluation (30% of the mark)

OPTION 1: Robocode Battle Competition   Submitted bots will take part in a tour- nament against 11 other standard bots (to keep the competition fair, this list is not disclosed here, however all submissions will compete against the same bots). At least 10 rounds will be played in a battlefield of default size. In the end, your bot will be ranked by the Robocode Total Score. If it ends in the upper third of the ranking, it will get extra 30%; in the middle third, it will get extra 20%; and in the lower third, it will get extra 10%.

You should make a reasonable effort to modify the default behaviour (bot skeleton in the editor).  Additionally, no robot with code taken from elsewhere  (with or without acknowledging the source) will be allowed in the competition.

 

OPTION 2: Assignment 1 Extension   The behaviour of the AI agent(s) will be assessed

by the level that it achieves:


(i) the described behaviour in the design

(ii) the gradual progression of the gameplay difficulty.


15% of 30%

15% of 30%


5    Deadlines and How to Submit

❼ Deadline for submitting the first assignment is Thursday 5 May 2022, 17:00.

❼ Submission is via Canvas accessible from

https://liverpool.instructure.com/courses/45230/assignments/173634

❼ All submission must contain a report  , the source code  , the  executable and the necessary les

for the runtime execution. In particular:

❼ For BOTH OPTIONS, submit the documentation report in pdf-format.

❼ For OPTION 1, you should submit your bot by exporting it as a jar-le  .  To do so,

choose Robot”!“Package robot for upload” in the Robocode menu. Also, you should submit the java-le that contains your code. No other le is necessary.

❼ For OPTION 2, follow the instructions for Assignment 1.