Assignment 3: Adversarial Search |
CSE 415: Introduction to Artificial Intelligence The University of Washington, Seattle, Winter 2024 |
The reading for this assignment is
Search
in The Elements of Artificial Intelligence with Python.
|
Due Wednesday, January 31 at 11:59 PM. Partnerships are optional for this assignment. |
Here is the starter code for this assignment. |
A. Introduction K-in-a-Row In this assignment, you'll create a program that implements an agent that can participate in a game of K-in-a-Row with Forbidden Squares (defined below). Then you'll demonstrate your agent, providing one or more transcripts of the agent playing against another agent. |
PART I: Agent Code (80 points).
Your program should consist of a single file called minimax_agent.py .
Your program will consist mainly of a collection of specific functions, for playing games of "K in a Row". We define a K in a Row game as a kind of generalized Tic-Tac-Toe with the following features:
The starter code consists of several files: Files you will modify and turn in:
Files you should read and understand:
Other files:
Please do not add any additional files. Keep all the code for your agent in
|
Running a Game:
You will use the file |
Running Local Tests:
You can use the file |
PART II: Game Transcript (20 points).
As part of your turn-in, you will submit at least one game transcript. Follow the instructions above along with the guidelines below to run the game and generate your transcript.
Using the
Set up the match so that your agent plays 'X' and your opponent plays
'O'. Use the following game instance for your match. Your agent
should play X and the opponent should play O. For this run, you
should set a time limit of 1.00 seconds per move (e.g., by editing the
appropriate line of code near the bottom of the
The following is the representation of the initial board in a KinARow game called "5 in a Row on
7-by-7 board with Corners Forbidden". This can be found in [['-',' ',' ',' ',' ',' ','-'], [' ',' ',' ',' ',' ',' ',' '], [' ',' ',' ',' ',' ',' ',' '], [' ',' ',' ',' ',' ',' ',' '], [' ',' ',' ',' ',' ',' ',' '], [' ',' ',' ',' ',' ',' ',' '], ['-',' ',' ',' ',' ',' ','-']]
Make sure to set the correct options in |
Extra Credit Options
There are 2 ways to get extra credit in Part I and 3 ways to get extra credit in Part II for a max
of 25 points of extra credit. If you do any extra credit, you will also submit a file
in Part I:
|
Competition Option.
After your program is working, you may choose to take steps to qualify for the competition if you
wish. To enter the competition, first your agent must qualify, and then you submit your evidence of
qualification. For your agent to qualify, you must indicate so in
|
What to Turn In.
Turn in both your |
Updates and Corrections
If necessary, updates and corrections will be posted here and/or mentioned in class or in
ED.
|