Tutorial for Artificial Intelligence I (NAIL069),
Winter 2019-20

Instructor: Adam Dingle

This is the tutorial (cvičení) in English for the Artificial Intelligence I course taught by Prof. Roman Barták. In this tutorial we'll review concepts from Prof. Barták's lectures and apply them to various exercises and problems. We will especially focus on using AI techniques and algorithms to play games and solve puzzles.

The tutorial happens from 9:00 – 10:30 on Tuesdays in room SU2. You can register for the tutorial in one of two groups, each of which meets every other week. If you have signed up for odd weeks (group A), your first session is on Oct 1. If you have signed up for even weeks (group B), your first session is Oct 8.

textbooks

The course uses this textbook:

You may optionally also consult the following book, which gives a nice overview of AI in gaming including some of the ideas we'll be exploring:

You can download a PDF of the Yannakakis text for free from the book's site linked above.

For learning Java, I recommend these books:

The Beginner's Guide book is a gentle introduction. If you are an experienced programmer in C# or other languages, you can probably skip the Beginner's Guide and just dive into the Complete Reference book.

You don't necessarily need the latest versions of these Java books, since we will not be using the latest language features much or at all.

other meetings

Feel free to stop by my office hours (Fridays from 13:00 - 14:30 in room 405) if you'd like to discuss any material from this class.

requirements

To earn a credit (zápočet) for the tutorial you will need to earn at least 70 points. You can earn points in two ways:

programming assignments

We will have 5 programming assignments throughout the semester. In each assignment you will write an AI agent that plays a particular game. I'll provide an implementation of each game in Java along with an API for your agent to use. You can write your agent in Java or in any other JVM-compatible language (e.g. Kotlin, Scala). For each game I will provide a suggested algorithm or approach, which we will discuss in class. You are however welcome to use any approach you like in your implementation as long as it performs just as well (or better!)

The assignments are

game

points

deadline

Git repository

suggested approach

Super Mario Bros.

10

Sun Oct 27

MarioAI

simple reflex agent

Ms. Pac-Man

20

Sun Nov 10

MsPacMan-vs-Ghosts-AI

uniform-cost search

Sokoban

20

Sun Dec 1

Sokoban4J

A* with custom heuristic

Warlight

30

Sun Jan 5

Warlight

expectiminimax or Monte Carlo tree search

Minesweeper

30

Sun Jan 26

Minesweeper4J

backtracking search for CSPs

Submit your assignment solutions to our ReCodEx server. If any assignment is submitted late, you will lose points per week (or 1 point/week for the Mario assignment) that has elapsed after the deadline, rounded up to the nearest week. For example, an assignment that is submitted 8 days late will lose 4 points. Try to submit assignments on time.

For the first four of these assignments we will have tournaments: I will compare all student submissions and will award extra points to the top performers. First place wins 15 bonus points; second place wins 10 points; third place wins 8 points; all other programs in the top 30% win 5 points. Your program will automatically be entered in the tournament if you submit it by the deadline.

semester project

You may complete an optional semester project to earn 35 points. In the semester project you will write an AI agent that plays a game of your choice using the techniques discussed in this course. Ideally you will be able to interface with an existing game implementation, but if necessary you can implement the game yourself (which is probably feasible only if it is relatively simple). Your semester project can be written in any language you like.

Before beginning your project you must send me a 1-paragraph proposal that explains the game implementation you will use, how you will interface to it, your overall algorithmic approach, and how you will evaluate your program's performance. I will approve your proposal if it seems reasonable, or may want to discuss it more first.

The deadline for submitting your semester project is Mon Jan 27. (You may submit it late, but you will lose 2 points per elapsed week, just like for the other assignments).

other notes

The final deadline for submitting all work for this tutorial is Wed Feb 12 in the last week of the exam period. But I suggest that you try to complete all work well before that, to avoid running into trouble at the end.

resources