加勒比久久综合,国产精品伦一区二区,66精品视频在线观看,一区二区电影

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

CS4386代寫、代做Java語(yǔ)言程序
CS4386代寫、代做Java語(yǔ)言程序

時(shí)間:2025-02-19  來(lái)源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯(cuò)



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]);
 }
}





請(qǐng)加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp

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

    合肥圖文信息
    2025年10月份更新拼多多改銷助手小象助手多多出評(píng)軟件
    2025年10月份更新拼多多改銷助手小象助手多
    有限元分析 CAE仿真分析服務(wù)-企業(yè)/產(chǎn)品研發(fā)/客戶要求/設(shè)計(jì)優(yōu)化
    有限元分析 CAE仿真分析服務(wù)-企業(yè)/產(chǎn)品研發(fā)
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計(jì)優(yōu)化
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計(jì)優(yōu)化
    出評(píng) 開(kāi)團(tuán)工具
    出評(píng) 開(kāi)團(tuán)工具
    挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
    挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
    海信羅馬假日洗衣機(jī)亮相AWE  復(fù)古美學(xué)與現(xiàn)代科技完美結(jié)合
    海信羅馬假日洗衣機(jī)亮相AWE 復(fù)古美學(xué)與現(xiàn)代
    合肥機(jī)場(chǎng)巴士4號(hào)線
    合肥機(jī)場(chǎng)巴士4號(hào)線
    合肥機(jī)場(chǎng)巴士3號(hào)線
    合肥機(jī)場(chǎng)巴士3號(hào)線
  • 短信驗(yàn)證碼 目錄網(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號(hào)-3 公安備 42010502001045

    国产精品15p| 日韩精品不卡一区二区| 久久99青青| 久久夜夜操妹子| 婷婷伊人综合| 日韩av高清在线观看| 久久精品国产久精国产| 巨乳诱惑日韩免费av| 精品嫩草影院| 亚洲午夜国产成人| 国产毛片精品久久| 视频一区二区欧美| 欧美丝袜一区| 97色成人综合网站| 91成人在线网站| 日韩欧乱色一区二区三区在线| 香蕉久久国产| 久久国产小视频| 伊人久久大香线蕉av超碰| 国产精品www.| 日韩午夜视频在线| 免费成人美女在线观看.| 亚洲天堂久久| 大伊香蕉精品在线品播放| 国产精品嫩模av在线| 久久精品一区二区国产| 欧美aa免费在线| 日本欧美肥老太交大片| 婷婷国产精品| 蜜桃一区av| 中文字幕一区二区三区四区久久| av日韩一区| 国产精品久久久亚洲一区| 国产亚洲一区二区手机在线观看 | 在线国产欧美| 欧洲一级精品| 国产传媒av在线| 免播放器亚洲一区| 亚洲在线电影| 伊人影院久久| 国产精品久久久久久久久免费高清 | 日本中文在线一区| 欧美成a人国产精品高清乱码在线观看片在线观看久 | 精品72久久久久中文字幕| 综合综合综合综合综合网| 欧美精品不卡| 亚洲色图网站| 亚洲色图国产| 亚洲老司机网| 欧美一区一区| 亚洲欧洲二区| av一级久久| 欧美日韩中出| 久久av免费| 日韩va欧美va亚洲va久久| 欧美人与牛zoz0性行为| 国产欧美一区| 日韩电影网1区2区| 日韩在线视频一区二区三区| 日韩av电影天堂| 亚洲国产视频二区| 欧美国产不卡| 91精品国产自产拍在线观看蜜| 日韩精品水蜜桃| 欧美一级精品| 亚洲免费精品| 久久午夜影视| www.youjizz.com在线| 深夜av在线| 欧美日韩破处视频| 日本色综合中文字幕| 亚洲三级毛片| 欧美人与拘性视交免费看| 亚洲2区在线| 亚洲91中文字幕无线码三区| 久久一区91| 日韩一级大片| 美女诱惑黄网站一区| 日韩精品dvd| 久久精品一区二区三区中文字幕| 综合日韩在线| aaa国产精品| 999久久久国产精品| 99av国产精品欲麻豆| 中文在线资源| 麻豆91在线看| 日本综合精品一区| 国产一区日韩一区| 欧美a级成人淫片免费看| 日韩欧美一区二区三区在线视频| 一区二区三区精品视频在线观看| 欧美黄色一级视频| 91精品尤物| 99国产成+人+综合+亚洲欧美| 四季av一区二区凹凸精品| 99精品国产福利在线观看免费| 亚洲天天综合| 午夜视频一区二区在线观看| 亚洲欧美一区在线| 国产精品久久久久9999赢消| 成人精品国产亚洲| 国产精品中文| 99精品在线免费在线观看| 99av国产精品欲麻豆| www.久久.com| 成人在线日韩| 人人狠狠综合久久亚洲婷婷 | 在线精品国产| 电影天堂国产精品| 精品一区二区三区四区五区| 精品一区电影| 色爱综合网欧美| 亚洲精品影视| 国产精品男女| 日韩精品一级二级| 影音先锋中文字幕一区二区| 中文字幕视频精品一区二区三区| 精品69视频一区二区三区Q| 伊人久久国产| 久久av免费| 91久久视频| 另类中文字幕网| 精品三级av在线导航| 97精品在线| 西野翔中文久久精品国产| 91久久亚洲| 国产精品v亚洲精品v日韩精品 | 荡女精品导航| 国产传媒av在线| 欧美精美视频| 国产农村妇女毛片精品久久莱园子| 四虎地址8848精品| 欧美aaaaaaaa牛牛影院| 狠狠躁少妇一区二区三区| 国产日韩欧美一区二区三区| 极品中文字幕一区| 99精品视频网| 亚洲91视频| 美日韩一区二区三区| 欧美亚洲色图校园春色| 日韩精品2区| 国产丝袜一区| 精品视频在线一区二区在线| 亚洲精品高潮| 精品捆绑调教一区二区三区| 91嫩草精品| 青青草国产一区二区三区| 黄色欧美在线| 99久久伊人| 99久久这里只有精品| 久久久久伊人| 久久中文字幕av一区二区不卡| 久色婷婷小香蕉久久| 久久久精品久久久久久96| 国产欧美丝祙| 自由日本语亚洲人高潮| 欧美激情麻豆| 丝袜美腿亚洲综合| 日本中文字幕在线一区| 色喇叭免费久久综合网| 日本一不卡视频| 色在线免费观看| 久久狠狠一本精品综合网| 日本一区中文字幕| 日韩视频精品在线观看| 国产尤物久久久| 人人草在线视频| 女一区二区三区| 亚洲狼人精品一区二区三区| 免费国产自线拍一欧美视频| 亚洲免费福利一区| 日韩欧美午夜| 羞羞色午夜精品一区二区三区| 欧美日韩一视频区二区| 蜜桃久久av| 精品国产中文字幕第一页| 欧美aaaaa成人免费观看视频| 日韩午夜激情| 在线日韩成人| 日日夜夜精品视频天天综合网| 在线亚洲自拍| 在线日韩成人| 亚洲日本欧美| 国产v日韩v欧美v| 一呦二呦三呦国产精品| 国产不卡精品| 99精品国自产在线| 夜夜嗨av一区二区三区网站四季av| 日韩不卡一区二区| 国产一区二区三区成人欧美日韩在线观看 | 91亚洲国产高清| 99久久婷婷这里只有精品| 国产精品一级在线观看| 国产精品国产一区| 激情久久一区| 日韩成人在线看| 亚洲三级视频| 欧美亚洲福利| 蜜臀av一区二区在线免费观看| 中日韩免视频上线全都免费|