国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

CS4386代寫、代做Java語言程序
CS4386代寫、代做Java語言程序

時間:2025-02-19  來源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯



CS4386 AI Game Programming (Semester B, 2024-2025)
Assignment 1:
Trap Gomoku
Set by CS4386 TA Team
Tournament1 Deadline:
Friday 28 February 2025 23:59
Tournament2 Deadline:
Wednesday 12 March 2025 23:59
This assignment is worth
15 % (fifteen percent)
of the overall course mark
Overview
1 Introduction
2 Marking Scheme
3 The Trap Gomoku Game
4 Online Judgment Platform
5 Requirements
6 Q&A
7 Academic Honesty
Appendix: Sample submission code
1 Introduction
Your task is to develop an AI program capable of playing the Trap Gomoku game.
You may implement your AI using algorithms covered in class or explore other
strategies. The implementation can be done in Python, Java, C, or C++.
To test and evaluate your AI, you will submit your code to an online AI game
judgment platform. The platform provides three preset AI opponents of varying
difficulty, allowing you to test your AI an unlimited number of times by
competing against them. Testing and refining your AI strategy against the three
preset AIs on the platform will help you improve your AI before competing in the
tournaments, where each participant will compete against every other
participant.
2 Marking Scheme
Item Due Mark
Tournament1 (students vs. students)
Tournament2 (students vs. students)
Students vs. Preset AIs
Report
28th Feb 23:59
12th Mar 23:59
12th Mar 23:59
12th Mar 23:59
20
20
30
30
 Total 100
Your final grade will be based on the following aspects:
● Whether you beat our three preset AIs. If you beat all three preset AIs, you
will get 30 points (10 points for each AI). The battle against each preset AI
is divided into two games: first player and second player. If you win only
one game, you will get 5 points.
● Your ranking in tournaments. We will schedule two tournaments, where
each participant will compete against every other participant once. After
the tournament, you will see where your AI stands in the rankings. These
rankings are an integral part of your overall assessment.
● In addition to the score from your AI performance, the quality of your
report will also affect the final score. Your report should explain your
1
approach, justify algorithmic choices, and analyze the strengths and
weaknesses of your AI.
3 The Trap Gomoku Game
The Trap Gomoku Game is a strategic board game where two artificial
intelligence (AI) players compete by aligning five of their pieces consecutively in
a straight line (horizontally, vertically, or diagonally) on a 15x15 grid. In addition,
at the beginning of the game, the system will randomly generate 10-15 trap
pieces and make them public to players. If the chess piece you place lands on a
trap, it will devour the piece, and the trap will remain.
Each player takes turns placing their pieces, aiming to align five consecutively in
a straight line. The "X" represents the trap, and the black and gray circles
represent Player 1 and Player 2's pieces, respectively (shown in Figure 1). The
game ends when the grid is filled (no more than 225 moves) and the player who
creates five of their pieces consecutively in a straight line on the grid will be the
winner. Special Case: If the board is full and there is still no line of 5 pieces. Then
the side with the longest connection is judged to be the winner (for example, if
the white chess piece has the longest 4 pieces in a line, and the black chess piece
has the longest 3 pieces in a line, then the white piece wins), otherwise, it is a
draw. You are encouraged to come up with your own strategies to make your AI
make better decisions at each turn. We are excited to see your brilliant ideas and
how they challenge each other!
2
Figure 1. Two instances of the game board
4 Online Judgment Platform
Website URL: http://cs4386.cs.cityu.edu.hk/user/login/
This URL can only be accessed within the CityU campus network. If you want to
use this website outside the campus, please use CityU VPN first.
Register and log in
● You should register using your CityU email.
● You should register using your real name.
● Upon registration, you will be assigned a user ID. Only your ID will be
shown in the ranking.
Submit your code: play against preset AI
Click "Game" in the left column, and then you will see the Trap Gomoku game. In
the game description, there are time and memory constraints for each step.
Please note that exceeding the time or memory limit will result in an automatic
loss. Click "Submit Here" to go to the submission page. The platform provides a
sample algorithm: a random decision AI. You can use this as a reference to
understand the input-output format and game mechanics before implementing
your own strategy. The system will only retain your latest submission, so please
ensure that your last submitted code runs correctly. If you have iterated through
3
multiple versions, it is recommended that you save them locally to avoid losing
previous work.
We have set up three predetermined AI opponents for you to challenge:
"Offensive," "Defensive," and "Random," designated by user IDs 1, 2, and 3,
respectively. You can select the AI you want to compete against by choosing its
ID.
After submitting your code, you will not receive the result immediately. You
need to click refresh to view your game results. To ensure fairness and account
for any advantages or disadvantages of moving first, each AI pairing will consist
of two matches:
● One match where your own AI moves first.
● One match where your opponent moves first.
The results of these matches, along with time and memory usage, will be
updated after each submission.
Check log
You can download the log to view the state of the chessboard at each step after
getting the results. We also provide a visual interface that displays the placement
of each move step by step, making it easier for you to analyze and review your
games.
Tournament and Ranking
The tournament itself takes place the day following the deadline. On this
"competition day," the server will be offline. Your AI's performance will be
evaluated based on its win rate across the matches (If there is a draw, it will not
count as a win). When two participants' AIs have identical win rates, the AI that
used less time to achieve its wins will receive a higher ranking. After the
tournament, each participant can view the match logs of all their games against
other players. Once everyone has reviewed the logs and confirmed no issues, we
will announce the tournament rankings through the ranking page.
4
5 Requirements
Format of the code:
● The answer must include the play_games function as the interface for
online judgment, which is defined as,
C/C++: void play_games(int step, int rival_decision1,int rival_decision2);
Python: play_games(step:int,rival_decision_x:int,rival_decision_y:int)->None
Java: public static void play_games(int step, int rival_decision_x, int
rival_decision_y)->None
● Step indicates the move number in the current game. It starts from
Player A, step=1, then turns to player B, step=2, and then turns to
player A, step=3, …, end of the game.
● That is, player A's step is always odd, and player B's step is even.
Step=0 represents an empty checkerboard for initialization.
● rival_decision_x,y are the opponent’s decisions made in the
previous step, which can help you make better responses.
● You can read the board and save the decision through the read_ckbd and
save_decision functions. MAX_M and MAX_N are the size of the board
(equal to 15 in this game). They are defined in battle_base.
● C/C++: void read_ckbd(int step, int array[MAX_M][MAX_N]);
void save_decision(int x, int y);
● Python: read_ckbd(step:int)->List[List[int]]
save_decision(x:int, y:int)->None
● Java: battle_base.read_ckbd(int step) -> int [MAX_M][MAX_N];
battle_base.save_decision(int x, int y);
● In the array/list returned by read_ckbd, 0 represents the unplayed
area and you can make a decision here. 1 represents player A’s
decisions, 2 represents player B’s decisions, and 3 represents the
traps.
● Note that you must save your decision by calling save_decision in
the play_games function, don’t return anything. Do not try to
rewrite those functions, you just call them. You can read the
previous step of chess before the current step.
● The main function is not allowed in the answer.
● You can use print/printf/cout to print logs to help you debug. They will
be printed in the battle_log.txt.
5
● If you use Java, JVM will occupy memory, resulting in higher memory
usage.
Submission requirements:
● For Python users: python base modules (in sys.modules.keys()): functools,
random, sorted, heapq, collections, etc. are allowed. You are not allowed
to use other packages like numpy, sklearn, etc.
● For C/C++ users: most header files are allowed, even including
<bits/stdc++.h>, <iostream> and <algorithm>.
● For Java users: You cannot use external third-party libraries or other
non-standard Java packages that are not included in the JDK.
● You cannot use some system calls such as change directory, list file,
create file, remove file, etc.
● For all AI programs, we limit the running time and the total memory
usage, which you can find on the website.
● Violation of any of the above will raise an error and cause the game to be
lost.
Requirement for the report:
You should write a report to explain your AI. Describe your algorithm as clearly
as possible. Feel free to use examples and add screenshots or other figures if
they can help better illustrate your method. If you adopt some part of your code
from somewhere, you must fully acknowledge this and provide a reference to
where you obtained the code. You must declare how much of your submitted
code is obtained from someone/somewhere else and how much is indeed
written by you. At the end of your report, include the related references from
where you have gathered useful information in working on your assignment.
You need to submit your source code to the online judgment system and submit
your report to Canvas.
Name your files according to the following format, where XXXXXXXX is the 8
digits of your student ID number:
CS4386-2425B-A1-XXXXXXXX-Report.pdf (should be in PDF format)
6 Q&A
We will also create a discussion on Canvas. You can ask questions there; the TAs
will check it daily and answer your questions as soon as possible.
6
7 Academic Honesty
We have repeatedly emphasized the importance of academic honesty. Review
the website https://www.cityu.edu.hk/pvdp/ah/index.htm on academic
honesty if needed.
This is an individual assignment so each of you should write your own code. You
should never send any part of your code to your classmate “for his/her
reference” or copy any part of the code from your classmate. You should
obviously understand the code that you submit, and be able to explain your code
when asked.
Make sure that you do not commit any academic dishonest behaviors while
working on this assignment!
7
Appendix: Sample submission code
Python:
import random
from battle_base import read_ckbd, save_decision,MAX_M,MAX_N
def play_games(step:int,rival_decision_x:int,rival_decision_y:int)->None:
 states = read_ckbd(step-1)
 legal_decision = []
 for m in range(MAX_M):
 for n in range(MAX_N):
 if states[m][n]==0: # 0 is unplayed area
 legal_decision.append((m, n))
 # make your decision here
 decision = random.choice(legal_decision)
 save_decision(decision[0], decision[1])
C:
#include <stdio.h>
#include <stdlib.h>
#include "battle_base.h"
#define max(a,b) ((a) >= (b) ? (a) : (b))
void play_games(int step, int rival_decision_x,int rival_decision_y) {
 int states[MAX_M][MAX_N]; // Assuming MAX_M and MAX_N are defined board
size
 read_ckbd(step-1, states);
 int legal_decision[MAX_M*MAX_N][2];
 int legal_count = 0;
 for (int m = 0; m < MAX_M; m++) {
 for (int n = 0; n < MAX_N; n++) {
 if (states[m][n] == 0) // 0 is unplayed area
 {
 {
 legal_decision[legal_count][0] = m;
 legal_decision[legal_count][1] = n;
 legal_count++;
 }
 }
 }
 }
 // Make your decision here
 int random_index = rand() % legal_count;
 int* decision = legal_decision[random_index]; // Example of random
strategy
 save_decision(decision[0], decision[1]);
}
8
C++:
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include "battle_base.h"
void play_games(int step, int rival_decision1,int rival_decision2) {
 int states[MAX_M][MAX_N]; // Assuming MAX_M and MAX_N are defined board
size
 int states_count = 0;
 read_ckbd(step-1, states);
 int legal_decision[MAX_M*MAX_N][2];
 int legal_count = 0;
 for (int m = 0; m < MAX_M; m++) {
 for (int n = 0; n < MAX_N; n++) {
 if (states[m][n] == 0) // 0 is unplayed area
 {
 {
 legal_decision[legal_count][0] = m;
 legal_decision[legal_count][1] = n;
 legal_count++;
 }
 }
 }
 }
 // Make your decision here
 int random_index = rand() % legal_count;
 int* decision = legal_decision[random_index]; // Example of random
strategy
 save_decision(decision[0], decision[1]);
}
Java:
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
public class play_fun {// Do not change the class name
 static final int MAX_M = battle_base.MAX_M;
 static final int MAX_N = battle_base.MAX_N;
 public static void play_games(int step, int rival_decision_x, int
rival_decision_y) {
 int[][] states = battle_base.read_ckbd(step-1);
 List<int[]> legalDecision = new ArrayList<>();
 for (int m = 0; m < battle_base.MAX_M; m++) {
 for (int n = 0; n < battle_base.MAX_N; n++) {
 if (states[m][n] == 0) { // 0 is unplayed area
 legalDecision.add(new int[]{m, n});
9
 }
 }
 }
 // Make your decision here
 Random random = new Random();
 int[] decision =
legalDecision.get(random.nextInt(legalDecision.size()));
 battle_base.save_decision(decision[0], decision[1]);
 }
}





請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp

掃一掃在手機(jī)打開當(dāng)前頁
  • 上一篇:小花分期客戶投訴客服電話-小花分期24小時人工服務(wù)熱線電話
  • 下一篇:橙多多全國客服電話-橙多多人工客服服務(wù)電話熱線
  • 無相關(guān)信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業(yè)CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業(yè)CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務(wù) 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務(wù) 管路
    流體CFD仿真分析_代做咨詢服務(wù)_Fluent 仿真技術(shù)服務(wù)
    流體CFD仿真分析_代做咨詢服務(wù)_Fluent 仿真
    結(jié)構(gòu)仿真分析服務(wù)_CAE代做咨詢外包_剛強(qiáng)度疲勞振動
    結(jié)構(gòu)仿真分析服務(wù)_CAE代做咨詢外包_剛強(qiáng)度疲
    流體cfd仿真分析服務(wù) 7類仿真分析代做服務(wù)40個行業(yè)
    流體cfd仿真分析服務(wù) 7類仿真分析代做服務(wù)4
    超全面的拼多多電商運(yùn)營技巧,多多開團(tuán)助手,多多出評軟件徽y1698861
    超全面的拼多多電商運(yùn)營技巧,多多開團(tuán)助手
    CAE有限元仿真分析團(tuán)隊(duì),2026仿真代做咨詢服務(wù)平臺
    CAE有限元仿真分析團(tuán)隊(duì),2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內(nèi)
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗(yàn)證碼 寵物飼養(yǎng) 十大衛(wèi)浴品牌排行 suno 豆包網(wǎng)頁版入口 wps 目錄網(wǎng) 排行網(wǎng)

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

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

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    国产精品99久久久久久久久| 一级一片免费播放| 国产伦理久久久| 国产日本欧美一区二区三区| 美女视频久久| 精品一区日韩成人| 蜜桃视频在线观看91| 欧美性受xxx| 欧美视频第一区| 欧美亚洲在线视频| 欧美日韩不卡在线视频| 日韩久久在线| 欧美日韩一级在线| 美国av一区二区三区| 国产主播一区二区三区四区| 免费看欧美黑人毛片| 国产伦理久久久| 91精品久久香蕉国产线看观看| 91精品国产91久久久久久久久| 久久综合中文色婷婷| 久久婷婷人人澡人人喊人人爽| 国产不卡av在线| 久久精品成人一区二区三区| 国产精品久久久999| 色综合久久久久久中文网| 一区视频二区视频| 亚洲wwwav| 青草热久免费精品视频| 免费久久99精品国产自| 国产美女扒开尿口久久久| 91久久中文字幕| 久久久久亚洲精品国产| 久久久久北条麻妃免费看| 欧美情侣性视频| 欧美一级免费在线观看| 欧美综合激情| 国产日本欧美在线| 国产成人精品电影久久久| 国产精品视频网站| 一本色道久久88亚洲精品综合| 日产中文字幕在线精品一区| 欧美在线播放一区二区| 国产女人精品视频| 国产成人艳妇aa视频在线| 国产精品久久久久久亚洲影视| 亚洲三级一区| 免费观看美女裸体网站| 久久久国产精品一区二区三区| 国产精品久久国产三级国电话系列| 欧美激情日韩图片| 欧美性受xxxx黑人猛交88| 成人欧美一区二区三区黑人免费| 久久精品国产一区二区三区日韩| 色综合导航网站| 欧美中文字幕在线播放| 97热精品视频官网| 国产精品久久久一区二区三区| 亚洲一区二区久久久久久久| 欧美日韩天天操| 91传媒久久久| 精品中文字幕乱| 日韩精品在在线一区二区中文| 国产精品一区二区久久久| 久久精品国产91精品亚洲| 亚洲a∨一区二区三区| 国产又粗又长又爽视频| 久久久久久有精品国产| 亚洲人一区二区| 免费看日b视频| 久久久国产精品x99av| 日韩av免费一区| 成人黄色av网站| 国产精品久久久久高潮| 日韩欧美精品一区二区三区经典| 国产精品一二三在线| 国产精品久久久久久久久久久久冷| 亚洲91精品在线观看| 国产精品亚发布| 欧美巨猛xxxx猛交黑人97人| 精品少妇一区二区三区在线| 久久精品一区中文字幕| 日韩精品综合在线| 国产成人在线播放| 天堂资源在线亚洲视频| av一区二区三区四区电影| 精品产品国产在线不卡| 欧美视频观看一区| 日韩在线国产精品| 日韩日韩日韩日韩日韩| 国产厕所精品在线观看| 色狠狠久久av五月综合|| 91精品国产高清久久久久久久久| 中文字幕人成一区| 91精品久久久久久久久久久久久久| 国产成人免费av电影| 日本欧美色综合网站免费| 国产男女在线观看| 不卡伊人av在线播放| 狠狠爱一区二区三区| 欧美亚洲精品一区二区| 热久久美女精品天天吊色| 国产九色91| 夜夜爽www精品| 久久欧美在线电影| 青青青国产在线视频| 国产精品视频久| 精品一区二区三区毛片| 久久久久久av| 国产精品99久久久久久白浆小说 | 日韩精品 欧美| 日韩中文综合网| 欧美精品国产精品久久久| 国产精品久久亚洲7777| 国产一级黄色录像片| 一本一生久久a久久精品综合蜜| 91精品国产自产在线观看永久 | 日本精品中文字幕| 久久久国产精彩视频美女艺术照福利| 欧美日韩精品在线一区二区| 精品中文字幕在线2019| 91超碰中文字幕久久精品| 日韩五码在线观看| 欧美精品免费在线| 久久婷婷五月综合色国产香蕉| 日韩精品一区二区三区电影| 国产精品久久久久av免费| 国产免费一区二区三区视频 | 欧美亚洲一级片| 欧美成年人网站| 97久久精品人搡人人玩| 青青草国产精品| 在线视频一二三区| 日韩一级黄色av| 丰满少妇久久久| 日韩精品最新在线观看| 操人视频在线观看欧美| 久久久天堂国产精品女人| 国内揄拍国内精品少妇国语| 亚洲熟妇av一区二区三区| 国产精品丝袜久久久久久高清| 成人h视频在线观看| 欧美日韩国产一二| 懂色一区二区三区av片| 国产精品夫妻激情| 国产妇女馒头高清泬20p多| 麻豆av一区二区三区| 日韩av不卡在线| 欧美激情一级欧美精品| 久久久999成人| 91精品国产色综合久久不卡98| 欧美激情精品久久久久久小说| 中文字幕一区二区中文字幕| 国产精品美女久久久久av超清| 久久久福利视频| 99视频网站| 国产欧美欧洲| 免费在线观看的毛片| 日本一区二区免费高清视频| 一区二区视频国产| 操日韩av在线电影| 久久天堂电影网| 日韩亚洲国产中文字幕| 国产超级av在线| 911国产网站尤物在线观看| 蜜臀av.com| 欧美中文字幕视频在线观看| 欧美一级免费在线观看| 亚洲va久久久噜噜噜久久天堂| 色综合久久久888| 精品国产91亚洲一区二区三区www| 日韩亚洲欧美成人| 久久久久久99| 91av在线网站| 国产九区一区在线| 国产综合欧美在线看| 激情综合网俺也去| 欧美久久综合性欧美| 久久天天躁狠狠躁夜夜躁2014| 日韩在线观看高清| 国产成人精品一区二区三区福利 | 国产一区免费视频| 欧美乱大交xxxxx潮喷l头像| 日韩美女中文字幕| 日韩免费中文专区| 日韩av在线播放不卡| 日本精品免费在线观看| 日韩精品久久久免费观看| 人妻夜夜添夜夜无码av| 欧美精品久久| 国内精品一区二区| 激情小说综合网| 免费国产一区二区| 国产亚洲一区二区三区在线播放| 国产在线观看不卡| 成人免费观看a| 81精品国产乱码久久久久久 | 久久精品视频16| 国产经品一区二区| 久久国产一区| 国产精品免费一区二区三区|