赛道狂飙中国驿站|Trackmania in china|QQ群9890249

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 877|回复: 1

赛道狂飙工具辅助竞速|Trackmania TAS

[复制链接]
发表于 2022-12-25 11:47:45 | 显示全部楼层 |阅读模式
本帖最后由 hyp7617 于 2022-12-25 11:52 编辑

TrackMania and Tool-Assisted Speedruns简称TM TAS名词释义:赛道狂飙工具辅助竞速

Introduction
There has been recently quite some interest in performing scripted runs for TrackMania using external tools and for a reason. This interest was induced by certain controversial events and by the fact that some people actually started developing such tools for the game. Let’s uncover some details about TrackMania TAS’ing and also some related topics. This post will be a little Q&A for people who are interested. I will not talk about technical details here, these are deliberately left out.

Q: What is TAS?
A: TAS stands for Tool-Assisted Speedrun and it is basically creating a set of inputs that will be performed to achieve a certain goal within the game. Many games that have speedrunning communities also have TAS’es made for them. These runs are often clearly distinguishable and have separate leaderboards to not clutter „real” record leaderboards for humans. Since TrackMania is a highly competitive game and there’s always been interest for improving current world records, people started to develop tools to improve times.
Q: How does TAS work for TrackMania?
A: Most tools developed rely on creating a script with specific inputs that will be replayed at the run time. This is also the case for other games, but with the exception that these games are ran in an emulator – which means they have 100% reproducibility. Because TrackMania isn’t an „old” game and doesn’t run in the emulator – it is much harder to create such a script because of so-called desyncs. Basically, the script won’t always produce the same output. These desyncs come from the fact (over-simplification) that modern OS’es like Windows don’t run processes in „real-time”. However, it is possible to reduce the impact of these desyncs – but I won’t go into detail.

An example of a script can be:
0ms press up
1200ms press left
2440ms release left
4000ms press right
5500ms release right
6720ms press down

You can also slow down the game time, but this is rather just a helper to get the scripted inputs right.

Q: Is it hard to create a good TAS run?
A: Absolutely. TrackMania is one of these games that for 1 second in-game you need to spend hours to get that 1 second done even decently. This is due to the unbelievable complexity of the game and it’s mechanics. For each input change, you need to make sure that the car stays on the track and also has an optimal line. To do that, you need to restart the run, wait for the script to execute all inputs and then see the outcome for yourself. The longer the track is, the longer the process becomes. Plus, many tracks (especially Nadeo) have really good world record times already (one could say that they’re close to being maxed). These are the hardest to beat even for carefully prepared inputs but are by far the most popular tracks to TAS.



Q: Is it possible to distinguish between a TAS run and a run done by a human?
A: With the introduction of Competition Patch this is not a problem anymore, see TrackMania Competition Patch.

Q: Were there cases where these records appeared on TMX?
A: Yes, notably A04, B10 and C04 have had uploaded TAS’ed replays without any closure from their authors, both of which were removed after people started investigating and proved that these replays were indeed scripted.


Q: Where can I watch some of these runs?
A: These two ** channels uploaded some of runs that were tool-assisted:
https://www.**.com/user/TmSpeedy0407
https://www.**.com/user/Angecide

There are currently no one else uploading such runs to my knowledge.


Q: Are these tools available for download?
A: No, nobody including me released these tools to the public simply to keep the integrity of the leaderboards and to keep up the competitiveness of the game. Could these be published in the future? Maybe, but I believe this is mostly about a community agreement and not about trying to prevent people from misusing these tools.

I think that at least for now, this is a good thing. People who have access to these tools explicitly do not upload fake records to TMX, instead a ** video is made to showcase the replay. This ensures that both parties are happy.


Q: Is TrackMania „random”?
A: No, TrackMania physics are completely 100% deterministic. That means that the same set of inputs will always yield the same outcome in the game. For us, humans, certain behavior of the car can be „random” because it is not directly related to the inputs and doesn’t make sense, but that doesn’t mean that the underlying physics are based on any random factor. There just isn’t one.


Q: Can you create an AI to drive tracks perfectly?
A: To my knowledge there have been a few people that tried to create a neural network that would drive a track, but the keyword in the question here is perfectly. These networks could in theory drive a track but nothing more than that. These runs would be really basic and totally not what you would see from today’s world records. I haven’t seen any real results on driving tracks by an AI algorithm to this day.

There is really no „perfect” run existing in TrackMania (except for a few one-turn tracks).


Q: What about maxed records?
A: Besides a few tracks from the TMN ESWC campaign like A-0, there are no maxed records existing in TrackMania. What can look like a perfect run can be only closer or an approximation to a hypothetical real perfect time. Improving this time only brings us closer to that unknown limit. Of course, there can also be a human limit which most people really mean when they’re talking about a maxed record. This limit can be somewhat approximated based on a collection of world records previously set by drivers. By combining the best parts of these runs we can roughly say what would be the limit with current strategies.


Q: Can you write a script to discover a maxed record?
A: It’s possible to write a program to take some existing inputs and change them randomly to discover new runs but even that is hard enough. Searching for a real possible maxed record is completely unfeasible and impossible to do right now even on really short tracks. To really know the optimal time of a track, you would have to try out every possible input combination. It’s much more feasible to take an existing record and change random inputs in it to come up with a new combination that maybe faster than the original record.

But let’s just imagine that we want to find out a “maxed” record on the simplest Nadeo track with one turn: A-0. Let’s see how much combinations it would take to brute force it. The current world record is 04.39.

TrackMania checks for input every 10 milliseconds. Suppose we can only do keyboard inputs. That’s 4390ms / 10 = 439 possible slots in which we can press / release keys. So every 10 milliseconds we can change what keys are pressed.

At each slot we can have 16 possible input combinations since there are 4 keys you can press: up, down, left, right (2^4 = 16). You can press e.g: left, up and down exactly at the same time.

That’s 16^439 possible input combinations on this track. Given that this number far exceeds a 64 bit unsigned integer I won’t try to determine how much time it would take to go through all of these combinations. That’s on a track that is 4 seconds long. Now, most of these combinations would be completely nonsensical but they are still valid. You must admit though that this is pretty useless, but it shows how complex the TrackMania environment really is.



Info from:https://donadigo.com/tmtas
 楼主| 发表于 2022-12-25 11:55:23 | 显示全部楼层
介绍
最近人们对使用外部工具为 TrackMania 执行脚本运行产生了相当大的兴趣,这是有原因的。这种兴趣是由某些有争议的事件以及一些人实际上开始为游戏开发此类工具这一事实引起的。让我们揭开有关 TrackMania TAS'ing 的一些细节以及一些相关主题。这篇文章将为感兴趣的人提供一些问答。技术细节这里就不说了,这些都是特意省略的。

问:TAS 是什么?
答: TAS 代表工具辅助 Speedrun,它基本上是创建一组输入,这些输入将被执行以在游戏中实现特定目标。许多具有速通社区的游戏也有为他们制作的 TAS。这些运行通常是清晰可辨的,并且有单独的排行榜,以免混淆人类的“真实”记录排行榜。由于 TrackMania 是一款竞争激烈的游戏,并且人们一直对改进当前的世界纪录感兴趣,因此人们开始开发工具来缩短时间。

问:TAS 如何为 TrackMania 工作?
答:大多数开发的工具都依赖于创建一个脚本,其中包含将在运行时重播的特定输入。其他游戏也是如此,但这些游戏是在模拟器中运行的例外情况——这意味着它们具有 100% 的可再现性。因为 TrackMania 不是一个“老”游戏并且不在模拟器中运行——由于所谓的不同步,创建这样的脚本要困难得多。基本上,脚本不会总是产生相同的输出。这些不同步来自这样一个事实(过度简化),即像 Windows 这样的现代操作系统不会“实时”运行进程。然而,减少这些不同步的影响是可能的——但我不会详细介绍。


脚本示例可以是:
0ms press up
1200ms press left
2440ms release left
4000ms press right
5500ms release right
6720ms press down

您也可以减慢游戏时间,但这只是让脚本输入正确的一个帮手。

问:创造一个好的 TAS 运行很难吗?
答:当然。TrackMania 是其中一款游戏,您需要花费数小时才能在游戏中完成 1 秒甚至体面的 1 秒。这是由于游戏及其机制难以置信的复杂性。对于每个输入变化,您需要确保汽车保持在赛道上并且还有一条最佳路线。为此,您需要重新启动运行,等待脚本执行所有输入,然后亲自查看结果。轨道越长,过程就越长。此外,许多曲目(尤其是 Nadeo)已经创造了非常棒的世界纪录(可以说它们已经接近极限)。即使对于精心准备的输入,这些也是最难击败的,但它们是迄今为止 TAS 最受欢迎的曲目。

问:是否可以区分 TAS 运行和人工运行?
A:随着比赛补丁的推出,这不再是问题,请参阅TrackMania 比赛补丁。

问:这些记录是否曾出现在 TMX 上?
答:是的,特别是A04、B10和C04已经上传了 TAS 的回放,而他们的作者没有任何关闭,在人们开始调查并证明这些回放确实是编写脚本后,这两个文件都被删除了。

问:我在哪里可以观看其中一些跑步?
A:这两个 ** 频道上传了一些工具辅助的跑步:
https://www.**.com/user/TmSpeedy0407
https://www.**.com/user/Angecide


据我所知,目前没有其他人上传此类运行。

问:这些工具可以下载吗?
答:不,包括我在内的任何人都不会仅仅为了保持排行榜的完整性和游戏的竞争力而向公众发布这些工具。这些可以在未来发布吗?也许吧,但我相信这主要是关于社区协议,而不是试图防止人们滥用这些工具。

我认为至少就目前而言,这是一件好事。有权访问这些工具的人明确不会将虚假记录上传到 TMX,而是制作了一个 ** 视频来展示重播。这样可以确保双方都满意。

问:TrackMania 是“随机的”吗?
答:不,TrackMania 物理是完全 100% 确定性的。这意味着同一组输入在游戏中总是会产生相同的结果。对于我们人类来说,汽车的某些行为可能是“随机的”,因为它与输入没有直接关系并且没有意义,但这并不意味着基础物理是基于任何随机因素。只是没有一个。

问:你能创造一个 AI 来完美地驾驶赛道吗?
答:据我所知,有一些人试图创建一个可以驱动赛道的神经网络,但这里问题中的关键字是完美的。这些网络理论上可以驱动轨道,但仅此而已。这些跑步将是非常基本的,完全不是您从今天的世界纪录中看到的。直到今天,我还没有看到人工智能算法在驾驶轨迹上的任何实际结果。

TrackMania 中确实不存在“完美”的跑步(除了一些单圈赛道)。

问:关于最大记录?
A:除了一些来自TMN ESWC活动的曲目,比如A-0, TrackMania中没有满分记录。看起来完美的跑步只能更接近或近似于假设的真实完美时间。这次改进只会让我们更接近那个未知的极限。当然,也可能存在人为限制,这是大多数人在谈论最高记录时的真正意思。根据车手先前设定的一系列世界纪录,可以略微估计此限制。通过结合这些运行的最佳部分,我们可以粗略地说出当前策略的极限是什么。

问:你能写一个脚本来发现一个最大的记录吗?
答:可以编写一个程序来获取一些现有输入并随机更改它们以发现新的运行,但即使那样也很困难。搜索真正可能的最高记录是完全不可行的,即使在非常短的赛道上也是不可能的。要真正了解曲目的最佳时间,您必须尝试每一种可能的输入组合。获取现有记录并更改其中的随机输入以提出可能比原始记录更快的新组合要可行得多。

但是让我们想象一下,我们想要在最简单的 Nadeo 轨道上用一个回合找出一个“最大”记录:A-0。让我们看看需要多少组合才能对其进行暴力破解。目前的世界纪录是 04.39。

TrackMania 每 10 毫秒检查一次输入。假设我们只能进行键盘输入。那是 4390ms / 10 = 439 个可能的插槽,我们可以在其中按下/释放键。所以每 10 毫秒我们可以更改按下的键。

在每个插槽中,我们可以有 16 种可能的输入组合,因为您可以按 4 个键:上、下、左、右 (2^4 = 16)。您可以同时按例如:向左、向上和向下。

这条轨道上有 16^439 种可能的输入组合。鉴于这个数字远远超过 64 位无符号整数,我不会尝试确定完成所有这些组合需要多少时间。那是在 4 秒长的轨道上。现在,这些组合中的大多数都是完全荒谬的,但它们仍然有效。您必须承认,尽管这非常无用,但它显示了 TrackMania 环境的真正复杂程度。

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|赛道狂飙中国驿站|Trackmania in china|QQ群9890249 ( 蜀ICP备20016772号-1 )
赛道狂飙中国驿站 赛道狂飙中国驿站TM2020 点击这里给我发消息

川公网安备 51012202000677号

GMT+8, 2024-4-20 08:43 , Processed in 0.035434 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表