爱情鸟第一论坛com高清免费_91免费精品国自产拍在线可以看_亚洲一区精品中文字幕_男人操心女人的视频

代寫 CPT204 Intelligent Rogue Chars

時間:2024-05-30  來源:  作者: 我要糾錯



Coursework 3 – Intelligent Rogue Chars 
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 decisionmaking
 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. 
 
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. 
 
Rogue 
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. 
 
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. 
 3 
 
Rules of the Game 
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. 
 
There are three types of sites: 
1. Rooms represented by . 
2. Corridors represented by + 
3. Walls represented by (a space) 
 
The movement rules are: 
 If a player is in a room site, then they can move to an adjacent room site in one 
of the 8 compass directions (N, E, S, W, NW, NE, SW, SE) or a corridor site in 
one of the 4 directions (N, E, S, W). 
 If a player is in a corridor site, then they can move to an adjacent room or 
corridor site in one of the 4 directions (N, E, S, W). 
 The walls are impenetrable. 
 
Consider the following two dungeons. 
 
In the first dungeon above, the rogue can avoid the monster I indefinitely by moving 
N and running around the corridor. 
 
In the second dungeon, the monster A can use the diagonal moves to trap the rogue 
in a corner. 4 
 
Monster's Strategy 
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. 
 
Consider the following two dungeons. 
 
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. 
 
In the second dungeon, the monster C can guarantee to intercept the rogue by first 
moving E. 
 
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. 
 
Rogue's Strategy 
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. 
 
Consider the following two dungeons. 
 
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 J by moving SE. 
 
Another potentially deadly strategy would be to go to the nearest corridor. To avoid 
the monster F in the first dungeon, the rogue must move towards a northern corridor 
instead. 
 
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. 
 
Implementation and Specification 
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. 
 
Dungeon File Input Format 
The input dungeon consists of an integer N, followed by N rows of 2N characters 
each. For example: 
 
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. 
 
Game of Rogue Specification 
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! 7 
 
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 
 
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 
 
The move() method should implement the move of the monster/rogue as specified 
by the strategy that you have created. 
 
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. 
public Site getMonsterSite() // return site occupied by monster 
public Site getRogueSite() // return site occupied by rogue 
public Dungeon getDungeon() // return the dungeon 
 
Dungeon.java represents an N-by-N dungeon. 
public boolean isLegalMove(Site v, Site w) // is moving from site v 
 to w legal? 
public boolean isCorridor(Site v) // is site v a corridor site? 
public boolean isRoom(Site v) // is site v a room site? 
public int size() // 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. 
 
Site.java is a data type that represents a location site in the N-by-N dungeon. 
public Site(int i, int j) // create new Site for location (i, j) 
public int i() // get i coordinate 
public int j() // get j coordinate 
public int manhattan(Site w) // return Manhattan distance 
 from invoking site to w 
public boolean equals(Site 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 |i1 - i2| + |j1 - j2|. This represents the length you 
have to travel, assuming you can only move horizontally and vertically. 
 
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. 

請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp
















 

標簽:

掃一掃在手機打開當前頁
  • 上一篇:INFS 2042代做、代寫 Java 編程設計
  • 下一篇:代做UIC's finance office.、代寫java編程語言
  • 無相關信息
    昆明生活資訊

    昆明圖文信息
    蝴蝶泉(4A)-大理旅游
    蝴蝶泉(4A)-大理旅游
    油炸竹蟲
    油炸竹蟲
    酸筍煮魚(雞)
    酸筍煮魚(雞)
    竹筒飯
    竹筒飯
    香茅草烤魚
    香茅草烤魚
    檸檬烤魚
    檸檬烤魚
    昆明西山國家級風景名勝區
    昆明西山國家級風景名勝區
    昆明旅游索道攻略
    昆明旅游索道攻略
  • 短信驗證碼平臺 理財 WPS下載

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 kmw.cc Inc. All Rights Reserved. 昆明網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    爱情鸟第一论坛com高清免费_91免费精品国自产拍在线可以看_亚洲一区精品中文字幕_男人操心女人的视频
    <strike id="bfrlb"></strike><form id="bfrlb"><form id="bfrlb"><nobr id="bfrlb"></nobr></form></form>

        <sub id="bfrlb"><listing id="bfrlb"><menuitem id="bfrlb"></menuitem></listing></sub>

          <form id="bfrlb"></form>

            <form id="bfrlb"></form>

              <address id="bfrlb"></address>

              <address id="bfrlb"></address>
              国内精品久久久久久| 91久久国产自产拍夜夜嗨| 国产精品激情av在线播放| 国产精品久久久久久久久久免费看| 国产日韩精品综合网站| 亚洲精品久久嫩草网站秘色| 国产综合色产在线精品| 免费日韩av电影| 99视频精品在线| 久久成人18免费观看| 国产一二三精品| 欧美精品一区二区久久婷婷| 99视频精品全部免费在线| 欧美一级淫片播放口| 国产精品豆花视频| 午夜精品一区二区在线观看| 这里只有视频精品| 99人久久精品视频最新地址| 亚洲午夜av电影| av成人黄色| 在线欧美亚洲| 亚洲午夜激情网站| 久久久精品tv| aaa亚洲精品一二三区| 亚洲视频一区二区免费在线观看| 亚洲欧洲日本mm| 91久久精品久久国产性色也91| 欧美成人免费播放| 久久成人久久爱| 亚洲国产精品综合| 国产亚洲精品一区二555| 亚洲欧美自拍偷拍| 欧美在线观看网站| 欧美一区二区三区视频在线观看| 亚洲高清在线观看一区| 国产日韩av在线播放| 可以看av的网站久久看| 在线观看欧美日本| 麻豆成人在线播放| 欧美日韩免费精品| 亚洲在线一区二区| 欧美日韩情趣电影| 久久精品国产亚洲一区二区三区| 狠狠色丁香久久婷婷综合_中| 欧美日韩1区| 久久久999精品视频| 欧美大片免费观看在线观看网站推荐| 欧美激情一区二区三区全黄| 美女视频黄免费的久久| 午夜精品影院在线观看| 国产精品超碰97尤物18| 一区二区三区在线看| 久久久精品国产一区二区三区| 一区二区三区国产精华| 欧美激情第3页| 亚洲精品人人| 黑丝一区二区| 久久婷婷亚洲| 国产精品久久一区主播| 激情视频一区二区三区| 午夜国产精品视频免费体验区| 好看不卡的中文字幕| 欧美色播在线播放| 一区二区三区日韩| 亚洲精品中文字幕女同| 99视频一区二区| 樱桃成人精品视频在线播放| 黄色成人91| 激情久久久久久久久久久久久久久久| 久久久久九九九| 亚洲午夜一二三区视频| 欧美凹凸一区二区三区视频| 国产精品女主播| 国产精品青草综合久久久久99| 韩国av一区二区三区| 国产精品影视天天线| 亚洲另类在线视频| 久久精品国产第一区二区三区| 欧美视频一区二区三区| 国产精品国码视频| 免费成人av在线| 亚洲影院色无极综合| 日韩西西人体444www| 麻豆久久久9性大片| 久久久久久999| 性娇小13――14欧美| 欧美在线观看视频一区二区| 黄色成人精品网站| 久久综合免费视频影院| 国产精品一区二区男女羞羞无遮挡| 国产精品一区二区视频| 国产精一区二区三区| 免费在线观看日韩欧美| 影音先锋日韩有码| 亚洲精品中文字幕有码专区| 一区二区三区欧美| 亚洲福利电影| 亚洲福利小视频| 国产视频一区在线| 亚洲欧洲日产国产网站| 亚洲免费观看高清完整版在线观看| 一区二区三区免费在线观看| 午夜日本精品| 国产一区二区三区直播精品电影| 欧美日韩一区在线观看| 久久久午夜视频| 午夜精品短视频| 亚洲午夜免费视频| 一本色道**综合亚洲精品蜜桃冫| 国产伊人精品| 狠狠狠色丁香婷婷综合久久五月| 欧美日韩一区二区三区视频| 亚洲欧洲一区二区三区久久| 久久动漫亚洲| 久久免费精品日本久久中文字幕| 亚洲精品中文字幕在线观看| 最新国产成人av网站网址麻豆| 最新热久久免费视频| 国产一区二区三区四区五区美女| 在线看国产一区| 欧美成人xxx| 日韩视频在线观看国产| 新狼窝色av性久久久久久| 亚洲精品四区| 精品91免费| 国产一区二区0| 国内精品模特av私拍在线观看| 韩日精品中文字幕| 亚欧成人在线| 国产乱码精品一区二区三区av| 亚洲一区中文字幕在线观看| 亚洲欧美韩国| 女女同性女同一区二区三区91| 欧美日韩成人免费| 亚洲已满18点击进入久久| 日韩视频免费观看高清完整版| 久久久999成人| 国产精品久久亚洲7777| 亚洲综合日韩中文字幕v在线| 国产一区二区成人久久免费影院| 国产偷国产偷亚洲高清97cao| 国产精品久久久免费| 久久久www成人免费毛片麻豆| 国产麻豆精品theporn| 亚洲人精品午夜在线观看| 亚洲制服av| 国产精品人成在线观看免费| 一色屋精品亚洲香蕉网站| 一本色道久久综合狠狠躁篇怎么玩| 欧美在线亚洲| 欧美国产日韩二区| 国产一区在线观看视频| 六月丁香综合| 麻豆精品视频在线| 国产一级久久| 亚洲欧洲精品一区二区| 国产综合精品| 日韩午夜剧场| 韩国av一区| 欧美精品久久久久久| 欧美三级午夜理伦三级中文幕| 久久影院午夜论| 亚洲视频一区在线观看| 极品av少妇一区二区| 精品91久久久久| 激情综合久久| 亚洲国产小视频在线观看| 亚洲精选一区二区| 亚洲一区二区三区免费在线观看| 欧美日韩高清在线观看| 伊人色综合久久天天五月婷| 亚洲国产清纯| 久久午夜电影| 亚洲天堂av图片| 欧美成人免费视频| 韩国精品久久久999| 亚洲精品一区二区在线| 欧美国产日本韩| 亚洲日本中文字幕| 国产精品久久久久久久久久直播| 亚洲毛片av在线| 久久激情婷婷| 久久嫩草精品久久久精品| 国产精品一区在线观看你懂的| 亚洲三级免费电影| 国产一区香蕉久久| 亚洲欧美不卡| 国产精品男女猛烈高潮激情| 亚洲欧美日韩国产一区| 香蕉久久a毛片| 久久男人av资源网站| 亚洲激情成人| 美女999久久久精品视频| 久久精品一级爱片| 亚洲综合国产激情另类一区| 美女精品一区| 好看不卡的中文字幕| 蜜乳av另类精品一区二区| 在线亚洲激情| 欧美日韩高清在线观看|