Mario Meets Pareto

Mario Meets Pareto: Step on the Front Line and Beat your Friends

马里奥遇见帕累托:踏上最优前沿,击败你的好友

Written by Antoine Mayerowitz 作者:Antoine Mayerowitz

In Mario Kart 8, choosing your driver, kart’s body, tires, and glider isn’t just about style — it’s as crucial as your racing skills to win a race. Ever wondered how to truly find the best ones? For each of those four elements, you have tens of options. For each option, there are distinct statistics (speed, acceleration, …) affecting your performance. This adds up to an unbelievable amount of builds to choose from. 在《马里奥赛车8》中,选择车手、车身、轮胎和滑翔翼不仅仅是为了美观,它与你的驾驶技术一样,是赢得比赛的关键。有没有想过如何真正找到最优配置?这四个组件中的每一个都有数十种选择,而每种选择都有影响你表现的独特属性(速度、加速度等)。这导致了令人难以置信的组合数量。

Hopefully, many choices are just stylistic — they have identical statistics — but even after ignoring those duplicates, it remains a tough job to navigate the thousands of options. Is there any chance to find the best build or is it just luck? Should you favor speed to be the fastest, or acceleration to quickly recover after taking a hit? Let me show you a solution proposed over a century ago by economist Vilfredo Pareto. 幸运的是,许多选择仅仅是外观上的差异——它们的属性完全相同——但即使忽略这些重复项,要在数千种选项中做出抉择依然是一项艰巨的任务。找到最佳配置是有可能的,还是纯粹靠运气?你应该追求速度以保持最快,还是追求加速度以便在被撞后迅速恢复?让我为你展示一个由经济学家维尔弗雷多·帕累托(Vilfredo Pareto)在一个多世纪前提出的解决方案。

Finding the fastest driver is as simple as ranking them by their speed statistic. Here you might think that Bowser or Wario are a no-brainer. But you can’t just rely on speed to find the optimal build. You have to consider one as well. Now, finding the best driver/body/tire/glider is not trivial anymore — you have to make trade-offs between speed, acceleration, handling, weight, off-road, and mini-turbo. 寻找速度最快的车手很简单,只需按速度属性排名即可。你可能会认为库巴(Bowser)或瓦里奥(Wario)是不二之选。但你不能仅靠速度来寻找最优配置,你还必须考虑其他因素。现在,寻找最佳的车手/车身/轮胎/滑翔翼组合不再简单——你必须在速度、加速度、操控性、重量、越野性能和迷你涡轮加速之间进行权衡。

Look closely though! You’ll find out that some options are always dominated. Let’s focus on this poor Koopa for instance. Cat Peach has more speed for the same acceleration, and Toadette has more acceleration for the same speed. Between you and me, if you want to win, never allow Koopa to sit in your kart! 仔细观察!你会发现有些选项总是处于劣势(被支配)。以可怜的库巴龟(Koopa)为例:猫咪碧琪公主在相同加速度下拥有更高的速度,而奇诺比珂在相同速度下拥有更高的加速度。私下说一句,如果你想赢,千万别让库巴龟坐在你的赛车里!

You can identify all efficient drivers that, unlike Koopa, are never dominated on both speed and acceleration. Together, they form what is called the Pareto front (or frontier). Mind you: not all elements of the frontier are equally good. You probably won’t pick a driver sitting on the edge of the frontier because you want some balance between speed and acceleration. The Pareto efficiency is an objective criteria to filter out suboptimal choices, but you still need to make up your final decision. 你可以识别出所有高效的车手,他们不像库巴龟那样在速度和加速度上都被其他角色超越。他们共同构成了所谓的“帕累托前沿”(Pareto front)。请注意:前沿上的所有元素并不一定同样出色。你可能不会选择处于前沿极端位置的车手,因为你需要在速度和加速度之间寻求平衡。帕累托效率是一个过滤掉次优选择的客观标准,但最终决定权依然在你手中。

Given your play style and skills, you may put more weight on one statistic over the other. Those preferences will reveal the component on the frontier that suits you the best. 根据你的游戏风格和技术,你可能会更看重某一项属性。这些偏好将揭示出前沿上最适合你的组件。

In practice, you not only choose a driver, but a full set of body, wheels, and glider. In the next section, I’ll display every build as a distinct point. It will however make the number of choices explode. But Pareto’s with us! 在实践中,你不仅要选择车手,还要选择整套车身、轮胎和滑翔翼。在下一部分中,我将把每种配置显示为一个独立的点。这会使选择的数量呈爆炸式增长,但帕累托与我们同在!

We’ve had a bit of fun here, but don’t you see the pattern? We’re often faced with similar trade-offs. You want a meal that’s both cheap and delicious? A job that’s both well-paid, easy, and fulfilling? A portfolio with low risks and high returns? A flexible and strong material that’s also easy to produce? A fair taxation that remains efficient? A high quality LLM that is also fast and cost-efficient. In all these cases, you’re facing a multi-objective optimization problem, and you have to make trade-offs. 我们在这里玩得很开心,但你没发现其中的规律吗?我们经常面临类似的权衡:想要一顿既便宜又美味的饭菜?一份既高薪、轻松又充实的工作?一个低风险、高回报的投资组合?一种既灵活、坚固又易于生产的材料?一种既公平又高效的税收制度?一个既高质量又快速且具有成本效益的大语言模型(LLM)。在所有这些情况下,你都面临着多目标优化问题,必须做出权衡。

Of course, if you already know the exact weights you want to assign to each dimension (i.e., you know your utility function), you reduce the problem to a single objective optimization. This is because you can combine the dimensions with the weights into a single quantity to optimize (often called utility, cost, or fitness). In that case, you don’t need Pareto at all. But you’re often faced with situations where your utility function is unknown or uncertain. In those situations, the Pareto front helps you eliminate objectively all the sub-optimal options. It won’t reveal the one best option right from the outset, but you may now experiment with these efficient options and select the one that fits you the best. 当然,如果你已经知道要分配给每个维度的确切权重(即你知道你的效用函数),你就可以将问题简化为单目标优化。这是因为你可以将各个维度及其权重合并为一个需要优化的单一数值(通常称为效用、成本或适应度)。在这种情况下,你根本不需要帕累托。但你经常会遇到效用函数未知或不确定的情况。在这些情况下,帕累托前沿可以帮助你客观地剔除所有次优选项。它不会直接告诉你唯一的最佳选择,但你可以通过尝试这些高效选项,选出最适合你的那一个。

Acknowledgments 致谢

I’ve made some simplifying assumptions in this article to keep it readable for a large audience. In truth, the statistics that I presented are translated into derived in-game stats that are not always linear with the base statistics. Additionally, there are 4 speed stats and 4 handling stats for all gears (except for the driver), but I decided to simply average those. I’ve also completely hidden the functional form of the utility function, which can play a great role. To get access to more details behind this article or if you just like my work and want to see more in the future, please consider donating some coins. 为了让文章更易于大众阅读,我做了一些简化假设。事实上,我展示的属性是转化为游戏内衍生属性的,它们并不总是与基础属性呈线性关系。此外,所有装备(车手除外)都有4项速度属性和4项操控属性,但我决定简单地取其平均值。我还完全隐藏了效用函数的函数形式,而它在实际中起着重要作用。如果想了解本文背后的更多细节,或者你喜欢我的工作并希望未来看到更多内容,请考虑捐赠一些硬币。

Credits 参考资料

  • Super Mario Wiki
  • Mario Kart 8 Deluxe in-game statistics
  • Henry H. Mario Kart and the Pareto Frontier, 2015