亚洲十八**毛片_亚洲综合影院_五月天精品一区二区三区_久久久噜噜噜久久中文字幕色伊伊 _欧美岛国在线观看_久久国产精品毛片_欧美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

    **欧美日韩在线观看| av在线播放免费| 欧美艳星介绍134位艳星| 中文字幕亚洲不卡| а_天堂中文在线| 国产91在线|亚洲| 国产在线网站| 久久久成人网| 国产女王在线**视频| 午夜电影亚洲| 精品福利一二区| 成人午夜国产| 欧美日韩免费在线视频| 美女午夜精品| 色综合久久88色综合天天| 99视频有精品高清视频| 中文字幕中文乱码欧美一区二区| 2019中文字幕在线电影免费| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 日本在线播放一二三区| 蜜桃av噜噜一区| 色婷婷综合激情| 18av在线播放| 久久精品五月| 7777精品伊人久久久大香线蕉超级流畅| 免费观看在线黄色网| 久久不卡日韩美女| 亚洲尤物精选| 少妇精品久久久一区二区| 天天av天天翘天天综合网色鬼国产 | 亚洲一区二区三区高清| 嫩草嫩草嫩草嫩草| 国产日本精品| 日本中文字幕电影在线观看| 青椒成人免费视频| 国产精品秘入口| 激情成人午夜视频| 免费网站看v片在线a| 成人综合在线观看| 精品人人视频| 亚洲免费电影在线| swag国产精品一区二区| 欧美日韩高清在线| 欧美久久成人| 领导边摸边吃奶边做爽在线观看 | 日韩av黄色| 色综合欧美在线视频区| 欧美日韩一区二区三区视频播放| 欧美变态口味重另类| 欧美aⅴ99久久黑人专区| 两个人hd高清在线观看| 国产乱国产乱300精品| av电影在线免费| 一二三区精品视频| 岳的好大精品一区二区三区| 天天综合天天操| 人人狠狠综合久久亚洲| 日皮视频在线观看| 亚洲欧美激情小说另类| 欧美调教视频| 成视频在线观看免费观看| 久久久综合网| 婷婷av在线| 亚洲香肠在线观看| 精品久久久久久久| 黄页网站免费在线观看| 丁香一区二区三区| 欧美成人福利| 日韩一区二区三区四区| 日本午夜一本久久久综合| 久操av在线| 色综合久久久久综合体桃花网| 五月开心六月丁香综合色啪| 成人午夜视频在线| 成人黄色网址| 成人性生交大片免费| 好男人免费精品视频| 亚洲精品欧美二区三区中文字幕| 91社区在线高清| 国产精品水嫩水嫩| 国产一区二区在线| 中文字幕在线免费专区| 国产丝袜在线精品| 免费成人结看片| 欧美日韩在线免费视频| 欧美三级在线看| 国产视频一区免费看| 福利小视频在线| 日本韩国欧美一区| 性感少妇一区| 末成年女av片一区二区下载| 欧美三级电影网站| 紧缚捆绑精品一区二区| 高清不卡一区| 白虎精品一区| 1024亚洲合集| 好吊一区二区三区| 91九色美女在线视频| 欧美裸体一区二区三区| 国产精品一区在线观看你懂的| 日本一区二区三区电影免费观看| 神马久久影视大全| 国产精品久久午夜夜伦鲁鲁| 亚洲成人最新网站| 2018av在线| 日韩午夜激情电影| 91丨九色porny丨蝌蚪| 经典一区二区| 亚洲区欧洲区| 91精品啪在线观看国产60岁| 国产 日韩 欧美大片| 农村少妇一区二区三区四区五区| 牛牛澡牛牛爽一区二区| 午夜日韩在线电影| 日韩精品电影在线| 日韩电影免费观看高清完整版在线观看| 91黑丝在线| 亚洲丝袜美腿综合| 久久精品网址| 风间由美一区二区av101| 免费动漫网站在线观看| 精品女同一区二区三区在线播放| 卡一卡二国产精品| 丝袜连裤袜欧美激情日韩| 美女av在线播放| 欧美一级理论性理论a| 国产午夜亚洲精品羞羞网站| 国产尤物精品| av在线亚洲一区| 亚洲成人av在线影院| 色综合久久99| 播九公社成人综合网站| 欧美日本一区二区三区四区| 午夜精品爽啪视频| 久久精品亚洲乱码伦伦中文 | 2023国产精品久久久精品双| 超碰在线公开| 快播av资源| 午夜精品爽啪视频| 成人精品国产福利| 中文在线日韩| 嫩草伊人久久精品少妇av杨幂| 亚洲美女欧洲| 欧美三级电影网| 国产欧美综合在线| 日韩成人精品在线观看| 综合伊思人在钱三区| 一个人看的www视频在线免费观看 一个人www视频在线免费观看 | 国产日韩欧美在线一区| 欧美 亚欧 日韩视频在线| 伊人久久大香伊蕉在人线观看热v| 成人资源www网在线最新版| 日韩女优av电影| 亚洲一线二线三线视频| 成人免费毛片a| 午夜精品久久| 美国成人xxx| 国产在线88av| 嫩草精品影院| 九七影院97影院理论片免费| 红桃av永久久久| 久久综合九色综合欧美就去吻| 在线综合欧美| 国产伦精品一区二区三区千人斩| 性欧美1819sex性高清| 国产精品无码2021在线观看| 播九公社成人综合网站| 色偷偷久久一区二区三区| 中文字幕巨乱亚洲| 国产乱子轮精品视频| 99精品免费网| 99精品美女| 加勒比久久高清| 日韩大尺度黄色| 亚洲精品白浆| 色视频免费在线观看| 欧美一卡二卡在线观看| 亚洲777理论| 日韩美女视频一区| 91丨九色丨国产丨porny| 国产一区二区三区日韩| 国产欧美日本| 婷婷久久综合| 奇米狠狠一区二区三区| 日本精品国产| 中文字幕在线免费观看视频| 黄色在线观看网站| 韩国福利在线| 性感av在线播放| 视频免费观看| 被下部羞羞漫画| 6080日韩午夜伦伦午夜伦| 日韩欧美国产激情| 亚洲自拍偷拍av| 国产精品免费视频一区| 91麻豆免费看片| 99re免费视频精品全部| 成人黄色777网| 国产suv精品一区二区三区| 毛片不卡一区二区|