Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Cmput 455 Assignment 4

Due Dec 6, 11:55pm. Submit via eClass submission link on the main eClass course page.

Late submission (with 20% deduction) Dec 8, 11:55pm. Submit via separate eClass link for late submissions.

In this assignment, you develop your own player for the game of Ninuki. You can implement any player you want using any techniques, as long as it's in Python3 and follows the rules and constraints below. We will test the performance of your

player in two tournaments.

In the marking tournament, for regular assignment marks, we will match your player against a fixed set of our Ninuki players.

The championship tournament, for bonus points and eternal fame, will be a tournament among student programs. The winning team will be crowned the Fall 2023 Cmput 455 Ninuki champions.

Setup

1. First, as in previous assignments, make sure you have your Python 3, NumPy and GoGui 1.51 set up. You can review the procedures under Lecture 3 activities.

2. Choose a team name, and a directory name. We would like to provide updates as the tournament progresses. In your readme file, please provide the team name which we will use for public updates. If you want to retain a level of

anonymity, then your team name should not hint at the team members. Implement your player in a new directory your_directory_name which you add to your assignment4 directory. Your directory name should be a reasonable

shortened form of your team name, without any spaces or other special characters that could mess up test scripts. 3. Download assignment4.tgz and expand it. The directory assignment4 contains:

A script play.py for playing test games between two programs.

Code for two of the four opponents for the marking tournament: a directory random_player containing the random

Ninuki player Ninuki-random.py, and a directory ab_player containing a simple alphabeta-based player Ninuki- ab.py.

We will not publish the other two opponents before the tournament, but here is a little bit of information about them. One will be an optimized MCTS-based player, and the other one will be a stronger alphabeta-based player. We will   tune the strength of these two players such that they will be a little bit stronger than the public players, but perfectly possible to defeat within the scope of an assignment.

4. Add the code to implement your solution in a new directory assignment4/your_directory_name. Your main program must be named Ninuki.py.

RULES

All games will be played on a 7x7 board.

The time limit will be 60 seconds per move. If a program does not play within the time limit, it will be killed by the script   and instantly loses the game. We recommend leaving a little bit of extra time and not fully use the 60 seconds, just to be safe.

The memory limit will be 1 Gigabyte per program.

If a program generates an illegal move, it instantly loses the game.

If a program crashes or exceeds the memory limit, it instantly loses the game.

If a game is interrupted for other reasons, it may be replayed at the decision of the instructor.

Your player is allowed but not required to resign. It will not be called to generate a move after the game is over.

CONSTRAINTS

You can use any code provided by us, or created by you as part of this course, but no other outside sources of code. Using standard python libraries is OK, before using other more exotic libraries ask on the eClass forum.

Your program is not allowed to use more than one thread for computation/search.

Your program is not allowed to use programming languages other than Python3.

Your program is allowed to read/write les within your assignment4 directory only.

The total file size of the assignment submission, including all files, is limited to 1 Megabyte uncompressed. It must remain

under that limit while your program is running, i.e. your program cannot generate files of larger total size. Further reasonable constraints to prevent abuse may be imposed as we become aware of them.

GTP COMMANDS

genmove color

Your genmove command should generate a move using your player, and comply with the rules and constraints above. All other existing GTP commands should be left as-is.

The Usual Warnings, Hints and Details - Read them All

Please make sure that these details are correct in your assignment 4 submission.

Your file must be a valid tgz file named assignment4.tgz which can be uncompressed with tar xvfz assignment4.tgz

Name your main file Ninuki.py, and put it in a directory assignment4/your_directory_name named after your team.

Do not introduce extra levels of directories.

You may add extra python files within the same directory.

By default, we assume that teams will stay the same as in assignment 3. If you change your team, email Abbas the new information one week before the assignment 4 deadline at the latest.

Pre-submission Test and Submission

Play one test game against Ninuki-random.py as follows:

Change player1 in the play.py script to your program's path, your_directory_name/Ninuki.py Use numGame=1 as the parameter for the playGames() function.

Run play.py

After the game nishes, there will be a le named game_result.txt, that contains the summary of the test game. Include this le in your submission.

Follow the same general steps as in assignment 1 to create your presubmission.log file and your submission, but (of

course) using your assignment4 directory, assignment4.tgz as file name, and the sample test game described above as test. Add both your game_result.txt and readme.txt to your assignment4 directory. The readmele should also state your public team name for the tournament and your_directory_name.

Marking

There will be 5+2 marks for this assignment.

1 mark for your le presubmission.log which shows the log of your correct test execution, your game_result.txt, and your readme.txt file.

4x1 mark for your wins and draws against our 4 test opponents. We will play at least two games against each opponent, one with each color. We might play more games depending on available machines and time.

Up to 2 bonus marks for doing well in the championship tournament. Typically, the top 8 teams receive some bonus marks, and the two nalists receive two marks.