arXiv:2106.01182v1 [cs.NE] 2 Jun 2021 iea possible as firs time the a of one “ describe In as Newman it sporadically. speedrunning, covered found formally only that works still specific is this on research [2] of donation USD scientific event’s 3,164,002.06 popularity, the to its 2020 52,519.83 Despite from to raised 2011 been has from total and [1] viewers rent 2020 Quick Done nyntrlta pernighsbcm ujc fvariou of subject become has speedrunning that natural only efficie most the in a very puzzles around mean solving order. going can to from This optimally game, track possible. the racing as on quickly depending as things different game given a of ihrwy o o fpaes pernigpeet the presents speedrunning these to players, object of strictly lot or challenge. run a ultimate the for has up way, referr speed That Either later to possible. techniques, glitches, as as special to consider fast video might as surrounding One sub-community game games. growing the rapidly speedrunnin again, a solve once to become to then leads And trying ultimately faster. deeper i.e. it approach getting solve This or to way faster. try another different even and a to game in changing the again into like once it options play different game, are There game? potenti of future. vision the in a addressed in be will results what This and suit solutions challenges. regarding assessed expected and spee presented and are the solving solving as problem well to for as both regard Visions presented problem. with optimization are discussed routing discuss is representations professional potential graph support their of to build concepts is Different nomenclature poi a are and categorizations is Important criticism. it infor formulating vital over so, extracting as an approac literature, provides do to speedrunning It routed, relevant algorithmically. trying To routing when or achieve discover of possible. needed problem on advance, the to models focuses time paper defining in disposal of This and community. planned challenges one’s amount the by be least at to must referred the means in all a goal using given i.e. a fast, game en icpiebidn evl notmzto,it’s optimization, on heavily building discipline a Being mechanics progression the traverse speedrunners so, do To h hrt rvnsedunn ieevent live speedrunning driven charity The favorite your finished time first you after remains What Terms Index Abstract .. ocre ihcmltn iegmsi sspeedy as in videogames completing with concerned [...] Sedunn ngnrlmast lyavideo a play to means general in —Speedrunning sedu,ruig rp oes optimization models, graph routing, —speedrun, 0000-0003-2711-6938 a trce aiu f2753concur- 237,523 of maximum a attracted has atisGroß Matthias [3]. ” Germany .I I. HK TH NTRODUCTION uoaigSedu Routing: Speedrun Automating oln ¨ vriwadVision and Overview wsm Games Awesome ainand mation 0000-0003-3751-5887 tdout nted itidZ¨uhlke Dietlind iwof view ability drun eling field Germany and ion. ing HK TH ed nt g, al h s s t . . oln ¨ detr title Adventure supported. which be by to means the tried are been so have are, they mechanics algorithmically. game optimization the as this diverse enhance to approaches tteedo h eto.Eupe ihti knowledge, this with Equipped section. the of the end formula the is criticism regardin at and made works are professi Connections scholarly support discussions. the to existing The nomenclature as community. on including well speedrunning, focuses the as (III) in speedrunning section used of as description terminology general the on ilb sda okn example. working a as used be will prahsadiest omlz h rbe of problem the formalize to ideas and approaches fti paper. this of ilsue srfrneaelse nthe in listed are reference as used titles Fina with problem. closes the this paper address the problem, to algorithms underlying design envi- to the proaches are define A models to Solutions discussed. Prospective Different approaches critically paper. these are challenges ter this emerging of and sioned focus main the egm-ierlsalrn fti atclrgm must game particular this also of can runs There all manipulation. hardware rules speedrun.com, any on game-wide are runs of There be all ban the to account. the apply take into e.g. that only a rules will with site-wide actual submit paper some on must this imposed rules runner but the rules each time, of Some proof completion [4]. of claimed here form reference of of the point accumulation concern as leaderboard, largest speedrun.c used footage website be its the uploaded the will on leaderboards, As by and listed proven runs. footage speedrun be rules, corresponding these to the by to run of often comply a community, must For game’s it the polls. These by . of on upon means imposed decided rules are are vary at rules there consistenc can is give runners, to goal the what and goal given other for However, each given the to possible. comparable a constitutes be To time what achieve widely. of and to disposal amount disposal one’s least one’s the at in means all using uigtecus fti ok itnosfmu Action- famous ’s work, this of course the During In pernigi eea en opa aefs,i.e. fast, game a play to means general in Speedrunning niindMdl n Challenges and Models Envisioned pern n Categories and Speedruns I S II. h eedo ed:Oaiao Time of Ocarina Zelda: of Legend The EDUSAND PEEDRUNS ocuin n Outlook and Conclusions V eto lbrtso osbeap- possible on elaborates section (V) 0000-0002-8969-4795 oi Naujoks Boris Germany HK TH I) hswr elaborates work this (II), C ATEGORIES oln ¨ Ludography I)scinpresents section (IV) V) l game All (VI). eae Work Related tteend the at routing ( OoT onal lly, om ted As f- y g ) , comply to. Most of the site’s leaderboards additionally list assisted by tools, such as being able to create exact game multiple categories for the same game. These categories are state save points at arbitrary times. Every input for every defined by different rulesets for a game’s speedruns, each frame or simulation step in the game is handcrafted and with their own leaderboard. Although multiple games might scripted beforehand and then played back to create a perfectly share similar categories, this does not necessarily mean any optimized speedrun. TASs are often created to demonstrate similarity beyond the names. The underlying rulesets can differ what could be theoretically achieved in a perfect run, or just largely from game to game. Popular categories for many games for entertainment. A variation of TASs are Low Optimization are any%, 100% and Glitchless. Tool Assisted Demonstrations (LOTADs as referred to in the speedrunning community), which usually demonstrate more any% Runs under the category any% usually don’t have any exotic ways of playing a game or are used as reference for additional rules imposed on them, other than getting from other runs. a defined starting state to a defined ending state by any means possible, while respecting community-wide rules. One challenge that every speedrun, regardless of category, The name is derived from the fact, that any percentage has to accommodate is routing. With regard to speedrunning, of the game might be completed before ending the run. routing is the act of planning out a playthrough of a game in This also usually means that these speedruns involve a lot a fashion that needs the least amount of time possible. Often, of unconventional gameplay using programming mistakes the game is broken down to individual events, depending on and inconsistencies in the game to lower the completion the game (locations or characters to visit, items to collect, time as much as possible. This unrestricted use of such checkpoints to drive by etc.). Then, a route trough the game glitches and exploits – both of which will be discussed in world has to be constructed, that covers all events needed more detail later on in Related Work (III) – often change for game completion. In many cases, specific vital events the gameplay to a degree that makes the run look very have preconditions in form of other events, that have to different from a regular playthrough of the game. be incorporated into the route. A good route is crucial for 100% runs need to accomplish every objective in the game optimizing any given speedrun. That said, this statement of before completing it. The definition of “every objective in course holds only true as long as the player has any choice the game” has to be agreed upon by the community and on the ordering of the events. Perfectly linear games may not defined in the category’s ruleset. If the game provides a have a strong focus on routing, if any at all. completion percentage display, e.g. in a saving, loading or status menu, it is used as the authoritative reference III. RELATED WORK most of the time. The nature of these runs vary heavily Aside from the categories and nomenclature presented depending on the game being run. As there often are a lot earlier, there are also some scholarly works that categorize of objectives to achieve, the usage of glitches is prevalent. different aspects of speedrunning. Besides the gain in public Glitchless Sometimes, newfound glitches completely trivial- interest in speedrunning,only a small amount of such works on ize a game’s speedrun or parts of it. Other times, the this field has emerged approximately in the last decade. While game’s community finds a speedrun without glitches a lot of these works focus on the interesting narrative and more appealing to do or watch [5]. In such cases, the sociological consequences of the emergence of speedrunning glitches in question can be banned in the categories’ as a mode of play [3], [5]–[12], this body also includes rulesets, or Glitchless leaderboards can be created. As terminology and covers practical problems of speedrunning. the name suggests, Glitchless categories prohibit the Newman and Scully-Blaker both introduce nomenclature use of glitches, leading to runs more similar to casual regarding the nature of speedruns and the involved activities playthroughs. Again, what constitutes a glitch is agreed employed by speedrunners. upon by the community, as it is not a simple distinction [6]. Alternatively, the ruleset can list all allowed tech- niques, all banned techniques, or both. A. Newman’s Activity Categories Categories can be combined as applicable, e.g. OoT has, In a recent work, Newman [10] presents a thorough insight among others, an any%, a 100%, a Glitchless any% and a into the narrative consequences of speedrunning on the exam- Glitchless 100% leaderboard on speedrun.com. The resulting ple of OoT. They also introduce categories of speedrunning difference in permitted techniques and completion require- activity: hidden affordances, exploiting inconsistencies and ments have a heavy impact on the run. manipulation and reconstruction. Another important categorization of speedruns is the dif- hidden affordances In Newman’s definition hidden affor- ferentiation between a Tool Assisted Speedrun (TAS) and a dances can be broken down to optimally utilizing the Real- (RTA) run. RTA runs are performed by a designerly intended . For example in human in real-time. Although the term “speedruning” can be OoT going backwards is faster than going forwards, so seen as more of an umbrella term, RTA runs are the most speedruns almost always consist of Link (the protagonist prevalent form of speedrunning and are generally tied to the of most of the games from fran- term unless specified. A TAS, in contrast, is prerecorded and chise) walking backwards a lot of the time, which is referred to as backwalking1. While Newman also states exploits glitches within the game to break scripted se- that “‘designerly intent’ is, obviously, difficult to assert”, quences” [7], skipping and reordering game content at they use as much official documentation about the game will, as long as it serves the primary directive: speed. as possible to do so. Scully-Blaker also introduces the concepts of explicit rules exploiting inconsistencies is the most expressive designation. and implicit rules, implicit rules being the rules that a player Newman details it as “exploit[ing] programming bugs is supposed to follow and be restricted by, opposed to explicit and systemic errors in the code’s design and execution” rules that the game’s code actually imposes (e.g. the implicit [10]. An example of this would be clipping, a technique rule “The avatar cannot go through solid walls” opposed to used in speedruns of many games. Clipping refers to the the explicit rule “The avatar cannot go through solid walls, penetration of walls or other geometry in the game world except with a speed greater than 10 units per second and an the player is not supposed to go through. approaching angle greater than 85°”). manipulation and reconstruction The third category of ac- tivity is denoted manipulation and reconstruction. New- C. Routing man describes it as follows: As outlined at the end of the Introduction (I), speedruns have “The outcome of the technique is the creation of to be planned in advance, a procedure referred to as routing. a connection in code that is subsequently rendered Newman [3] writes: in polygonal space between regions in the game’s “FPSs [First-Person-Shooters] are favoured because spatial and narrative architecture that are as pal- of their apparent non-linearity and the scope they pably unintended by OoT ’s developers as they are seem to afford gamers to invent and create their own disruptive and apparently injurious to the integrity routes and develop their own styles that move them of the game’s myth.” [10] through the gameworld.” Activities of this category include techniques that con- Newman goes on to also include Role-Playing-Games (RPGs) sciously makes use of the game’s inner mechanics a into these thoughts. player would normally be unaware of. Creating tech- Speedrun routes consist of a number of events, connected niques like these in many cases requires extensive knowl- by dependencies, starting with the defined opening event and edge about the game’s logic and / or code. The Reverse ending with one or multiple possible ending events. The Bottle Adventure (RBA) technique for example makes problem of finding the ordering that takes the least amount of use of knowledge about the IDs that each in the time possible is combinatorial in nature. Some approaches to game internally is identified by. With this, executing very formalize and algorithmically address the problem of speedrun specific actions in the game can add or remove specific routing have been documented [14]–[16] but it is still under- items from the player’s inventory, based on the ID or represented in research. In these approaches, routing is usually amount of other items already in the player’s inventory defined as a graph shortest path problem. [13]. Lafond [14] takes the action-platform title Mega Man as These categories can help to define the earlier introduced term well as its successors Mega Man 2 and Mega Man 3 as glitch. Although there is no universal consensus in the commu- examples. One key feature of these 2D Jump’n’Run variants nity, activities that fall into Newman’s categories of exploiting is the aquisition of a new power after clearing each stage of inconsistencies and manipulation and reconstruction are often the game. These powers can be used to speed up subsequent referred to as glitches. This work will follow this specification. stages. All stages have to be cleared, while the order in which the stages are cleared is mostly left to the player. B. Scully-Blaker’s Speedrun Categories Lafond defines sets of stages S = {S1, ..., Sn}, with each In Scully-Blaker’s work [7], differentiations are made be- stage Si = {s1, ..., sk} being a set of events on which tween finesse runs and deconstructive runs, regarding the time can be saved during a run2. This time save depends on degree of glitch exploitation and . previously completed stages, giving sj : S → N as a function finesse runs are detailed as “runs in which the player inter- mapping each previously completed stage to a specific time 2 acts with the game as an extreme extension of what a save for each event . They continue to form a dependency game designer may consider an ‘ideal’ player [...] largely graph for a given game to be optimized, providing a route with respecting the game’s ‘narrative boundaries’ while nav- maximum time save through the game. Even under favorable igating them with an extreme of efficiency” [7]. Put assumptions, Lafond [14] proves this problem to be W[2]-hard differently, one could say a finesse run consists of playing [17]. a game as intended – as far as ascertainable – but very A more informal approach has been used by Iˇskovs [15] fast. with the working example of the popular game The Elder deconstructive runs on the other hand do not maintain any Scrolls III: Morrowind As a typical open-world RPG title, boundaries. These runs are “runs in which the player there is a lot of traveling, character skill development and Non- Player-Character (NPC) relationships involved in the game 1To put it in Newman’s words: “That which is in front of Link is space already consumed.” [10] 2Symbols altered from original to prevent ambiguities mechanics. The category Iˇskovs takes on is all factions, Given this relation between Newman’s and Scully-Blaker’s consisting of becoming the leader of all possible factions of terminology, connections to the leaderboard categories can be NPCs in the game. Taking into account the mentioned aspects drawn as well. As any% speedruns often seek to use whatever among others, they formed an extensive quest dependency means possible to get to the defined end state, usage of glitches graph. Iˇskovs then continues to use an evolutionary algorithm is prevalent. More so, the used glitches can often be classified to generate and improve on possible routes through the game as Newman’s exploiting inconsistencies or manipulation and progression. A lot of handcrafted customizations are then reconstruction activities, therefore these runs often range more applied to minimize the run’s time even further. This yields in the realm of deconstructive runs. On the other side of the a very specific routing tool for a single game. At the time spectrum there are the Glitchless leaderboard categories, which of writing, there is only one entry in the corresponding are governed by strict rules, mostly oriented on narratively and leaderboard on speedrun.com, the creator of which learned designerly intentions. As such, these runs can be categorized the route from Iˇskovs’ efforts [18]. more in the realm of finesse runs. Another informal example of algorithmic routing has been In a recent work, Ricksand [6] expresses disagreement with conducted by speedrunner JaV [16], who breaks down a Scully-Blaker’s categorizations, listing lack of a definition of track in the car racing game TrackMania Nations Forever the term glitch, lack of definition of completion requirements to a variation of the travelling salesperson problem. Track and inconsistencies in definition of an ideal player as reasons. completion in this game is done by passing a number of However, considering distinctions already made in this paper, checkpoints. In JaV’s approach, these checkpoints are repre- Scully-Blakers categories are considered suitable here. As a sented as a complete weighted digraph. They then manually slight addition, Scully-Blaker’s definition of an “ideal player” remove specific implausible edges from the graph and use a can be extended by means of Newman’s hidden affordances, genetic algorithm [19] to generate near-optimal solutions. The which then would include more techniques challenged by used algorithm had to be adapted to avoid certain implausible Ricksand like backwalking. combinations and the solutions had to be curated, i.e. manually Ricksand also questions the current procedure of rule ac- test-driven in the game to check for plausibility. Though this quisition in the speedrunning community. In their work, they adaptions resulted in a specialized tool, it is one of the rare suggest that the current process of voting on rulesets is examples that led to an improvement on the leaderboard times flawed because it results in rules being arbitrary. However, the of a game. argument can be made that speedrunning in its very essence is Taking it to the extreme, the process of routing can further arbitrary. Ultimately, Ricksand proposes the following model: be broken down to single simulation steps of a game’s engine. “Mechanic m in game g is allowed in a glitchless In 2009, a competition has been conducted with “The focus speedrun if and only if use of m does not contradict [...] on developing controllers that could play a version of the fictional truth regarding the world in which the Super Bros as well as possible” [20]. The competition story of g takes place.” [6] brought forth a number of submitted tools and algorithms to Not only does this not account for any technical glitch that automate playing a variant of the popular game Super Mario doesn’t get reflected by anything in the game world, it also World. The winner of the competition modeled the game state introduces the concept of fictional truth in order to legitimize of each simulation step as a node of a graph, and each possible glitchless rulesets. Fictional truth however is partly up to the next state (depending on different inputs) as adjacent nodes. audience of a narrative [22], rendering it arbitrary. Then, the shortest path to the goal – or, as an approximation If nothing else, this disagreement shows the difficulty in within available knowledge, to the right screen edge – was deciding what should be categorized as a glitch, in scholarly determined through a variation of the A* algorithm [21]. The work as well as in the speedrunning community. second and third best contributors of the competition used The 2009 Mario AI Competition [20] did yield a number similar approaches. of good performing agents. This competition can be seen as a TAS creation competition: Although there were no input prerecordings and the competition scoring incentivised total D. Criticism progression amount rather than speed, the submitted agents Glitches are often what differentiates Scully-Blaker’s cate- often played the game extremely fast. Those efforts resemble gories of runs from each other. Scully-Blaker’s definitions of TASs rather than RTA runs and have mostly been focusing on run categories can be supported by Newmans terminology of what will be called operational level routing or operational activities. While finesse runs drive hidden affordances to the routing in this paper, i.e. optimally planning or deciding on extreme but leave the scripted game sequence and narrative specific inputs at specific frames or simulation steps to reach structures mostly intact, deconstructive runs employ glitches a given short term goal or state. This focus and the success and make heavy use of them, often times distorting and/or of the developed tools is partly due to a property of the 2D- completely reassembling the event sequence. However, these platformer nature of the Super Mario titles – going right on two categories are not to be seen as distinct. The given the screen is almost always a save indication of progress. descriptions are more likely the two extremes of the space In fact, this metric has been used by the 2009 competition’s in which speedruns and their categories range. winner as an heuristic for the A* algorithm [20]. Optimizing the traversal of the game’s progression mechanic meant going mean to find the shortest path between node vα resembling the right as quickly as possible. However, this holds true only for starting event and vω representing the ending event – or a set the specific variation of the Super Mario title used (consisting Vω of ending events –, traversing all events Vr ⊆ V deemed only of horizontally oriented levels, progressing to the right) required by the category’s ruleset. and only if isolated levels are taken into account. In contrast, This rudimentary model already introduces several chal- to minimize the total time of an entire game’s completion lenges: as the previously presented works did, strategic level routing 1) Defining the Nodes: “Events relevant to the game’s or strategic routing is employed. As a result, speedruns of progression” is not defined and it is nontrivial to do so. games which rely heavily on strategic routing could not yet 2) Defining the Edges: The extend of “each possible traver- benefit from these advances. The strategic layer of planning sal between events” has underlying restrictions that have the traversal between levels – or, more generally speaking, to be defined as well. between different events, from a speedrun’s opening event to 3) Dynamic Weights: Edge weights are not consistent but an ending event – is generally what is referred to as routing rather change with graph traversal. in the speedrunning community as it is in this work. 4) Repeatable Events: A subset of the events can be In many cases, routing is not a one-time process. Espe- repeated once triggered, while others can not, further cially with deconstructive runs [7] with a high amount of increasing the complexity. inconsistency exploiting and manipulation and reconstruction 5) Multiobjective Optimization: The model does not ac- activities, routes are significantly reworked with new glitches count for any dimension other than time in a possible and exploits being found, due to their often disruptive nature route. regarding the game’s intended event sequence. This act of These challenges will be elaborated on in succession, fol- altering the game’s intended order of progression by means of lowed by possible ways to accommodate them within the glitches is referred to as sequence breaking in the speedrunning problem model. community. This leads to a challenge when defining the un- 1) Defining the Nodes: As for the definition of “events rel- derlying routing problem, as these often unpredictable changes evant to the game’s progression”, in the spirit of optimization in routing possibilities have to be accounted for. Glitchless it could be argued that only the items needed to qualify for speedruns can mostly be characterized as finesse runs [7], as the category should be involved, i.e. reducing (1) to the use of glitches is prohibited in these rulesets. Therefore, the routing underlies more consistent structures and can easier Gr = (Vr, Er, wr) , (2) be defined formally. Some challenging aspects of speedrunning have been en- with Er ⊆ E being the reduced set of edges remaining gaged by the presented works, others are yet left unaccounted between Vr – weighted by time of traversal wr – , as every- for. thing else would constitute a detour and thus cost additional overall time. Routing could be accomplished by finding the IV. ENVISIONED MODELS AND CHALLENGES shortest topological ordering of Gr. However, an optimization With the knowledge compiled to this point, models can be frequently employed by speedrunners renders this reduction defined. Given the outlined nature of the routing problem, unsuitable. graph representations will be favored. The presented models OoT speedruns make heavy use of the resources at the are considered visions that can be elaborated and improved player’s disposal, including but not limited to Link’s health, on rather than final solutions. Again, OoT will be used as the explosives (bombs and bombchus) and (in-game) time of day. working example and results may be less applicable to other A detour early on in a route to get more explosives can games or genres. significantly speed up the rest of the route, as many travelling times can be drastically reduced due to glitches using bombs as A. Weighted Game Event Digraph a key component. For example, the bombchu item – a moving, As a first approach, a weighted game digraph is assumed explosive device – is not required by many OoT categories, yet many speedruns start out their route by collecting the G = (V,E,w) , (1) nearest supply of bombchus in order to speed up the rest with nodes V = {v1, ..., vn} as the set of all events relevant to of the route enough to make it worthwhile. Thus, in fact, the game’s progression. Each possible traversal between these the opposite argument could be made: Expanding the set of events make up the set of directed edges E = {e1, ..., em} events by all possible item pickups and refill locations as well between the nodes representing the given events. Edges are as taking resource management into account can minimize the weighted with a function w : E → R, assigning each edge time even further. This obviously would increase the problem’s the time it takes to traverse between the in-game events in the complexity. given direction. Edge directions are considered as this traversal 2) Defining the Edges: The definition of “each possible time can differ by direction. Note that the term traversal is used traversal between events” depends on the focus of the route. as opposed to travel, as node traversal does not necessarily Considering only RTA viable routes this can be put as involve in-game movement. The routing process would then “humanly doable and complying to the category’s ruleset”. Finding all possible edges and assigning weights to them techniques require very precise inputs, sometimes precise to would require manually checking for category viability and the frame. Some techniques aren’t even possible to be per- timing the traversal between any two events in the game in formed by humans but are exclusive to TASs. Similarly, other both directions, which would be very time consuming and aspects can be taken into consideration when constructing error prone. To counteract this complexity increase, nodes can a route, like the aforementioned hidden gain or resource be clustered by spatial proximity. Events and items that are management. A consideration of possible changes to a graph very close to each other and / or obtainable by similar means model is given in section Vector Valued Game Graph (IV-C). can be clustered to single nodes. Another measure can be to approximate traversal times or using duration categories B. Weighted Game State Graph as integer numbers instead of actual timings, trading reduced One way to engage the challenge of Dynamic Weights complexity for uncertainties. (IV-A3) is to consider the nodes Vs of a state graph Gs, 3) Dynamic Weights: As suggested above, edge weights are reflecting game states, rather than events: not static, but can and frequently do change with the already traversed nodes and in some cases (e.g. when in-game time Gs = (Vs, Es, ws) (3) of day is involved) with time. Even when considering only required events Vr, the items collected can also enhance the Similar to a Weighted Game Event Digraph (IV-A) from (1), player’s ability to traverse the game world in a speedy fashion the edges Es represent traversals between different states of in different ways they may or may not be intended for. This the game, weighted by the time taken to do so ws. If these effectively changes the edge weights w while traversing the states account for all necessary elements described above game graph. This hidden gain can lead to faster overall routes (location, items, item counts, time of day, etc.) this would by taking detours early on that may have been undiscovered eliminate edge weight dynamics. However, this would lead to when only taking the starting weights into account. an immense increase of nodes and edges. In fact, the presence Lafond [14] partly accommodated this by weighting the of repeatable events would likely render this graph infinite. graph edges differently. For weighting an edge from stage Si to Sj they use the time saved in Sj as the result of doing Si C. Vector Valued Game Graph beforehand, rather than the time needed to traverse between The challenge of Multiobjective Optimization (IV-A5) can the stages. Considering multiple previously cleared stages and be taken into account by a graph thus possibly multiple ways of clearing a stage, it is assumed that for every event the immediate best alternative is used. Gm = (V,E, wm) , (4) The OoT equivalent for this would be to weight an edge from event vi to vj by the time saved by traversing vi before with a number n of weighting dimensions, which would vj . This could constitute a way to significantly simplify the yield vector valued edge weights and thus a vector valued n game graph, as many items and events do not provide any weighting function wm : Em → R . For example, a second time save and thus have no impact on traversal speed. vector element can be used to assign difficulty ratings to Another way to handle dynamic edge weights would be to graph traversals. This can be used to parameterize possible model game states rather than events as the graph’s nodes. routing algorithms by the runner’s skill level. When including Depending on the information considered for defining the TASs, very high difficulty ratings can be assigned to TAS-only states, this can lead to a very large amount of nodes. This is traversals. elaborated on in section Weighted Game State Graph (IV-B). Another possible application for vector valued edge weights 4) Repeatable Events: Some of the events mentioned above is to represent the hidden gain introduced in Dynamic Weights are repeatable, especially when considering item pickups and (IV-A3) as a vector element. This would constitute an approx- refills. For example, grass patches in OoT can drop bomb imation, but could be a useful reduction of complexity. Weight pickups when destroyed, and the patch regrows every time dynamics could be replaced by this. In case of repeatable the location is reloaded. Thus, to repeat and benefit from a events, this hidden gain value might decrease when the ac- desired event, it might be required to traverse to another node cording node or edge is traversed, to prevent indefinite looping. and back to the desired event’s node. Other events are one-time Also, difficulty and hidden gain ratings can be combined to only. This holds true for all pickups and items from chests as yield three-dimensional vectors. well as for most story progression events. These events’ nodes Vector valued edge weights open up the problem to mul- can be removed from consideration once traversed. Section tiobjective optimization [23], [24] and pathfinding algorithms Weighted Game State Graph (IV-B) discusses the possible im- [25], [26], resulting in non-dominated sets of possible routes, plications of this on a graph representation. possibly further increasing creativity and idea sparking in 5) Multiobjective Optimization: The objective of speedrun- speedrun routing. ning this far has only been considered a one-dimensional The events V and their traversals E can also be replaced by problem, solely dictated by time. While speed is in fact the states Vs and their respective traversals Es from (3), resulting primary directive of speedrunning, there is another dimension in a combination with a Weighted Game State Graph (IV-B), that can be taken into account: difficulty. Many speedrunning introducing all advantages and disadvantages pointed out there. V. PROSPECTIVE SOLUTIONS be improved on. In this case, routing algorithms can be seen After a model has been chosen to represent the rout- as a tool for speedrunners to support their routing efforts by ing problem, an optimization method has to be found. new influences. Moreover, there are speedrunners who enjoy All concepts outlined are again specific to OoT, appli- manual routing as an important part of speedrunning. Solving cability to other games and genres has to be assessed. this problem computationally would, if possible at all, render Good solutions should consider the challenges identified in this process obsolete. Envisioned Models and Challenges (IV) and look out for new, This work provides a first overview of works important unidentified challenges. Of course, solutions should also re- for the field of speedrunning. These are critically discussed spect the complexity of a given run. For example, a glitchless and relevant terminology is pointed out to support profes- route for a mostly linear game with finesse run characteristics sional discussion. Moreover, different approaches are pre- resembles different challenges than an any% route for a highly sented to model the identified speedrunning routing opti- non-linear game. mization problem and corresponding challenges are depicted. When modeling an Event Graph with traversal times as edge Finally, prospective solutions for the challenges are outlined. weights, conventional pathfinding algorithms like Dijkstra’s Future works can discuss further on one or more of the [27] or A* [21] are unsuitable given the edge dynamics. Same outlined approaches for modeling and solving the problem of applies to algorithms like Multiobjective A* [25] in the case speedrun routing. Applying the findings to other games and of vector valued edge weights. For edge weights to become genres can uncover further possibilities not apparent when only static, a State Graph with extensively detailed states is needed, focusing on a single game. vastly increasing the amount of nodes. As a final note, the topic suggests itself for competitions. Considering time save as edge weight similar to Lafond’s Participants can compete in different ways, such as finding approach [14] can simplify the graph. However, some edge the most accurate route representation model, solving given dynamics will still prevail, as some techniques need multiple representations, or of course creating a full route through a items to be collected or events to be triggered beforehand. given game. In the latter case, support of actual speedrunners Two of the presented works on speedrun routing [15], [16] would be needed to assess plausibility. employed evolutionary algorithms (EAs) [28]–[30] to handle LUDOGRAPHY the complexity involved. An approach using EAs for (multi- The Legend of Zelda: Ocarina of Time (OoT) objective) optimization [31], [32] seems promising, including Developed by: Nintendo (1998) assertions to exclude implausible combinations. Next to the Published by: Nintendo, Japan Platforms: implementation of different EA approaches, also the use of other metaheuristics is envisioned [33], [34]. For example, ant Developed by: Nintendo (1990) colony optimization algorithms [35] have already proved their Published by: Nintendo, Japan Platforms: SNES suitability to solve pathfinding problems [36], [37]. Mega Man / 2 / 3 Another possible approach is to conduct the traversal by an Developed by: Capcom (1987 / 1988 / 1990 resp.) agent, deciding further progression after every edge traversal. Published by: Capcom, Japan Platforms: NES Decision making can be conducted by above mentioned ap- The Elder Scrolls III: Morrowind proaches, combinations of them, or by other means, such as Developed by: Bethesda Softworks (2002) a neuronal network taking information about the graph and Published by: Ubisoft, France Platforms: PC (Windows), Xbox previous traversal as input. Applications of machine learning TrackMania Nations Forever for decision making in game agents – especially in form Developed by: Nadeo (2008) of deep reinforcement learning – suggest potential in this Published by: Focus, France; Enlight, USA; Deep Silver, Germany; Digital Jesters, UK approach [38]–[40]. With regard to edge dynamics, an agent Platforms: PC (Windows) must take Link’s inventory, the previously traversed nodes and REFERENCES edges as well as other relevant information into account to maintain the Markov property. [1] “GDQStat.us,” [accessed 13. May 2021]. [Online]. Available: https://gdqstat.us/previous-events/agdq-2020/?series=0 VI. CONCLUSIONS AND OUTLOOK [2] “GDQ Tracker - Event List,” [accessed 14. May 2021]. [Online]. Available: https://gamesdonequick.com/tracker/events/ Routing is an integral part of most speedrun categories [3] J. Newman, Playing with Videogames. London: Routledge, Jun. 2008. of most games. As such, having tools at disposal to auto- [4] “speedrun.com,” [accessed 17. May 2021]. [Online]. Available: https://www.speedrun.com/oot mate this process can greatly help speedrunners and open [5] R. Scully-Blaker, “Re-curating the Accident: Speedrunning as Commu- up complex games and genres to less experienced players. nity and Practice,” Masters, Concordia University, Sep. 2016. However, speedrun routing is hard, whether done manually or [6] M. Ricksand, ““Twere Well It Were Done Quickly”: What Belongs in a Glitchless Speedrun?” Game Studies, vol. 21, algorithmically. no. 1, Apr. 2021, [accessed 26. May 2021]. [Online]. Available: Given the complexity of OoT’s routing situation and the http://gamestudies.org/2101/articles/ricksand fact that despite its age new, heavily exploitable glitches and [7] R. Scully-Blaker, “A Practiced Practice: Speedrunning Through Space With de Certeau and Virilio,” Game Studies, vol. 14, techniques are being found to this day, it is unreasonable to no. 1, Aug. 2014, [accessed 26. May 2021]. [Online]. Available: assume that a globally optimal route will be found that can not http://gamestudies.org/1401/articles/scullyblaker [8] D. Ford, “Speedrunning: Transgressive play in digital space,” in Pro- [34] K. S¨orensen, “Metaheuristics—the metaphor exposed,” Inter- ceedings of Nordic DiGRA 2018, Bergen, Norway, Nov. 2018. national Transactions in Operational Research, vol. 22, [9] R. Scully-Blaker, “The Speedrunning museum of accidents,” no. 1, pp. 3–18, 2015. [Online]. Available: Kinephanos, no. Preserving Play, Special Issue, pp. 71– https://onlinelibrary.wiley.com/doi/abs/10.1111/itor.12001 88, Aug. 2018, [accessed 26. May 2021]. [Online]. Available: [35] M. Dorigo and G. Di Caro, “Ant colony optimization: A new meta- https://www.kinephanos.ca/2018/the-speedrunning-museum-of-accidents/ heuristic,” in Proceedings of the 1999 Congress on Evolutionary [10] J. Newman, “Wrong Warping, Sequence Breaking, and Running through Computation-CEC99 (Cat. No. 99TH8406), vol. 2, Jul. 1999, pp. 1470– Code,” Journal of the Japanese Association for Digital Humanities, 1477 Vol. 2. vol. 4, no. 1, pp. 7–36, 2019. [36] V. Rishiwal, M. Yadav, and K. V. Arya, “Finding Optimal Paths on [11] J. Hay, “Fully Optimized: The (Post)human Art of Speedrunning,” Terrain Maps using Ant Colony Algorithm,” International Journal of Journal of Posthuman Studies, vol. 4, no. 1, pp. 5–24, 2020. Computer Theory and Engineering, vol. 2, no. 3, pp. 416–419, Jan. [12] M. Hemmingsen, “Code is Law: Subversion and Collective Knowledge 2010. in the Ethos of Speedrunning,” Sport, Ethics and Philoso- [37] J. A. Mocholi, J. Jaen, A. Catala, and E. Navarro, “An emotionally phy, pp. 1–26, Jul. 2020. biased ant colony algorithm for pathfinding in games,” Expert Systems [13] “Reverse Bottle Adventure - ZeldaSpeedRuns,” [ac- with Applications, vol. 37, no. 7, pp. 4921–4927, Jul. 2010. cessed 14. May 2021]. [Online]. Available: [38] G. Lample and D. S. Chaplot, “Playing FPS games with deep https://www.zeldaspeedruns.com/oot/ba/reverse-bottle-adventure reinforcement learning,” CoRR, vol. abs/1609.05521, 2016. [Online]. [14] M. Lafond, “The complexity of speedrunning video games,” in 9th Inter- Available: http://arxiv.org/abs/1609.05521 national Conference on Fun with Algorithms (FUN 2018), ser. Leibniz [39] D. Ye, Z. Liu, M. Sun, B. Shi, P. Zhao, H. Wu, H. Yu, International Proceedings in Informatics (LIPIcs), H. Ito, S. Leonardi, S. Yang, X. Wu, Q. Guo, Q. Chen, Y. Yin, H. Zhang, L. Pagli, and G. Prencipe, Eds., vol. 100. Dagstuhl, Germany: Schloss T. Shi, L. Wang, Q. Fu, W. Yang, and L. Huang, “Mastering Dagstuhl–Leibniz-Zentrum fuer Informatik, 2018, pp. 27:1–27:19. complex control in moba games with deep reinforcement learning,” [15] A. Iˇskovs, “Travelling murderer problem: Planning a Proceedings of the AAAI Conference on Artificial Intelligence, Morrowind all-faction speedrun with simulated annealing,” vol. 34, no. 04, pp. 6672–6679, Apr. 2020. [Online]. Available: Apr. 2018, [accessed 13. May 2021]. [Online]. Available: https://ojs.aaai.org/index.php/AAAI/article/view/6144 https://www.kimonote.com/@mildbyte/travelling-murderer-problem-planning-a-morrowind-all-faction-speedr[40] S. Huang, C. Bamford, S. Ontanon,un-with-simulated-annealing-part-1-41079/ and L. Grela, “Gym-µRTS: Toward [16] JstAnothrVirtuoso, “Finding the Optimum Nadeo Cut... With Affordable Full Game Real-time Strategy Games Research with Deep Science!!” May 2019, [accessed 13. May 2021]. [Online]. Available: Reinforcement Learning,” 05 2021. https://www.youtube.com/watch?v=1ZsAjvO9E1g [17] R. G. Downey and M. R. Fellows, Parameterized complexity. Springer Science & Business Media, New York, 1999. [18] Volvy, “Reddit post about the Morrowind all factions speedrun route,” Nov. 2018, [accessed 31. May 2021]. [Online]. Available: www.reddit.com/r/speedrun/comments/9u1r9o/using ai to grind out routes/e91dg6w/ [19] J. Kirk, “Fixed Endpoints Open Traveling Salesman Problem - Genetic Algorithm,” May 2014, [accessed 14. May 2021]. [Online]. Available: https://www.mathworks.com/matlabcentral/fileexchange/21197-fixed-endpoints-open-traveling-salesman-problem-genetic-algorithm [20] J. Togelius, S. Karakovskiy, and R. Baumgarten, “The 2009 Mario AI Competition,” in IEEE Congress on Evolutionary Computation, Jul. 2010, pp. 1–8. [21] P. E. Hart, N. J. Nilsson, and B. Raphael, “A Formal Basis for the Heuristic Determination of Minimum Cost Paths,” IEEE Transactions on Systems Science and Cybernetics, vol. 4, no. 2, pp. 100–107, Jul. 1968. [22] G. Currie, “Fictional Truth,” Philosophical Studies: An International Journal for Philosophy in the Analytic Tradition, vol. 50, no. 2, pp. 195–212, Sep. 1986. [23] K. Miettinen, Nonlinear Multiobjective Optimization. Kluwer, Boston, MA, 1999. [24] M. Ehrgott, Multicriteria Optimization, 2nd ed. Springer, Berlin, 2005. [25] B. S. Stewart and C. C. White, “Multiobjective A*,” Journal of the ACM, vol. 38, no. 4, pp. 775–814, Oct. 1991. [26] M. Rajabi-Bahaabadi, A. Shariat-Mohaymany, M. Babaei, and C. W. Ahn, “Multi-objective path finding in stochastic time-dependent road networks using non-dominated sorting genetic algorithm,” Expert Sys- tems with Applications, vol. 42, no. 12, pp. 5056–5064, Jul. 2015. [27] E. W. Dijkstra, “A Note on Two Problems in Connexion with Graphs.” Numerische Mathematik, vol. 1, pp. 269–271, 1959. [28] T. Back, U. Hammel, and H.-P. Schwefel, “Evolutionary computation: comments on the history and current state,” IEEE Transactions on Evolutionary Computation, vol. 1, no. 1, pp. 3–17, 1997. [Online]. Available: https://ieeexplore.ieee.org/document/585888 [29] A. E. Eiben and J. E. Smith, Introduction to Evolutionary Computing, 2nd ed., ser. Natural Computing Series. Springer, Berlin, 2015. [30] K. A. De Jong, Evolutionary Computation: A Unified Approach. MIT Press, Cambridge, MA, 2016. [31] K. Deb, Multi-Objective Optimization Using Evolutionary Algorithms. Wiley, Chichester, UK, 2001. [32] C. A. Coello Coello, G. B. Lamont, and D. A. van Veldhuizen, Appli- cations Of Multi-Objective Evolutionary Algorithms , 2nd ed. World Scientific, New Jersey, 2007. [33] M. Gendreau, J.-Y. Potvin et al., Handbook of metaheuristics. Springer, Cham, Switzerland, 2019, vol. 3.