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.
Follow the appropriate channel at Gamedev Discord!
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…)
24.1.2023, 8:30, S6
31.1.2023, 8:30, SW2
7.2.2023, 8:30, S6
Note that each lecture is associated with Q&A link, GDrive doc where you can anonymously post your questions or write ideas!
|AI for StarCraft: Brood War
|Introduction lecture about the complexity of creating artificial player for StarCraft: Brood War
|Basics of AI player modeling, Forward model,
|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):
|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).
|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.
|Real-time Strategy Game Combat
|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.
|MCTS – Introduction
|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.
|Introduction of the second assignment: implementing MCTS in a game of chess.
|MCTS Enhancements – Part I
|We will be going through various MCTS modifications / improvements.
|MCTS Enhancements – Part II
|We will be going through some more MCTS modifications / improvements.
|PGS and NGS
|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.
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.