AI4G-5-Persistence Lecture Notes PDF
Document Details
Uploaded by ThrilledDenver
Loyola Marymount University
2024
Matthias Schubert
Tags
Summary
These lecture notes cover persistence in artificial intelligence for games. The document details various methods for persistence, such as naive snapshot, copy-on-update, wait-free zigzag, and wait-free ping-pong. It also discusses advantages and disadvantages for each method.
Full Transcript
Lecture Notes on Artificial Intelligence for Games Summer Semester 2024 Persistence Script © 2020 Matthias Schubert Overview requirements save games and replays state logs transition logs action logs persis...
Lecture Notes on Artificial Intelligence for Games Summer Semester 2024 Persistence Script © 2020 Matthias Schubert Overview requirements save games and replays state logs transition logs action logs persistence in virtual environments check-point-recovery methods Naive Snapshot Copy-on-Update Wait-Free Zigzag Wait-Free Ping-Pong Artificial Intelligence for Games 2 Why Persistence is important? 1. saving a part (gs ∈ GS) of the current game state allows resuming the game at another time (save game) create a consistent game state, in case of a system crash saving is only possible at certain locations (e.g. Resident Evil, Diablo III, …) certain parts are not saved (NPC position/Monster/Enemies, Random maps, …) 2. saving a replay of a game (gs1, …, gsend) allows for retracing and analyzing the course of the game usually saved on clients replays can grow quite large, depending on the format of stored data since the last GS is also part of the replay, replays could be used as save games as well Artificial Intelligence for Games 3 Requirements for Persistence Layers saving should not slow down the game ⇒ tick duration must not exceed the time limit save games should be as up-to-date as possible ⇒ if possible, GS should be saved every tick loading a save game is supposed to create a consistent state ⇒ all GE contained in the save game should be equally up-to-date ⇒ minimum requirement: the game state must be consistent (every GE appears only once, etc.) Important Impact Factors: size of the game state requirements on recency and tick frequency impact of loading time on recovery part of the game state/ history of the game to be saved Artificial Intelligence for Games 4 Methods for Replays and Save games Save-Game/Replay: local file containing the game state/ course of play State-Log: every game entity is saved every x ticks Þ sequential file containing a series of game states example: demo-files of Quake/Half-life/Counterstrike (parsed and transformed into XML) (Bachelor Thesis: J. Rummel 2011)