Assignment 8 – Santorini: a full game with intelligent players
1 Build and test

Assignment 8 – Santorini: a full game with intelligent players

.

Due Wednesday 12/5 11:59pm

1 Build and test

Implement at least one intelligent Santorini player. In contrast to the players for assignment 5, assignment 6 and assignment 7, these players should select one play at each turn of the game. Concretely, remote versions of the players should be able to handle JSON messages of the form:

["Register"]

or

["Place",Color,Initial-Board]

or

["Play",Board]

or

["Game Over",Name]

where

all data is as described in assignment 6.

When your component consumes:

A ["Register"], it should reply with a JSON string denoting a name for the player.

A ["Place",Color,Initial-Board], it should reply with a JSON list that contains two pairs of numbers, each between 0 and 4. The pairs correspond to placement positions for the workers 1 and 2 of the player in that order.

A ["Play",Board], it should reply with a JSON value of the form [Worker,Directions] or []. The value should correspond to a play that the player wants to execute or to the empty play that indicates that the player is quitting the game.

A ["Game Over",Name], it should reply with the JSON string "OK".

To achieve this you may have to adjust the interfaces of the strategy and player components you implemented for the previous assignments. No matter what changes you make though, a remote player should accept and reply to the messages described above.

Prepare both “local” and remote versions of the players, connect them via an admin with your implementation of the referee from assignment 6 and play enough games to gain some confidence that your complete implementation of the game works correctly.

Random testing is an effective and low-effort way to do that. In the context of this assignment to random test your implementation design a random player, i.e., a player similar to that from assignment 5 that returns randomly one of the possible turns, and play a large number of games where both players are random or one is random and the other local or remote.In contrast to the unit testing of previous assignments, this assignment introduces the idea of system testing. That is testing the game system as an integrated composition of different components.

Deliverables: In your team’s GitHub repository, create a directory "Deliverables/8/8.1/" and deposit there an executable or script called “santorini”. The executable should accept a number n as a command line argument and run n games of Santorini where one player is random and the other a remote intelligent player.