日本欧洲视频一区_国模极品一区二区三区_国产熟女一区二区三区五月婷_亚洲AV成人精品日韩一区18p

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

    日本欧洲视频一区_国模极品一区二区三区_国产熟女一区二区三区五月婷_亚洲AV成人精品日韩一区18p

              9000px;">

                        国产中文一区二区三区| 国产日韩欧美精品电影三级在线| 午夜精品一区二区三区电影天堂 | 国产激情精品久久久第一区二区| 午夜精品久久一牛影视| 一区二区在线看| 亚洲免费视频成人| 亚洲一区二区3| 亚洲成人精品在线观看| 亚洲一级二级三级| 午夜精品123| 毛片一区二区三区| 狠狠色丁香久久婷婷综合_中| 理论片日本一区| 国产精品中文字幕一区二区三区| 狠狠色2019综合网| 国产精品资源在线| 色综合 综合色| 欧美日韩一区二区欧美激情| 欧美高清性hdvideosex| 欧美电影免费观看完整版| 欧美成va人片在线观看| 久久免费电影网| 中文字幕在线观看一区二区| 亚洲主播在线播放| 美女一区二区三区| 成人av网址在线| 欧美三区在线观看| 久久色视频免费观看| 精品久久久久久久一区二区蜜臀| 久久无码av三级| 亚洲欧美区自拍先锋| 亚洲aⅴ怡春院| 精品一区二区免费在线观看| av不卡在线观看| 91精品国产91热久久久做人人| 久久一留热品黄| 一区二区三区在线视频观看| 青娱乐精品视频| 成人av小说网| 日韩免费性生活视频播放| 国产精品久久夜| 日韩av网站免费在线| 成人免费视频免费观看| 日韩一区二区在线看片| 亚洲男人都懂的| 国产精品一二三| 777午夜精品免费视频| 成人免费在线观看入口| 久久草av在线| 在线不卡的av| 亚洲一区二区三区在线| 成人一区在线看| 欧美丰满嫩嫩电影| 亚洲精品视频在线观看网站| 狠狠色丁香久久婷婷综合_中| 日本韩国欧美在线| 国产精品另类一区| 激情都市一区二区| 欧美一区欧美二区| 亚洲va欧美va人人爽| 99久久精品一区二区| 欧美tickle裸体挠脚心vk| 一区二区三区丝袜| 91女厕偷拍女厕偷拍高清| 国产亚洲va综合人人澡精品 | 欧美色爱综合网| 欧美国产日韩精品免费观看| 日本不卡高清视频| 欧美日韩成人综合| 一区二区不卡在线播放 | 国产一区在线视频| 日韩一区二区三区四区| 亚洲国产一区二区三区青草影视| 成人看片黄a免费看在线| 久久久久国产精品厨房| 极品瑜伽女神91| 欧美变态tickling挠脚心| 日本午夜一区二区| 欧美男生操女生| 日韩精品色哟哟| 欧美日韩一区二区三区视频| 一区二区三区免费看视频| 99久久婷婷国产综合精品| 中文字幕中文字幕一区| www.日韩在线| 亚洲人成精品久久久久| 一本色道久久综合亚洲aⅴ蜜桃 | 欧美日本在线看| 丝袜亚洲精品中文字幕一区| 欧美精选一区二区| 精品一区二区三区久久久| 欧美tk—视频vk| 国产精品一区二区黑丝| 中文在线一区二区| 色一情一乱一乱一91av| 亚洲成人av福利| 91精品国产综合久久小美女 | 欧美日韩一区三区四区| 五月天亚洲婷婷| 日韩你懂的电影在线观看| 国产乱人伦偷精品视频免下载 | 国产精品无人区| 91影院在线免费观看| 亚洲第一激情av| 精品国产乱码久久久久久久| 成人精品在线视频观看| 一区二区三区欧美视频| 欧美成人午夜电影| www.99精品| 日韩精品免费专区| 国产精品日产欧美久久久久| 欧洲色大大久久| 久久爱另类一区二区小说| 国产精品欧美经典| 欧美精品在欧美一区二区少妇 | 欧美亚洲丝袜传媒另类| 久色婷婷小香蕉久久| 国产精品欧美一级免费| 正在播放亚洲一区| 北条麻妃国产九九精品视频| 午夜免费久久看| 国产精品久久久久7777按摩| 欧美精品一二三区| fc2成人免费人成在线观看播放 | 成人免费视频国产在线观看| 亚洲国产一二三| 久久久99精品免费观看不卡| 色哟哟日韩精品| 国产尤物一区二区| 日韩成人午夜精品| 亚洲视频精选在线| 国产视频一区二区在线观看| 欧美高清视频一二三区| 一本大道久久a久久综合婷婷| 国产精品一区在线| 蜜臀av在线播放一区二区三区| 亚洲精品一二三四区| 国产片一区二区| 欧美成人精品福利| 欧美日韩专区在线| 91在线小视频| 国产精品一品二品| 国产在线精品国自产拍免费| 日韩av高清在线观看| 亚洲电影一区二区| 亚洲精品免费在线播放| 中文幕一区二区三区久久蜜桃| 精品久久久网站| 91精品国产综合久久福利软件| 在线观看免费一区| 在线精品视频一区二区三四| 成人免费毛片嘿嘿连载视频| 国产成人在线影院 | 亚洲激情自拍视频| 亚洲欧洲日韩在线| 国产精品午夜在线| 中文字幕不卡在线观看| www激情久久| wwwwww.欧美系列| 2021久久国产精品不只是精品| 日韩欧美国产午夜精品| 精品欧美一区二区久久| 精品第一国产综合精品aⅴ| 精品国产1区二区| 国产性天天综合网| 国产精品乱人伦| 亚洲色图.com| 亚洲最新在线观看| 五月天久久比比资源色| 日韩精品久久久久久| 九色综合国产一区二区三区| 国内精品不卡在线| 成人精品视频一区二区三区 | 欧美电影免费观看高清完整版在线 | 亚洲一级电影视频| 视频一区在线播放| 久久精品久久精品| 国产一区欧美日韩| www.一区二区| 欧美日韩在线亚洲一区蜜芽| 制服.丝袜.亚洲.中文.综合 | 性久久久久久久| 精品在线观看免费| 成人福利视频在线| 在线视频中文字幕一区二区| 91精品国产综合久久久久久久| 精品久久久久久亚洲综合网| 欧美激情综合在线| 亚洲小说欧美激情另类| 捆绑紧缚一区二区三区视频 | 欧美一二三四在线| 国产三级三级三级精品8ⅰ区| 国产精品久久久久影视| 亚洲精选视频免费看| 毛片基地黄久久久久久天堂| 成人激情黄色小说| 欧美精品第1页| 国产亚洲综合在线| 日韩激情在线观看|