成a人片国产精品_色悠悠久久综合_国产精品美女久久久久久2018_日韩精品一区二区三区中文精品_欧美亚洲国产一区在线观看网站_中文字幕一区在线_粉嫩一区二区三区在线看_国产亚洲欧洲997久久综合_不卡一区在线观看_亚洲欧美在线aaa_久久99精品国产_欧美卡1卡2卡_国产精品你懂的_日韩精品91亚洲二区在线观看_国内一区二区视频_91丨国产丨九色丨pron

代寫 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人片国产精品_色悠悠久久综合_国产精品美女久久久久久2018_日韩精品一区二区三区中文精品_欧美亚洲国产一区在线观看网站_中文字幕一区在线_粉嫩一区二区三区在线看_国产亚洲欧洲997久久综合_不卡一区在线观看_亚洲欧美在线aaa_久久99精品国产_欧美卡1卡2卡_国产精品你懂的_日韩精品91亚洲二区在线观看_国内一区二区视频_91丨国产丨九色丨pron
    国产一区二区三区在线观看免费| 成人午夜精品在线| 国产综合成人久久大片91| 91丨九色porny丨蝌蚪| 日韩女优av电影在线观看| 樱花草国产18久久久久| 福利一区福利二区| 日韩精品一区二区三区蜜臀 | 精品精品国产高清a毛片牛牛| 亚洲精品亚洲人成人网| 国产成人精品免费网站| 日韩亚洲欧美综合| 午夜在线成人av| 在线观看欧美黄色| 亚洲欧美一区二区三区极速播放 | 99热精品一区二区| 国产丝袜美腿一区二区三区| 欧美bbbbb| 欧美久久婷婷综合色| 玉足女爽爽91| 色综合久久99| 亚洲欧美日韩精品久久久久| 成人国产视频在线观看| 国产午夜亚洲精品理论片色戒| 久久狠狠亚洲综合| 日韩精品一区二区三区老鸭窝| 日日夜夜一区二区| 欧美在线free| 亚洲在线中文字幕| 91激情在线视频| 一区二区在线观看视频| 日本精品一区二区三区高清| 亚洲免费观看在线视频| 91麻豆国产自产在线观看| 亚洲私人黄色宅男| 91亚洲午夜精品久久久久久| 亚洲欧美综合色| 一本大道久久a久久综合| 亚洲蜜臀av乱码久久精品蜜桃| 91丨九色丨黑人外教| 亚洲精品乱码久久久久| 日本韩国欧美在线| 亚洲影院在线观看| 欧美日韩国产在线观看| 天天综合色天天| 91麻豆精品国产无毒不卡在线观看| 天天综合网 天天综合色| 91精品国产综合久久精品图片 | 另类的小说在线视频另类成人小视频在线 | 日本一区二区免费在线| 国产成人一区在线| 国产精品女同一区二区三区| 99精品久久免费看蜜臀剧情介绍| 亚洲欧美国产三级| 欧美亚洲国产bt| 图片区小说区区亚洲影院| 在线播放/欧美激情| 美女网站视频久久| 久久久精品免费网站| 成人精品视频一区二区三区| 中文字幕不卡在线观看| 91在线小视频| 亚洲成人高清在线| 欧美videossexotv100| 粉嫩av亚洲一区二区图片| 日韩一区中文字幕| 欧美日韩一区二区在线观看视频| 热久久免费视频| 久久免费午夜影院| 99久久婷婷国产综合精品电影| 亚洲精品视频自拍| 欧美一区二区三区四区高清| 国内精品伊人久久久久av一坑 | 精品在线观看免费| 国产精品视频看| 91久久线看在观草草青青| 天天综合网天天综合色| 久久综合九色综合欧美98| 成人激情免费视频| 亚洲午夜视频在线观看| 日韩欧美国产一区二区在线播放| 国产风韵犹存在线视精品| 亚洲精品美腿丝袜| 欧美成人精品3d动漫h| 成年人午夜久久久| 偷拍一区二区三区| 国产欧美一区二区精品性色超碰| 色综合久久久久网| 麻豆精品国产91久久久久久| 国产精品亲子乱子伦xxxx裸| 欧美三级三级三级| 国产精品一二三四区| 亚洲综合免费观看高清完整版 | 日韩一区二区免费在线观看| 粉嫩高潮美女一区二区三区| 亚洲一区二区美女| 精品日韩一区二区| 成人黄动漫网站免费app| 亚洲国产综合色| 日韩精品一区二区三区视频播放| 99久久久精品| 丝瓜av网站精品一区二区| 国产亚洲美州欧州综合国| 欧美专区日韩专区| 韩国一区二区视频| 亚洲综合一区二区精品导航| 日韩欧美国产不卡| 91在线码无精品| 日韩电影一区二区三区四区| 日本一区二区动态图| 欧美少妇一区二区| 国产成人在线免费| 日韩在线a电影| 日本一区二区三区四区 | 国产女人18毛片水真多成人如厕 | 成人a区在线观看| 日本欧美一区二区| 中文子幕无线码一区tr| 欧美一区二区三区免费| 色老头久久综合| 国产精品888| 日本免费新一区视频| 亚洲天天做日日做天天谢日日欢 | 69成人精品免费视频| 99精品久久久久久| 国产一区二区三区在线观看精品| 亚洲成人一区二区在线观看| 国产精品午夜在线| 精品国产一区二区三区忘忧草| 欧美性猛片aaaaaaa做受| www..com久久爱| 国精产品一区一区三区mba桃花 | 国产精品另类一区| 日韩亚洲国产中文字幕欧美| 91搞黄在线观看| 成人黄色777网| 国产在线播精品第三| 免费在线欧美视频| 亚洲成a人v欧美综合天堂| 国产精品成人网| 国产欧美精品一区aⅴ影院| 欧美变态tickle挠乳网站| 欧美日韩国产123区| 色哟哟精品一区| 成人va在线观看| 国产成人精品免费| 国内精品伊人久久久久影院对白| 日韩一区精品字幕| 亚洲成人一区二区| 亚洲成va人在线观看| 一区二区三区在线视频播放| 国产精品久久午夜夜伦鲁鲁| 国产欧美一区二区精品久导航| 精品美女一区二区| 日韩欧美激情一区| 日韩精品专区在线影院观看 | 亚洲欧洲日本在线| 日本一区二区三区四区| 久久久久久久久一| 2020国产精品| 久久亚洲精华国产精华液| 欧美成人vr18sexvr| 日韩美女主播在线视频一区二区三区| 欧美日韩亚洲另类| 欧美私模裸体表演在线观看| 色综合 综合色| 色婷婷精品大在线视频| 色哟哟国产精品免费观看| 成人国产免费视频| 成人免费高清视频| 成人动漫一区二区三区| 波多野结衣的一区二区三区| 成人天堂资源www在线| 成人夜色视频网站在线观看| 国产成人综合亚洲91猫咪| 国产精品一区一区三区| 国产精品99久久久久久有的能看| 国产精品一区二区无线| 国产精品一区2区| 国产91精品一区二区麻豆网站 | 91免费国产视频网站| 91视频在线观看免费| 成人爽a毛片一区二区免费| 丁香啪啪综合成人亚洲小说| 国产福利一区二区三区视频| 成人少妇影院yyyy| 91片在线免费观看| 99re8在线精品视频免费播放| 风间由美一区二区三区在线观看| 国产成人av一区| 国产精品夜夜嗨| 成人永久aaa| fc2成人免费人成在线观看播放| av不卡在线播放| 色综合天天综合| 91久久精品午夜一区二区| 国产成人亚洲综合a∨猫咪| 国产成人精品网址| 波多野结衣中文字幕一区二区三区 | 日韩福利电影在线|