A6 Project Option B: Enhanced Game Agents
CSE 473: Introduction to Artificial Intelligence
The University of Washington, Seattle, Spring 2023

Overview

This project option builds on Assignment 3. If you select this option, you'll enhance your game agent to play better, express a "persona" and be able to demonstrate some of its features in a transparent manner.

Develop either an enhanced Baroque Chess player or an enhanced Backgammon player. Here are the goals for this option:

  1. Play well (i.e., improve the performance of the agent that you created in A3.)
  2. Add a chat capability that is aware of the game state, game dynamics, and that adds an entertaining element to game play. The game master programs you used in Assignment 3 support the agents in making "utterances". Each time a move is returned by an agent, it also can return a text string that represents a conversational remark -- an utterance.

    The remarks made by your agent should reflect both (a) a persona that you should describe both in the report and (briefly) in the introduction that the agent returns to the game master when a game begins, and (b) something "dynamic" about the state or progress of the game, or as a retort to the remark(s) of the opponent.

  3. The chat feature should avoid complete hallucination or lying, unless that is clearly a desired feature for the persona being portrayed. It is not required to make use of any language-model service for this, but if you have access to one that you like, it could be an interesting option to try to incorporate it.

What you should do will vary somewhat between the two game options (Backgammon, and Baroque Chess).

Backgammon Suboption

If your choice of game is Backgammon, play the normal game, including using the doubling cube.

Also, adjust the agent's use of the move generator (or alter the generator if you prefer) to be able to move properly when the dice turn out to be doubles (e.g., a pair of 5s should result in a move equivalent to handling four separate dice showing 5).

If you did not implement Zobrist hashing in Assignment 3, you should do so now in this option, and instrument it to keep track of how often it gets used (misses, hits, etc.) so that information can be reported at the end of a game.

Baroque Chess Suboption

If your choice of game is Baroque Chess, add the following feature to your program (in addition to the chatting capability already mentioned):
A "transparent mode" of play in which the program reveals performance information related to ply used, alpha-beta cutoffs, static evaluation counts, time spent, and Zobrist hashing statistics. Report on how deep the alpha-beta search was able to go (in iterative deepening) within the alloted time for a move.

Then, by taking advantage of the statistics provided, find ways to tune your agent's implementation to make it play better. For example, by appropriate ordering of descendants at certain levels (using hashed state values or even a separate, easy-to-compute static evaluation function) you may be able to increase the number of alpha-beta cutoffs in such a way that you increase the effective depth of the search within the same time limit.

Special Requirements for Option B

Provide one more more game transcript files that document the playing of particular games with an opponent, or if necessary, a different instance of the same agent.

Report on the results of instrumenting and enhancing your agent. How much of an improvement did Zobrist hashing result in? Were you able to improve cutoffs with good ordering of descendants? If so, how and by how much?

Finally, reflect on what might yet be done to make your agent play better. Would it be some sort of machine learning?