August 16th, 2024

Supporting game design with evolutionary algorithms

Evolutionary algorithms optimize game parameters in complex games, enhancing gameplay diversity and competitiveness. The Grailbots demo illustrates Utility AI, emphasizing the need for effective fitness functions in game design.

Read original articleLink Icon
Supporting game design with evolutionary algorithms

Evolutionary algorithms (EAs) are increasingly being utilized in game design to optimize game parameters by simulating various scenarios, particularly in complex games. These algorithms help balance character classes or unit types in multiplayer online games, ensuring no single strategy dominates gameplay. The article discusses a proof of concept using a demo called Grailbots, which showcases the Utility AI technique. In this demo, two teams of AI-controlled characters compete, with the goal of having the Grailbots win by a narrow margin against waves of enemies. The use of EAs allows for the automatic selection of optimal parameters to achieve this design goal. EAs are inspired by natural selection and involve maintaining a population of potential solutions that evolve over time through processes like mutation and crossover. The article also emphasizes the importance of designing a good fitness function, which evaluates the quality of solutions and can be deterministic or non-deterministic. Effective fitness functions are crucial for the successful application of EAs in game development, as they directly influence the optimization process.

- Evolutionary algorithms optimize game parameters by simulating various scenarios.

- The Grailbots demo illustrates the application of Utility AI in balancing gameplay.

- EAs mimic natural selection, evolving solutions through mutation and crossover.

- A well-designed fitness function is essential for effective optimization in game design.

- EAs can enhance gameplay diversity and competitiveness in multiplayer settings.

Link Icon 7 comments
By @programd - 6 months
The whitepaper on the Grail framework is interesting [1]. It's an AI C++/C# framework you can use in game development.

I would call it a very good implementation of "old school" AI, where the behavior of your actors is all about utility curves, Monte Carlo search, and genetic algorithms. Basically all math/algorithm based stuff, kind of like old expert system AI implementations.

Of course "new school" AI is all about neural networks that can automatically learn those complex actor behaviors without the developer explicitly specifying all those mathematical algorithms.

Like many people here I'm very interested in working on hooking up modern "new school" AIs to virtual worlds, so it's very interesting to see Grail as a good concrete example of the algorithmic approach to game AI. I suspect some hybrid fusion of both approaches may give us some interesting and fun AI behavior.

[1] https://grail.com.pl/media/Grail_Whitepaper_June_2021.pdf

By @pfdietz - 6 months
Oh wow, this kind of idea goes way back, to Doug Lenat's Eurisko. Good old fashioned AI. He famously used that to craft winning strategies for Traveller Trillion Credit Squadron, a non-computer game.

Today's game designers might use this sort of thing to find game-breaking exploits before those damned players do.

By @NotGMan - 6 months
Optimal gameplay balance != fun gameplay.

Many games were ruined post-release because developers tried to make the gameplay "more balanced". This usually leads to everything feeling the same.

Helldivers 2 was a good recent example, which is suprising since it's not a PvP game at all but a co-op PvE only.

By @Rhapso - 6 months
Missing the OG: NERO https://nn.cs.utexas.edu/nero/about.php

NEAT is really well suited to modeling behaviors in a less structured way and gets used to play videogames.

By @jncfhnb - 6 months
Seems unlikely to work imo. Games need to account for the fact that 90% of the player base will be deeply unskilled and the remaining 10% will be tightly invested in a meta of dominant strategies. You’d need the bots to be able to consider this and also not just equalize every character.
By @shortrounddev2 - 6 months
I think Quake 3 used a bit of genetic algorithms to optimize some of the variables of the bots
By @aschearer - 6 months
Programmers always want to automate content creation. I get it as I’m a coder and it’s a fun problem space. Plus creating content is super time and skill intensive. It’s really hard to get right in my experience. Kind of like trying to automate writing a novel…

OK I read the article. I'm very skeptical of this approach. I doubt we can actually uncover fitness functions that reliably maps to "fun", and I believe it would require huge engineering effort to keep the game "simulable." Their examples aren't convincing. What would be convincing is a full, complex, and _fun_ game using these techniques.

Also the article seems like an ad for their AI solution.