1. Homepage
  2. Programming
  3. CPT204 Advanced OO Programming Coursework 3 Intelligent Rogue Chars

CPT204 Advanced OO Programming Coursework 3 Intelligent Rogue Chars

Engage in a Conversation
XJTLUCPT204Advanced OO ProgrammingIntelligent Rogue CharsJava

CPT204-2324 Coursework 3 Task Sheet Overview CourseNana.COM

Coursework 3 (CW3) is the final coursework component of the course this semester. It contributes to 40% of your final marks. CourseNana.COM

You will form a team of two with your friend and apply object-oriented principles and advanced data structures you have learned throughout the semester to create intelligent game-playing characters. You will be tasked with writing a report and creating a video presentation to demonstrate your problem-solving and testing skills, as well as your understanding of object-oriented concepts. CourseNana.COM

You are required to submit the following files: Java codes in a ZIP file, a Word and PDF report, an MP4 video, and a PowerPoint (PPT) presentation used in the video. CourseNana.COM

Coursework 3 – Intelligent Rogue Chars CourseNana.COM

Intelligent game-playing characters have been used in the game industry to harness the power of graph algorithms to navigate complex virtual environments, strategically analyzing interconnected nodes and edges to optimize their movements and decision- making processes. By leveraging graph traversal techniques such as breadth-first search (BFS) and depth-first search (DFS), these characters can efficiently explore vast game worlds, identify optimal paths, and anticipate opponent movements. CourseNana.COM

In this coursework, you will use graph algorithms you have learned in Lecture 10 to develop an effective approach to track and intercept a moving opponent in a (simplified version of the) 2D Game called Rogue. You will also create a viable plan to evade interception from said opponent. CourseNana.COM

Rogue CourseNana.COM

The game Rogue was created by Michael Toy and Glen Wichman, who, while experimenting with Ken Arnold's C library named curses in the late 1970s, designed a graphical adventure game shown below. CourseNana.COM

In 1984, CMU graduate students developed Rog-o-matic, an automated Rogue player, which became the highest-rated player. Rog-o-matic's algorithm prioritized avoiding monster encounters to facilitate health regeneration, posing an intriguing graph search challenge, which inspired this coursework. CourseNana.COM

Rules of the Game CourseNana.COM

The game of Rogue is played on an N-by-N grid that represents the dungeon. The two players are a rogue and a monster. The rogue is represented with the character @. The monster is represented by an uppercase letter A through Z.
The monster and rogue take turns making moves, with the monster going 
first. If the monster intercepts the rogue (i.e., occupies the same site), then the monster kills the rogue, and the game ends. In each turn, a player either remains stationary or moves to an adjacent site. CourseNana.COM

There are three types of sites: CourseNana.COM

  1. Rooms represented by . CourseNana.COM

  2. Corridors represented by + CourseNana.COM

  3. Walls represented by (a space) CourseNana.COM

The movement rules are: CourseNana.COM

  •   If a player is in a room site, then they can move to an adjacent room site in one CourseNana.COM

    of the 8 compass directions (N, E, S, W, NW, NE, SW, SE) or a corridor site in CourseNana.COM

    one of the 4 directions (N, E, S, W). CourseNana.COM

  •   If a player is in a corridor site, then they can move to an adjacent room or CourseNana.COM

    corridor site in one of the 4 directions (N, E, S, W). CourseNana.COM

  •   The walls are impenetrable. CourseNana.COM

Consider the following two dungeons. CourseNana.COM

+++++ CourseNana.COM

+ + ........ + .....@.. + ..I..... + ........ + ........ + + + + + +++++ CourseNana.COM

........A. .......... .......... .......... ....@..... .......... .......... .......... .......... .......... CourseNana.COM

In the first dungeon above, the rogue can avoid the monster indefinitely by moving N and running around the corridor. CourseNana.COM

In the second dungeon, the monster can use the diagonal moves to trap the rogue in a corner. CourseNana.COM

Monster's Strategy CourseNana.COM

The monster is tenacious and its sole mission is to chase and intercept the rogue. A natural strategy for the monster is to always take one step toward the rogue. In terms of the underlying graph, this means that the monster should compute a shortest path between itself and the rogue, and take one step along such a path. This strategy is not necessarily optimal, since there may be ties, and taking a step along one shortest path may be better than taking a step along another shortest path. CourseNana.COM

Consider the following two dungeons. CourseNana.COM

++++++++ +++++ ++++ CourseNana.COM

....... +
....... +
....@.. +
..B.... +
....... +
....... +++++

In the first dungeon above, monster B's only optimal strategy is to take a step in the NE direction. Moving N or E would enable the rogue to make a mad dash for the opposite corridor entrance. CourseNana.COM

In the second dungeon, the monster can guarantee to intercept the rogue by first moving E. CourseNana.COM

Your first task is to implement an effective strategy for the monster. To implement the monster's strategy, you may want to consider using BFS. CourseNana.COM

........ + ........ + ..C..@.. + ........ + ........ + CourseNana.COM

Rogue's Strategy CourseNana.COM

The rogue's goal is to avoid the monster for as long as possible. A naive strategy is to move to an adjacent site that is as far as possible from the monster's current location. That strategy is not necessarily optimal. CourseNana.COM

Consider the following two dungeons. CourseNana.COM

+++ ++ +++ CourseNana.COM

.... ....+++++ @...+ + ....+++++ ...F

....... ....... .....@. .......+++ ....... + .......+++ ......J ....... ....... ....... CourseNana.COM

It is easy to see that that strategy may lead to a quick and unnecessary death, as in the second dungeon above where the rogue can avoid the monster by moving SE. CourseNana.COM

Another potentially deadly strategy would be to go to the nearest corridor. To avoid the monster in the first dungeon, the rogue must move towards a northern corridor instead. CourseNana.COM

A more effective strategy is to identify a sequence of adjacent corridor and room sites which the rogue can run around in circles forever, thereby avoiding the monster indefinitely. This involves identifying and following certain cycles in the underlying graph. Of course, such cycles may not always exist, in which case your goal is to survive for as long as possible. To implement the rogue's strategy, you may want to use both BFS and DFS. CourseNana.COM

Implementation and Specification CourseNana.COM

In this section, you will discover the expected details regarding the implementation and specifications of the Rogue game, which you are required to adhere to. CourseNana.COM

Dungeon File Input Format CourseNana.COM

The input dungeon consists of an integer N, followed by N rows of 2N characters each. For example: CourseNana.COM


++ ....... + ....... + ....@.. + ..B.... + ....... + .......+++ ....... ....... CourseNana.COM

A room is a contiguous rectangular block of room sites. Rooms may not connect directly with each other. That is, any path from one room to another will use at least one corridor site.
There will be exactly one monster and one rogue, and each will start in some room site.

You will be given 18 dungeon files to test your code with.
You may create your own dungeon files (explain the novelty in your report/video!). In the rubric subsection below, you are required to show the correctness and the performance of your rogue and monster on 
at least 5 non-trivial dungeons in total. CourseNana.COM

Game of Rogue Specification CourseNana.COM

We will provide some files that are already completed as the game infrastructure. There are two files to complete: Monster.java and Rogue.java, for which some skeleton code is provided.
The given files are only for a quick start: you should modify the files so your program exhibits more object-oriented programming principles! CourseNana.COM

The following is the interface of Monster.java :
public Monster(Game g) // create a new monster playing game g public Site move() // return adjacent site to which it moves CourseNana.COM

And the analogous program Rogue.java:
public Rogue(Game g) // create a new rogue playing a game g public Site move() // return adjacent site to which it moves CourseNana.COM

The move() method should implement the move of the monster/rogue as specified by the strategy that you have created. CourseNana.COM

Game.java reads in the dungeon from standard input and does the game playing and refereeing. It has three primary interface functions that will be needed by Rogue.java and Monster.java. CourseNana.COM

public Site getMonsterSite()
public Site getRogueSite()
public Dungeon getDungeon()
// return site occupied by monster
// return site occupied by rogue
// return the dungeon

Dungeon.java represents an N-by-N dungeon.
public boolean isLegalMove(Site v, Site w) // is moving from site v CourseNana.COM

public boolean isCorridor(Site v)
public boolean isRoom(Site v)
public int size()
        to w legal?
// is site v a corridor site?
// is site v a room site?
// return N = dim of dungeon

In.java is a library from Algorithms optional textbook to read in data from various sources. You will have to create your own input library for your CW3 program. CourseNana.COM

Site.java is a data type that represents a location site in the N-by-N dungeon. CourseNana.COM

public Site(int i, int j)
public int i()
public int j()
public int manhattan(Site w)
public boolean equals(Site w)
// create new Site for location (i, j)
       // get i coordinate
       // get j coordinate
       // return Manhattan distance
          from invoking site to w
       // is invoking site equal to w?

If you have two sites located at coordinates (i1, j1) and (i2, j2), then the Manhattan distance between the two sites is |i- i2| + |j- j2|. This represents the length you have to travel, assuming you can only move horizontally and vertically. CourseNana.COM

You should modify the files or create other Java files, so your final program exhibits more object-oriented programming principles. Finally, you must only use libraries that are covered in CPT204 (including in Liang textbook). Violating this by using libraries that are not covered in CPT204 will result in an automatic total mark of 0. CourseNana.COM

Deliverables CourseNana.COM

In this section, you will find the details regarding the files that you are required to submit, and the report and video specifications. CourseNana.COM

Submission Requirements CourseNana.COM

You are required to submit: CourseNana.COM

  1. 1)  The Rogue.java and Monster.java source code Java files, as well as any other CourseNana.COM

    auxiliary Java files and the dungeon files that you selected/created in your project, CourseNana.COM

    altogether combined in a ZIP file. CourseNana.COM

  2. 2)  Your report, in both Word and PDF format (2 separate files). CourseNana.COM

  3. 3)  The PPT of your video presentation. CourseNana.COM

  4. 4)  The video recording of your presentation in a MP4 file. CourseNana.COM

The submission deadline is Sunday, May 26, 2024, at 23:59 CST. CourseNana.COM

You may submit late, with a maximum grace period of 5 days, during which a 5% lateness penalty will be applied for each late day. Therefore, after Friday, May 31, 2024, at 23:59 CST, no submissions will be accepted. CourseNana.COM

Report Requirements CourseNana.COM

Write a report satisfying the following criteria: CourseNana.COM

  1. The purpose of your report is to explain your code, algorithms, algorithm CourseNana.COM

    analysis, and OOP elements in well-detailed manner. CourseNana.COM

  2. Your report must consist of exactly 6 Chapters: CourseNana.COM

    Chapter 1 – Object-oriented Principles CourseNana.COM

    (you may add subchapters here) CourseNana.COM

    Chapter 2 – Monster Algorithm
    Chapter 3 
    – Rogue Algorithm
    Chapter 4 
    – Monster Algorithm Analysis
    Chapter 5 
    – Rogue Algorithm Analysis
    Chapter 6 
    – My Java Code
    For more details on the contents of each section, you should refer to the Rubric on page 11. CourseNana.COM

  1. You must include all your code in Chapter 6 as a text, copy paste each source file content into the report.
    You must 
    not use screenshots in Chapter 6.
    Using screenshot in Chapter 6 will result in 
    an automatic total marks of 0. (you may use screenshot in other chapters) CourseNana.COM

  2. Write your report using Word with the following setting:
    Calibri, Font Size 12, Line Spacing 1.5, Normal Margins.
    The page limit is a maximum of 
    20 pagesnot including Chapter 6. CourseNana.COM

  3. Consider using images and diagrams to improve the readability of your report. Please refer to the rubric in the following subsection. CourseNana.COM

  4. Save your Word document as a PDF.
    Submit to Learning Mall Assignment Box 
    both the Word document file and the PDF file. CourseNana.COM

Video Requirements CourseNana.COM

Create a PPT presentation and video explanation using the PPT satisfying the following requirements: CourseNana.COM

  1. The purpose of your video presentation is to explain your code, algorithms, and OOP design in a succinct manner. CourseNana.COM

  2. You can use any template for your PPT, not limited to the XJLTU standard theme. CourseNana.COM

  3. The length of the video must be less than or equal to 8 minutes.
    Violating the video length requirements will result in 
    a total marks of 0 for your coursework mark. CourseNana.COM

  4. Your video must display your face and include your audio for the purpose of authenticity verification.
    not use English audio translation software to narrate your video. Violating the requirement to show your face and use your voice will result in a total marks of 0 for your coursework. CourseNana.COM

  5. The clarity of the presentation will be graded. Please refer to the rubric in the next subsection. CourseNana.COM

6. Submit to Learning Mall Assignment Box both: CourseNana.COM

  1. The video file in MP4 format, CourseNana.COM

  2. The PPT file you used to create a video. CourseNana.COM

Equal Contribution Requirements CourseNana.COM

In adherence to academic integrity and fairness, it is imperative that both team members contribute equally to the completion of the coursework: CourseNana.COM

  1. Each member should actively participate in the development process, ensuring a balanced distribution of workload and responsibilities.
    For example, one team member may mostly undertake the coding of the rogue character while the other focuses on the monster character, and they may divide tasks such as testing, documentation, report writing, and presentation preparation equitably.

  2. Both team members must show their faces in the video, one at a time. CourseNana.COM

  3. Should there be any concerns regarding unequal contributions, team CourseNana.COM

    members are encouraged to notify the module leader promptly to facilitate appropriate assessment and marking decisions, to ensure transparency and accountability. CourseNana.COM

Get in Touch with Our Experts

WeChat WeChat
Whatsapp WhatsApp
XJTLU代写,CPT204代写,Advanced OO Programming代写,Intelligent Rogue Chars代写,Java代写,XJTLU代编,CPT204代编,Advanced OO Programming代编,Intelligent Rogue Chars代编,Java代编,XJTLU代考,CPT204代考,Advanced OO Programming代考,Intelligent Rogue Chars代考,Java代考,XJTLUhelp,CPT204help,Advanced OO Programminghelp,Intelligent Rogue Charshelp,Javahelp,XJTLU作业代写,CPT204作业代写,Advanced OO Programming作业代写,Intelligent Rogue Chars作业代写,Java作业代写,XJTLU编程代写,CPT204编程代写,Advanced OO Programming编程代写,Intelligent Rogue Chars编程代写,Java编程代写,XJTLUprogramming help,CPT204programming help,Advanced OO Programmingprogramming help,Intelligent Rogue Charsprogramming help,Javaprogramming help,XJTLUassignment help,CPT204assignment help,Advanced OO Programmingassignment help,Intelligent Rogue Charsassignment help,Javaassignment help,XJTLUsolution,CPT204solution,Advanced OO Programmingsolution,Intelligent Rogue Charssolution,Javasolution,