Artificial Intelligence for Computer Games (Winter 2021/22)

This course is oriented at creation of artificial players of computer games. We will focus especially on games, for which a forward model can be created and thus a search-based methods of artificial intelligence could be used.  We will be dealing neither with navigation and path-finding (that is covered by NAIL068) nor neural networks and evolution algorithms (as they are taught elsewhere). Instead, we will be connecting on Artificial Intelligence I (NAIL069) with search-based methods suitable for games, e.g., Monte Carlo Tree Search, and with various suboptimal heuristic approaches for modeling game trees in video games.


News

Follow the appropriate channel at Gamedev Discord!
https://discord.gg/c49DHBJ


Dates

Lectures + Labs: Mondays, 9:00, SW2 (we start 4.10.2021)


Course Exam

There will be an oral examination done during the examination period. Find the (preliminary) list of topics for the oral examination in this document. (Will be updated for 2021/22 at the beginning 2022-Jan).

Exam dates:

To be decided.


Lectures

Note that each lecture is associated with Q&A link, GDrive doc where you can anonymously post your questions or write ideas!

Lectures Schedule

No. Date Topic Content Slides
1. 4.10.2021 AI for StarCraft: Brood War
Lecture
Introduction lecture about the complexity of creating artificial player for StarCraft: Brood War
(non-DNN way).
PDF
2. 11.10.2021 Basics of AI player modeling, Forward model,
A*-based agent
Lecture
We will be talking about how to think of AI player, what’s its position (abstractly) in the code,
how it usually interacts with the rest of the game code base, what are considerations there.
The we contrast it with common intelligent agents models (reflex based agent and model/goal
based agent) showing the correspondence. This will lead us to acknowledge, an agent needs
some game model in order to be able to lookahead. Better the game model, better the lookahead.
While having ad-hoc stuff (like for navigation in 3D open worlds), we can have separate game
abstractions serving its purpose, if we want to do smart things, we need to be able to “simulate
the game”. Extreme stance is then game “forward model”, which is constructed to simulate
the game in its entirety. We will coin an example of SuperMario Framework (Java) and AI
we (mainly David Šosvald) developed at MFF, showing how A*-based agent is constructed there
including aggressive game space pruning.

Details on A* algorithm (in case you’ve never implemented one): WikiData, Wikipedia

PDF
HOMEWORK – PONG A-Star Agent Implement PONG game; implement its forward model; abstract AI player; implement A*-based
agent for the game. Provide measurements of your solution (forward model clone and advance
times, number of A* iterations your agent can do per second, roughly).

Resources: nCine (landing page, GitHub, Discord, my setup notes), Super-Mario AI (paper, GitLab)

3. 18.10.2021 Cancelled, I’m hosting lectures at Turkey!
4. 25.10.2021 PONG A-Star Agent
Lab / Open-discussion
We will be discussing your agents, even finished or in-progress giving tips and learning
from each other.
5. 1.11.2021 State-space search algorithms for turn-based games Here we will walk through standard min-max, alpha-beta, point at its weaknesses
especially for huge game trees and introduce Monte Carlo Tree Search as any-time stochastic
algorithm.
6. 8.11.2021 Cancelled, I’m hosting lectures at Turkey!
7. 15.11.2021 Lab 2
8. 22.11.2021 Real-time strategy game combat Here we will talk specifically how to model RTS combat, the problem of durative actions
and approaches we can use here.
9. 29.11.2021 Lab 3
10. 6.12.2021 MCTS in real-time strategy games In this lecture, we will look at several papers that were using MCTS in RTS games, describing
its trick discussing their pros and cons.
11. 14.12.2021 Lab 4
12. 20.12.2021 MCTS techniques In this last lecture we will look at the plethora of modifications proposed to MCTS algorithm.
13. 3.1.2022 Lab 5

The Credit

In order to gain the credit you will be required to choose and incrementally work on the semestral project. There are going to be a few homeworks as well! It is mandatory to do all the homeworks, deadlines are flexible 😉


Extra Links

Computational Complexity of Games and Puzzles

AI and Games YouTube Channel


Acknowledgement

https://gamedev.cuni.cz/wp-content/uploads/2018/10/logolink_OP_VVV_hor_barva_eng.jpg