# Can An AI Design A Good Game Level? 🤖

## Метаданные

- **Канал:** Two Minute Papers
- **YouTube:** https://www.youtube.com/watch?v=HnkVoOdTiSo
- **Дата:** 15.09.2021
- **Длительность:** 6:50
- **Просмотры:** 131,793

## Описание

❤️ Check out Weights & Biases and sign up for a free demo here: https://wandb.com/papers 
❤️ Their mentioned post is available here: https://wandb.ai/ayush-thakur/interpretability/reports/Interpretability-in-Deep-Learning-With-W-B-CAM-and-GradCAM--Vmlldzo5MTIyNw

📝 The paper "Adversarial Reinforcement Learning for Procedural Content Generation" is available here:
https://www.ea.com/seed/news/cog2021-adversarial-rl-content-generation

🙏 We would like to thank our generous Patreon supporters who make Two Minute Papers possible:
Aleksandr Mashrabov, Alex Haro, Andrew Melnychuk, Angelos Evripiotis, Benji Rabhan, Bryan Learn, Christian Ahlin, Eric Haddad, Eric Martel, Gordon Child, Ivo Galic, Jace O'Brien, Javier Bustamante, John Le, Jonas, Kenneth Davis, Klaus Busse, Lorin Atzberger, Lukas Biewald, Matthew Allen Fisher, Mark Oates, Michael Albrecht, Nikhil Velpanur, Owen Campbell-Moore, Owen Skarpness, Ramsey Elbasheer, Steef, Taras Bobrovytsky, Thomas Krcmar, Timothy Sum Hon Mun, Torsten Reil, Tybie Fitzhugh, Ueli Gallizzi.
If you wish to appear here or pick up other perks, click here: https://www.patreon.com/TwoMinutePapers

Thumbnail background design: Felícia Zsolnai-Fehér - http://felicia.hu

Károly Zsolnai-Fehér's links:
Instagram: https://www.instagram.com/twominutepapers/
Twitter: https://twitter.com/twominutepapers
Web: https://cg.tuwien.ac.at/~zsolnai/

#gamedev

## Содержание

### [0:00](https://www.youtube.com/watch?v=HnkVoOdTiSo) Introduction

Dear Fellow Scholars, this is Two Minute Papers with Dr. Károly Zsolnai-Fehér. Testing modern computer games by using an AI is getting more and more popular these days. This earlier work showcased how we can use an automated agent test the integrity of the game by finding spots where we can get stuck. And when we fixed the problem, we could easily ask the agent to check whether the fix really worked. In this case, it did!

### [0:33](https://www.youtube.com/watch?v=HnkVoOdTiSo&t=33s) Learning Algorithms

And this new work also uses learning algorithms to test our levels. Now this chap has been trained on a fixed level, mastered it, and let’s see if it has managed to obtain general knowledge from it. How? Well, by testing how it performs on a different level. It is very confident, good…but... uh-oh! As you see, it is confidently incorrect. So, is it possible to train an agent to be able to beat these levels more reliably? Well, how about creating a more elaborate curriculum for them to learn on. Yes, let’s do that…but, with a twist! In this work, the authors chose not to feed the AI a fixed set of levels…no-no!

### [1:25](https://www.youtube.com/watch?v=HnkVoOdTiSo&t=85s) Building Levels

They created another AI that builds the levels for the player AI. So, both the builder and the player are learning algorithms, who are tasked to succeed together in getting the agent to the finish line. They have to collaborate to succeed. Building the level means choosing the appropriate distance, height, angle and size for these blocks. Let’s see them playing together on an easy level. Okay, so far so good, but let’s not let them build a little cartel where only easy levels are being generated so they get a higher score. I want to see a challenge! To do that, let’s force the builder AI to use a larger average distance between the blocks, thereby creating levels of a prescribed difficulty. And with that, let’s ramp up the difficulty a little. Things get a little more interesting here, because… whoa! Do you see what I see here? Look! It even found a shortcut to the end of the level. And, let’s see the harder levels together. While many of these chaps failed, some of them are still able to succeed. Very cool!

### [2:51](https://www.youtube.com/watch?v=HnkVoOdTiSo&t=171s) Comparison

Let’s compare the performance of the new technique with the previous, fixed track agent. This is the chap that learned by mastering only a fixed track. And this one learned in the wilderness. Neither of them have seen these levels before. So, who is going to be scrappier? Of course, the wilderness guy described in the new technique. Excellent. So, all this sounds great, but I hear you asking the key question here: what do we use these for?

### [3:23](https://www.youtube.com/watch?v=HnkVoOdTiSo&t=203s) Testing

Well, one, the player AI can test the levels that we are building for our game and give us feedback on whether it is possible to finish, is it too hard or too easy, and more. This can be a godsend when updating some levels, because the agent will almost immediately tell us whether it has gotten easier or harder, or if we have broken the level. No human testing is required. Now, hold on to your papers, because the thing runs so quickly that we can even refine a level in real time.

### [4:04](https://www.youtube.com/watch?v=HnkVoOdTiSo&t=244s) Generalizing

Loving it. Or two, the builder can also be given to a human player who might enjoy a level being built in real time in front of them. And here comes the best part. The whole concept generalizes well for other kinds of games too. Look, the builder can build race tracks, and the player can try to drive through them. So, do these great results also generalize to the racing game? Let’s see what the numbers say.

### [4:37](https://www.youtube.com/watch?v=HnkVoOdTiSo&t=277s) Results

The agent that trained on a fixed track can succeed on an easy level about 75% of the time, while the newly proposed agent can do it nearly with a 100% chance. A bit of an improvement, okay. Now, look at this. The fixed track agent can only beat a hard level about 2 times out of 10, while the new agent can do it about six times out of ten. That is quite a bit of an improvement. Now, note that in a research paper, choosing a proper baseline to compare to is always a crucial question. I would like to note that the baseline here is not the state of the art, and with that, it is a little easier to make the new solution pop. No matter, the solutions are still good, but I think this is worth a note. So, from now on, whenever we create a new level in a computer game, we can have hundreds of competent AI players testing it in real time.

### [5:44](https://www.youtube.com/watch?v=HnkVoOdTiSo&t=344s) Sponsor

So good! What a time to be alive! Thanks for watching and for your generous support, and I'll see you next time!

---
*Источник: https://ekstraktznaniy.ru/video/13816*