狠狠综合久久久久综合网址-a毛片网站-欧美啊v在线观看-中文字幕久久熟女人妻av免费-无码av一区二区三区不卡-亚洲综合av色婷婷五月蜜臀-夜夜操天天摸-a级在线免费观看-三上悠亚91-国产丰满乱子伦无码专区-视频一区中文字幕-黑人大战欲求不满人妻-精品亚洲国产成人蜜臀av-男人你懂得-97超碰人人爽-五月丁香六月综合缴情在线

代寫 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)-大理旅游
    油炸竹蟲
    油炸竹蟲
    酸筍煮魚(雞)
    酸筍煮魚(雞)
    竹筒飯
    竹筒飯
    香茅草烤魚
    香茅草烤魚
    檸檬烤魚
    檸檬烤魚
    昆明西山國家級風景名勝區
    昆明西山國家級風景名勝區
    昆明旅游索道攻略
    昆明旅游索道攻略
  • NBA直播 短信驗證碼平臺 幣安官網下載 歐冠直播 WPS下載

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

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

    狠狠综合久久久久综合网址-a毛片网站-欧美啊v在线观看-中文字幕久久熟女人妻av免费-无码av一区二区三区不卡-亚洲综合av色婷婷五月蜜臀-夜夜操天天摸-a级在线免费观看-三上悠亚91-国产丰满乱子伦无码专区-视频一区中文字幕-黑人大战欲求不满人妻-精品亚洲国产成人蜜臀av-男人你懂得-97超碰人人爽-五月丁香六月综合缴情在线
  • <dl id="akume"></dl>
  • <noscript id="akume"><object id="akume"></object></noscript>
  • <nav id="akume"><dl id="akume"></dl></nav>
  • <rt id="akume"></rt>
    <dl id="akume"><acronym id="akume"></acronym></dl><dl id="akume"><xmp id="akume"></xmp></dl>
    男人日女人bb视频| 久久久噜噜噜www成人网| 岛国毛片在线播放| 日韩欧美中文在线视频| 三上悠亚免费在线观看| 国产极品尤物在线| 色综合色综合色综合色综合| 欧美成人乱码一二三四区免费| 日韩人妻一区二区三区蜜桃视频| 少妇人妻互换不带套| 国产精品视频网站在线观看| www日韩在线观看| 999久久欧美人妻一区二区| 99久久激情视频| 欧美老熟妇喷水| 日韩av在线综合| 91香蕉国产线在线观看| 午夜一级免费视频| 99热都是精品| 免费超爽大片黄| 欧美精品aaaa| 亚洲国产精品成人天堂| 91视频免费版污| 最新免费av网址| 99中文字幕在线观看| 国产av人人夜夜澡人人爽麻豆| 欧美日韩一级在线| 成人免费观看毛片| 午夜福利123| 亚洲熟妇av日韩熟妇在线| 精品国产成人av在线免| 四季av一区二区三区| 蜜臀av性久久久久蜜臀av| 国产精品沙发午睡系列| 91热视频在线观看| 国产成人黄色片| www.国产在线播放| 天堂网成人在线| 国产成人精品无码播放| 女人床在线观看| 大桥未久一区二区| 国内自拍第二页| 亚洲欧美日韩综合网| 美女扒开大腿让男人桶| 三级av免费看| 一级黄色片国产| 免费av不卡在线| 日本中文字幕影院| 尤物网站在线看| 成人av在线不卡| 99精品999| 国产亚洲综合视频| 男人天堂成人网| 亚洲免费成人在线视频| 国产91xxx| 欧美,日韩,国产在线| 青青草国产精品视频| 国产深夜男女无套内射| 91网址在线播放| 国产成人无码一二三区视频| 日韩中文字幕a| 7777在线视频| 不卡影院一区二区| 秋霞无码一区二区| 亚洲理论电影在线观看| 午夜大片在线观看| 国产无套内射久久久国产| 亚洲 国产 图片| 日本www在线播放| www.69av| 欧美图片激情小说| 香蕉视频在线网址| 天天综合网久久| 激情五月亚洲色图| 精品久久久久久久无码| avav在线看| 亚洲欧美久久久久| 亚洲一区二区福利视频| 激情图片中文字幕| 91免费国产精品| 18禁网站免费无遮挡无码中文 | 亚洲天堂网站在线| 色片在线免费观看| 老子影院午夜伦不卡大全| 天美星空大象mv在线观看视频| 国产又粗又长又大的视频| 日本熟妇人妻中出| 欧美成人高潮一二区在线看| 欧美大片在线播放| www..com日韩| 国产av第一区| 青青草原成人网| 国产日韩av网站| 超碰在线97免费| 久久婷婷综合色| 亚洲涩涩在线观看| 欧美一级视频免费看| 熟女人妇 成熟妇女系列视频| 农村妇女精品一二区| 日本黄色的视频| 99re在线视频免费观看| 欧美在线观看黄| 免费看污黄网站| 国产91在线视频观看| 亚洲爆乳无码精品aaa片蜜桃| 精品久久久久av| 国产女主播自拍| 91免费版看片| 久久久久久久久影视| 污色网站在线观看| 国产xxxxhd| 免费av不卡在线| 爱豆国产剧免费观看大全剧苏畅 | 91人人澡人人爽人人精品| 一级全黄肉体裸体全过程| 男女视频一区二区三区| 警花观音坐莲激情销魂小说| 三级在线免费观看| 97在线国产视频| 欧美国产日韩激情| 日韩av综合在线观看| 可以在线看的av网站| 老司机午夜av| 手机成人av在线| 无限资源日本好片| 日韩av在线综合| 日韩成人手机在线| 亚洲熟妇无码一区二区三区导航| 国产一级片自拍| 亚洲无吗一区二区三区| 男人日女人视频网站| 国产成人在线小视频| 日韩欧美视频免费在线观看| 久久精品一卡二卡| 日本wwwcom| www.18av.com| 国产情侣第一页| 欧美aⅴ在线观看| 杨幂毛片午夜性生毛片| av在线免费看片| 日本国产中文字幕| 三级4级全黄60分钟| 亚洲一级免费观看| 四虎1515hh.com| av在线com| 日本中文字幕亚洲| 国产又大又硬又粗| 国产在线观看中文字幕| 激情成人开心网| 午夜国产一区二区三区| 中文字幕精品在线播放| 欧美久久在线观看| 五月花丁香婷婷| 老司机激情视频| 五月天婷婷影视| 国产成人无码av在线播放dvd| 97国产在线播放| 国产真实乱子伦| av免费观看国产| 真实国产乱子伦对白视频| 极品粉嫩美女露脸啪啪| 日本中文字幕高清| 黑鬼大战白妞高潮喷白浆| 8x8x华人在线| 国产视频在线观看网站| 三年中文高清在线观看第6集| 中文字幕在线观看第三页| 国产黄色一级网站| 少妇av一区二区三区无码| 特级西西444| 九九九九九国产| 天天爽人人爽夜夜爽| aⅴ在线免费观看| 国产成人精品视频免费看| 欧美亚洲日本一区二区三区 | 亚洲精品国产一区二区三区| 国产视频一区二区视频| 免费不卡av网站| 国产www免费| 精品国产鲁一鲁一区二区三区| 99日在线视频| 成人午夜精品久久久久久久蜜臀| 丰满少妇被猛烈进入高清播放| 日韩av片免费观看| 天美星空大象mv在线观看视频| 欧美少妇一区二区三区| 日本在线观看免费视频| www.四虎成人| 免费看国产一级片| 国产黄色激情视频| 2025韩国大尺度电影| 成人观看免费完整观看| 国产高清www| 成人在线播放网址| 欧美日韩成人免费视频| 无码人妻精品一区二区蜜桃网站| 国产又粗又长又爽又黄的视频| 日本男人操女人| 天美星空大象mv在线观看视频| 日韩av综合在线观看|