久久久久久精品无码人妻_青春草无码精品视频在线观_无码精品国产VA在线观看_国产色无码专区在线观看

代寫 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

    久久久久久精品无码人妻_青春草无码精品视频在线观_无码精品国产VA在线观看_国产色无码专区在线观看

    中文字幕 91| 国产精品h视频| 天天av天天操| 国产精品视频一区二区三区四区五区| 亚洲一区二区福利视频| 午夜免费福利小电影| 一级片免费在线观看视频| 成人免费观看毛片| 91精品一区二区三区四区| 热久久精品免费视频| 黄色一级片在线看| 成年人黄色在线观看| 一区二区三区网址| 阿v天堂2017| 国产精品视频一二三四区| 亚欧激情乱码久久久久久久久| 欧美日韩精品在线一区二区| 桥本有菜av在线| 日本不卡一区二区在线观看| 啊啊啊一区二区| 老司机激情视频| 久久av秘一区二区三区| 一本色道久久亚洲综合精品蜜桃| 国产淫片免费看| 99热亚洲精品| 精品人妻大屁股白浆无码| 日韩成人av免费| 中文av一区二区三区| 中国丰满人妻videoshd| 男女猛烈激情xx00免费视频| 小泽玛利亚av在线| 国产精品中文久久久久久| 三上悠亚在线一区| 欧美特级aaa| 亚洲一区二区三区四区五区xx| 欧美成人一区二区在线观看| 成人黄色大片网站| 国产91沈先生在线播放| 亚洲国产一二三精品无码 | www.99riav| 超碰97免费观看| 亚洲最新免费视频| 毛毛毛毛毛毛毛片123| 不卡的在线视频| 色噜噜狠狠一区二区| 天天综合网日韩| 性生活免费在线观看| 亚洲无吗一区二区三区| 小泽玛利亚视频在线观看| 天堂网在线免费观看| 青青草久久伊人| 夜夜爽久久精品91| 蜜臀av.com| 国产欧美日韩小视频| 精品无码国产一区二区三区av| 国产一二三区在线播放| 日本午夜激情视频| 免费在线观看日韩视频| 五月婷婷之综合激情| 欧美成人福利在线观看| 欧美性受xxxx黒人xyx性爽| 裸体裸乳免费看| 日本精品久久久久久久久久| 日韩免费视频播放| 亚洲一二三区av| 在线免费观看av网| 久久久天堂国产精品| 日本精品久久久久久久久久| 免费在线观看亚洲视频| 人人爽人人av| 国内av免费观看| 九九爱精品视频| 久久久久久久少妇| 三级性生活视频| 国产女主播av| www一区二区www免费| 亚洲五月天综合| 欧美一级免费在线观看| 成人黄色av片| 午夜免费看视频| 久久综合久久久久| 少妇高清精品毛片在线视频| 57pao国产成永久免费视频| 老司机激情视频| 欧美日韩大尺度| 手机成人av在线| 亚洲欧洲日产国码无码久久99 | 国产精品久久久影院| 妞干网在线视频观看| 欧美大尺度做爰床戏| 强开小嫩苞一区二区三区网站| 欧美日韩成人免费视频| 日韩av.com| 成人午夜精品久久久久久久蜜臀| 天天操天天摸天天爽| 奇米777四色影视在线看| 99草草国产熟女视频在线| 樱空桃在线播放| 亚洲成熟丰满熟妇高潮xxxxx| 亚洲精品mv在线观看| 久久久亚洲精品无码| 亚洲免费在线播放视频| 免费无码不卡视频在线观看| 久久精品国产99久久99久久久| 国产一二三在线视频| 在线观看免费av网址| 欧美日韩精品在线一区二区| 亚洲爆乳无码精品aaa片蜜桃| 做爰高潮hd色即是空| 日本不卡在线观看视频| 日韩第一页在线观看| 国产成人综合一区| 日韩精品一区二区在线视频| 久久久久久久久久久久91| 久久亚洲中文字幕无码| 欧美精品一区二区性色a+v| 国产免费视频传媒| 日本在线xxx| www国产免费| 想看黄色一级片| 欧洲熟妇精品视频| 欧美一区二区中文字幕| 女性隐私黄www网站视频| 男人的天堂avav| 国产一级片中文字幕| 日韩一级免费在线观看| 久久手机在线视频| 亚洲一区二区偷拍| 国产福利影院在线观看| 国产原创中文在线观看| 日本aa在线观看| 亚洲综合20p| 中文字幕第17页| 性欧美videossex精品| 国产极品在线视频| 国产片侵犯亲女视频播放| 特黄特黄一级片| 91 视频免费观看| 国产一伦一伦一伦| 天天色综合天天色| 日韩中文字幕免费在线| 日日鲁鲁鲁夜夜爽爽狠狠视频97| 亚洲精品蜜桃久久久久久| 超碰超碰超碰超碰超碰| 国产日产欧美一区二区| 国产精品igao网网址不卡| 久久久久久久久久久久久久久国产| 亚洲欧美另类动漫| 免费观看成人网| 亚洲熟妇av一区二区三区| 国产精品无码一区二区在线| 蜜臀av无码一区二区三区| 无码熟妇人妻av在线电影| 91网站在线观看免费| 天天想你在线观看完整版电影免费| 国产精品999.| 欧美日韩一级在线| 秋霞在线一区二区| 小泽玛利亚av在线| 日本香蕉视频在线观看| 福利视频一区二区三区四区| 日韩伦理在线免费观看| koreanbj精品视频一区| 免费在线激情视频| 久久久久久久少妇| 九色91popny| 国产又黄又猛的视频| 亚洲av毛片在线观看| 麻豆传媒网站在线观看| 国产 欧美 日本| 欧美亚洲日本一区二区三区| 亚洲自偷自拍熟女另类| 国产视频一区二区视频| 手机在线成人免费视频| 五月六月丁香婷婷| 看全色黄大色大片| 精品视频在线观看一区| aaa毛片在线观看| 色免费在线视频| 国产又粗又猛大又黄又爽| 国产乱人伦精品一区二区三区| 亚洲理论电影在线观看| 日本免费黄视频| 日韩不卡一二三| 精品国产三级a∨在线| www.好吊操| 亚洲人成无码www久久久| 在线观看免费视频高清游戏推荐| 中文字幕第66页| 91精品国产91久久久久麻豆 主演| 国产综合av在线| 色噜噜狠狠永久免费| 亚洲五码在线观看视频| 免费黄色日本网站| 国产探花在线看| avav在线播放| 日本久久久久久久久久久久| 欧美与动交zoz0z| 国产97在线 | 亚洲| 一级黄色特级片|