Artificial Intelligence for Computer Games (Winter 2022/23)

Contents

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: Wednesday, 17:20, SW2 (we start 5.10.2022)


Course Exam

There will be an oral examination done during the examination period. Find the list of topics for the oral examination in this document. (Might get updated…)

Exam dates:

24.1.2023, 8:30, S6

31.1.2023, 8:30, SW2

7.2.2023, 8:30, S6


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. 5.10.2022 AI for StarCraft: Brood War
Lecture
Introduction lecture about the complexity of creating artificial player for StarCraft: Brood War
(non-DNN way).
PDF
2. 12.10.2022 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
MP4
3. 19.10.2022 F.E.A.R. AI
Lecture
Let’s dive deep into the way how AI for the game F.E.A.R. was made and is still deemed to be
awesome in contemporary days (some even says it’s the best FPS AI ever).
PDF
4. 26.10.2022 Cancelled
5. 2.11.2022 A* Pong 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: Pong v1, Pong v2Homework:
Implement reactive “ball-tracking” AI, then implement AStar-based agent that can play against “ball-tracking” AI. Use max 0.05s thinking-time.  You will need to tinker game settings to create a game where “ball-tracking” AI can be beaten.
N/A
9.11.2022 Sport’s day Cancelled
6. 16.11.2022 Real-time Strategy Game Combat
Lecture
Here we will walk through standard min-max, alpha-beta applied to simultaneous games such as RTS combat. We will pinpoint the problem of simultaneous moves and propose way how to address that while still be able to you “regular recursive iterative deepening” min-max / alpha-beta. We will review basic terms from game theory along the way to ground the problem theoretically. PDF
7. 23.11.2022 MCTS – Introduction
Lecture
In this lecture, we introduce the Monte Carlo Tree Search algorithm and look at some of its theoretical foundations, namely the Monte Carlo method and the Multi-armed Bandit problem. PDF
8. 30.11.2022 MCTS Lab
Lab
Introduction of the second assignment: implementing MCTS in a game of chess.
Resources: Chess
PDF
9. 7.12.2022 MCTS Enhancements – Part I
Lecture
We will be going through various MCTS modifications / improvements. PDF
10. 14.12.2022 MCTS Enhancements – Part II
Lecture
We will be going through some more MCTS modifications / improvements. PDF
11. 21.12.2022 PGS and NGS
Lecture
Here we will visit algorithms, which are specifically tailored to search over script space via portfolio of possible scripts to assign to units and comment on their strengths and weaknesses. PDF

MP4

12. 4.1.2023 PGS Lab
Lab
Cancelled

The Credit

In order to gain the Credit you will be required to finish all the assignments handed out during the semester. There are no strict deadlines, however, you need to have the Credit before attending the exam.


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