• 沒有找到結果。

Final Project Description

N/A
N/A
Protected

Academic year: 2022

Share "Final Project Description"

Copied!
15
0
0

加載中.... (立即查看全文)

全文

(1)

Final Project Description

Due date: 09:00 (UTC+8), Janunray 18, 2018

(2)

Final Project Description

Implement the Chinese Dark Chess using NegaScout.

For rule of Chinese Dark Chess, see http://www.iis.

sinica.edu.tw/~tshsu/tcg/2017/hwks/rules.pdf Check your school e-mail address for password of template code (Provide by former TA, used in class only) and CDC_interface.

(3)

Final Project Requirements

ImplementNegaScout.

ImplementTransposition Table(Hash table).

Other improvedtechniques.

Provide your Makefile or specfied how to compile your codes (Step-by-Step) in the report.

Your program must has the ability to complete any legal games normally via the given CDC_interface.

(4)

Solution Package

Submit page: http://w.csie.org/~tcg/2017/

Package structure:

Your ID [R05xxxxxx/B02xxxxxx/. . .]

code// A folder contains all your codes and makefile report.pdf// Your report

Compress your folder into a “zip” file

Due to server limitation, the file size is restricted to2Mbytes

(5)

Report content

The report must contain

1 How to compile your program (makefile recommand)

2 What you have implemented.

please state the line number of the implementation The report can contain but not limit to

1 The heuristic you use.

2 The motivation of using these heuristics.

3 The experiment data which shows that your techniques improve your program.

(6)

Grading policy

Final score = Coding score + Document score + Bonus Coding score + Document score is at most 40.

Bonus score depends on the tournament performance.

Bonus does not include in the 40% final project score In the following situation, your score will be verylow:

1 You claim something you have done but you didn’t.

2 Your program can not be compiled.

3 Your program can not be executed.

4 Your program can not complete a game normally.

5 You didn’t do anything and just upload the template code.

(7)

Brief Rules for Final Project: Swiss-system tournament

1 抽籤決定第⼀輪對⼿。(請提早到場抽籤)

2 while(1){

3 跟你的對⼿先後⼿各下⼀盤

4 if(裁判覺得可以)break;

5 根據⽬前勝負決定下⼀輪對⼿。

6 } //⼤約⌈log2 參賽⼈數 ⌉ 輪,預估六⾄八輪 算分⽅法:

勝⼀局加 2 ⼤分,和⼀局加 1 ⼤分,負⼀局加 0 ⼤分。

⼩分 = 對戰過的對⼿之⼤分總和。

先比⼤分再比⼩分,若都平⼿再比兩程式之間的勝負,若再 平⼿就同名次。

(8)

Brief Rules for Final Project: Swiss-system tournament

(9)

Brief Rules for Final Project

⼀個程式⼀盤棋可⽤計算時間 900 秒,超時立刻算負。

三循環算和。

雙⽅連續 30 步皆無吃無翻算和。

單局犯規(輸出不合法步、程式崩潰等等)發⽣第⼆次立刻 算輸。

裁判擁有所有棋局最終判決權以及犯規時棋局繼續的⽅式之 決定權。

(10)

GUI usage

See “暗棋對弈平台 _ 使⽤⼿冊 _windows.pdf” or “User manual of Chinese dark chess client_linux.pdf”

思考模式 讀檔模式

讀 Board.txt,寫 Move.txt。

每下⼀步程式就會關閉。

背景模式

透過 socket 讀寫。

每下⼀步程式不會結束。

每下完⼀場介⾯還是會砍掉你的程式。

⽬前不⽀援本地⾃對戰,必須連 server。

If you want to compare the search engine for two different version, you need to create another folder contains the GUI

(11)

Template Code

final project template main.cc, anqi.cc, anqi.h

Protocol.h, Protocol.cpp, ClientSocket.h, ClientSocket.cpp You only need to modify codes in main.cc, anqi.cc and anqi.h Need -static -s when compiling in all system

Need -lwsock32 when compiling in windows system Can use -D WINDOWS to enable extra WINDOWS only feature.

它的檔案儲存格式是 big5,若需要請⾃⾏轉。

(12)

Steps of Protocol: 讀檔模式

1 Initial the game state according to board.txt

2 Generate a move

3 Write the move to move.txt

1 BOARD B;

2 if (argc <=1) {

3 TimeOut =(B. LoadGame (" board.txt") -3) *1000;

4 if (!B. ChkLose ()) Output (Play(B));

5 return 0;

6 }

(13)

Steps of Protocol: 背景模式

1 Initial the socket connection

2 Initial the game state through the socket

3 While(true) a If it’s your turn

1 Generate a move and send it through the socket

2 Update the local game state

3 Receive the message from the server

4 Change the turn b If it’s opponent’s turn

1 Wait for opponents’ move

2 Receiving Opponent’s move and update the game state.

3 Change the turn

(14)

Board Index

Template Code

0 1 2 3

4 5 6 7

8 9 10 11

12 13 14 15

16 17 18 19

20 21 22 23

24 25 26 27

28 29 30 31

Protocal

28 29 30 31

24 25 26 27

20 21 22 23

16 17 18 19

12 13 14 15

8 9 10 11

4 5 6 7

0 1 2 3

Protocal (x,y)

(0,7) (1,7) (2,7) (3,7) (0,6) (1,6) (2,6) (3,6) (0,5) (1,5) (2,5) (3,5) (0,4) (1,4) (2,4) (3,4) (0,3) (1,3) (2,3) (3,3) (0,2) (1,2) (2,2) (3,2) (0,1) (1,1) (2,1) (3,1) (0,0) (1,0) (2,0) (3,0)

(15)

Frequently Asked Questions

For MAC:

Q: Is there a GUI version for MAC?

A: Currently there is no MAC version.

For Linux:

Q: What does permission denied means?

A: Your ”search” file needs to be executable.

Q: Why my GUI interface does not work?

A: Make sure to add the LD_LIBRARY_PATH=. to include the GameDLL.so

Q: Any hardware limit?

A: In the tournament, you need to prepare your own hardware.

You can use 16-core workstation or GPU or TPU or so on.

But you need to support CPU only mode for testing purpose.

參考文獻

相關文件

Since everyone needs to write the final solutions alone, there is absolutely no need to lend your homework solutions and/or source codes to your classmates at any time.. In order

Since everyone needs to write the final solutions alone, there is absolutely no need to lend your homework solutions and/or source codes to your classmates at any time.. In order

Since everyone needs to write the final solutions alone, there is absolutely no need to lend your homework solutions and/or source codes to your classmates at any time.. In order

Since everyone needs to write the final solutions alone, there is absolutely no need to lend your homework solutions and/or source codes to your classmates at any time.. In order

Since everyone needs to write the final solutions alone, there is absolutely no need to lend your homework solutions and/or source codes to your classmates at any time.. In order

Since everyone needs to write the final solutions alone, there is absolutely no need to lend your homework solutions and/or source codes to your classmates at any time.. In order

Since everyone needs to write the final solutions alone, there is absolutely no need to lend your homework solutions and/or source codes to your classmates at any time.. In order

Since everyone needs to write the final solutions alone, there is absolutely no need to lend your homework solutions and/or source codes to your classmates at any time.. In order