免费一级欧美片在线观看网站_国产一区再线_欧美日本一区二区高清播放视频_国产99久久精品一区二区300

代寫 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 編程設(shè)計
  • 下一篇:代做UIC's finance office.、代寫java編程語言
  • 無相關(guān)信息
    昆明生活資訊

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

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 kmw.cc Inc. All Rights Reserved. 昆明網(wǎng) 版權(quán)所有
    ICP備06013414號-3 公安備 42010502001045

    免费一级欧美片在线观看网站_国产一区再线_欧美日本一区二区高清播放视频_国产99久久精品一区二区300
    日本三级亚洲精品| 国产呦萝稀缺另类资源| 欧美在线观看禁18| 亚洲精品高清视频在线观看| 成人精品视频.| 国产精品无圣光一区二区| 另类欧美日韩国产在线| 日韩免费电影一区| 看片的网站亚洲| 精品99一区二区| 六月丁香综合在线视频| 欧美videos大乳护士334| 久久91精品久久久久久秒播| 日韩美女主播在线视频一区二区三区| 美女在线视频一区| 欧美视频一区二区在线观看| 18欧美亚洲精品| 色噜噜狠狠一区二区三区果冻| 亚洲卡通动漫在线| 91高清视频免费看| 亚洲色图都市小说| 欧美性大战久久久久久久蜜臀| 亚洲国产日韩在线一区模特| 欧美人成免费网站| 六月婷婷色综合| 久久久九九九九| a美女胸又www黄视频久久| 日韩久久一区二区| 精品1区2区3区| 日本三级亚洲精品| 久久―日本道色综合久久| 成人一区二区三区| 一区二区免费在线播放| 欧美日韩高清一区二区不卡| 蜜桃av噜噜一区二区三区小说| 亚洲精品一区二区精华| 暴力调教一区二区三区| 亚洲综合网站在线观看| 337p亚洲精品色噜噜噜| 视频一区二区三区中文字幕| 日韩欧美一级二级三级久久久| 免费观看91视频大全| 久久久一区二区三区捆绑**| 成人福利视频在线| 亚洲福中文字幕伊人影院| 精品毛片乱码1区2区3区| 国产成人在线色| 欧美激情综合在线| 91福利视频在线| 青椒成人免费视频| 亚洲国产精品激情在线观看 | 男女视频一区二区| 国产亚洲人成网站| 色成人在线视频| 狠狠久久亚洲欧美| 亚洲另类春色国产| 精品国产一区二区国模嫣然| 99久久精品国产一区| 日韩国产欧美三级| 国产精品久久久爽爽爽麻豆色哟哟| 色www精品视频在线观看| 美女视频一区在线观看| 国产精品家庭影院| 欧美肥大bbwbbw高潮| 高潮精品一区videoshd| 五月婷婷久久丁香| 亚洲国产成人午夜在线一区| 欧美日韩高清一区二区| 岛国av在线一区| 性欧美大战久久久久久久久| 国产欧美一区二区精品久导航 | 久久精品国产亚洲5555| 亚洲日本在线视频观看| 欧美大肚乱孕交hd孕妇| 91视频精品在这里| 韩国理伦片一区二区三区在线播放| 亚洲伦理在线精品| 久久综合成人精品亚洲另类欧美 | 国产乱子伦一区二区三区国色天香| 一区二区三区国产精品| 久久久精品一品道一区| 欧美日韩国产首页在线观看| 成人午夜电影网站| 久久精品国产免费| 亚洲精品中文在线影院| 久久久久久久综合色一本| 欧美日韩在线观看一区二区| 成人黄动漫网站免费app| 日本成人在线网站| 亚洲宅男天堂在线观看无病毒| 国产欧美精品一区aⅴ影院 | 国产欧美一二三区| 日韩欧美中文字幕制服| 欧洲av一区二区嗯嗯嗯啊| 懂色av一区二区夜夜嗨| 久久精品999| 五月婷婷综合网| 亚洲免费资源在线播放| 国产三级一区二区三区| 欧美一级电影网站| 欧美日韩国产首页| 一本一道波多野结衣一区二区| 国产麻豆一精品一av一免费| 日本强好片久久久久久aaa| 一级中文字幕一区二区| 国产精品理论在线观看| 日韩视频一区二区三区| 91国偷自产一区二区三区成为亚洲经典| 国产乱人伦偷精品视频不卡| 性做久久久久久| 一区二区三区在线观看动漫| 国产精品视频看| 国产日韩欧美在线一区| 久久午夜羞羞影院免费观看| 日韩欧美久久一区| 91精品欧美福利在线观看| 欧美日韩一区二区三区免费看| 色国产精品一区在线观看| 91亚洲精品久久久蜜桃网站| 丰满亚洲少妇av| 国产不卡免费视频| 国产成人精品免费视频网站| 国内精品在线播放| 黄色日韩网站视频| 老司机精品视频导航| 免费在线观看日韩欧美| 日韩电影在线一区二区三区| 午夜激情综合网| 日日夜夜免费精品视频| 日韩成人精品在线| 美女脱光内衣内裤视频久久影院| 亚洲午夜在线电影| 亚洲成va人在线观看| 日韩精品乱码免费| 免费国产亚洲视频| 久久国产综合精品| 国产乱子伦一区二区三区国色天香| 精品系列免费在线观看| 国产在线精品免费av| 国产精品一二三在| 懂色av中文字幕一区二区三区 | 麻豆精品一区二区三区| 久久se这里有精品| 国产麻豆9l精品三级站| 国产91丝袜在线18| 成人av电影免费观看| 91在线观看地址| 色88888久久久久久影院按摩| 91国偷自产一区二区开放时间| 欧美性大战xxxxx久久久| 5566中文字幕一区二区电影| 日韩欧美综合一区| 久久久久9999亚洲精品| 国产精品国产三级国产三级人妇| 最新国产精品久久精品| 亚洲一区二区三区中文字幕| 亚洲国产成人高清精品| 日本大胆欧美人术艺术动态| 经典三级在线一区| 成人黄色电影在线| 欧美在线视频全部完| 欧美一区二区三区在线| 2024国产精品视频| 一区在线中文字幕| 亚洲v中文字幕| 久久9热精品视频| 成人丝袜高跟foot| 在线精品视频小说1| 91精品国产欧美一区二区成人 | 国产日韩欧美精品一区| 自拍偷拍亚洲欧美日韩| 午夜精品福利一区二区三区av| 久久精品国产精品亚洲综合| 成人在线综合网| 欧洲色大大久久| 欧美一二三区精品| 国产精品毛片a∨一区二区三区| 一区二区三区欧美视频| 麻豆成人91精品二区三区| 粗大黑人巨茎大战欧美成人| 欧洲精品一区二区三区在线观看| 日韩小视频在线观看专区| 国产精品拍天天在线| 性欧美疯狂xxxxbbbb| 国产精品1区二区.| 在线免费亚洲电影| 精品欧美久久久| 18成人在线观看| 免费久久99精品国产| aaa欧美色吧激情视频| 6080午夜不卡| 国产精品久久综合| 日本午夜精品一区二区三区电影| 懂色一区二区三区免费观看 | 成人国产亚洲欧美成人综合网| 欧美日韩三级一区| 国产女主播视频一区二区| 亚洲国产精品久久一线不卡| 国产成人精品一区二区三区四区| 欧美丝袜自拍制服另类|