Assignment 7 – GO: a remote player
1 Design, Build and Test

Assignment 7 – GO: a remote player

.

Due Friday 11/8 11:59pm for the initial tests submission, Sunday 11/10 11:59pm for submitting valid tests and Tuesday 11/12 11:59pm for the final deliverables. The valid tests that we will use for the testfest, and will count towards your score, will be those that pass the validity checks when the Sunday deadline expires.

1 Design, Build and Test

Implement a remote version of your second GO player from assignment 5. Your player should read JSON inputs from a TCP/IP port whose details (IP and port number) are provided with a configuration file. The name of the configuration file should be "go.config" and it should contain a JSON object of the form {"IP" : s, "port" : n} where s is a JSON string and n is a JSON natural number.

The player should be able to handle JSON messages of the form:

["register"] or ["receive-stones",Stone] or ["make-a-move",Boards] where Stone and Boards are the same as for assignment 4.

The replies of your remote player should be consistent with the second strategy described in assignment 5 given a value n that the player retrieves through yet another configuration file called "go-player.config" that contains a JSON object of the form {"depth" : n}. The player should output its replies to the TCP/IP port.

After you implement the remote player, wrap it in a proxy player and adapt the test driver from the second task of assignment 5 to test your remote player. Your test driver should output the replies of the remote player as an array of JSON values as usual.

In contrast to assignment 5, your test driver shouldn’t assume that the input is as described by the above nor that a sequence of inputs is in a particular order but only that the input is valid JSON. If the inputs do not match the above description or their order is not appropriate (a ["register"] followed by a ["receive-stones",Stone] followed by a sequence of ["make-a-move",Boards]), the test-driver should add to its array of outputs the string "GO has gone crazy!" and ignore any inputs that follow.

Deliverables: In your team’s dev GitHub repository, create a directory "Deliverables/7/7.1/" and deposit there a Makefile for your test driver and the two configuration files. The remote player should be configured to connect at some port above 8000 at localhost and to use depth 1. In your team’s testing GitHub repository, create a directory "7/7.1/" and deposit there ten input files for the test driver with at least five inputs each and their expected output files. The first five ones should be valid versions of the input files you submitted for the second task of assignment 5. The last five should concern testing how the remote player handles out of order JSON messages or JSON messages that do not match the ones described at the begining of this page. Name the input files "input1", "input2", etc. and the corresponding output files "output1", "output2", etc.