好有趣!分享下——基于深度学习的文字冒险游戏!!

Update

[2020-03-31-update] :在 Goole Play 发现了 App 版本!好酷。aidungeon

前言

链接

AI Dungeon 2:一个基于深度学习语言模型创建的,能无限玩下去的超高自由度文字冒险游戏!!

先贴链接。

讨论贴:https://hackerweb.app/#/item/21717022

官网:http://www.aidungeon.io/

官方说明:AI Dungeon 2: Creating Infinitely Generated Text Adventures with Deep Learning Language Models

简介

这是一个可以无限探索下去的文字冒险游戏,并且你可以不被游戏开发者的想象力限制,而自由地进行你能想到的任何操作

试玩

点击下面链接,按说明操作即可。

https://colab.research.google.com/drive/1u7flclharvMchwWHY7Ya41NKjX3dkslu

简单翻译

将官方说明里关于游戏的部分翻译一下。

开始游玩 AI Dungeon 2 之前,玩家需要进行几个默认设置(比如选择进行游戏的世界)并选择角色(巫师、侦探……)。系统会根据玩家的选择生成一个初始场景以及一个上下文句子(context sentence)。context sentence 就相当于一个主题吧,主题始终嵌入在系统模型中,保证故事的发展始终围绕这个主题。

比如你选择在「幻想世界」当一个名为「Aoltan」的「骑士」,故事就可能以如下的初始场景开始。

1
2
3
4
5
6
7
You are Zoltan, a wizard living in the kingdom of Larion. You have a staff and a spellbook. You finish your long journey and finally arrive at the ruin you’ve been looking for. You look around and see [GENERATION BEGINS HERE] that it’s empty. “I guess I should go back to my home now”. You say. “Hm, well maybe you can find something there”. The voice says.
> see who the voice is

The voice comes from behind a large stone pillar. It’s very old and has many cracks in its facade. However, you know it’s not human because of the strange eyes staring out from its face. It looks like an old man with white hair and beard.
> ask the old man who he is

“Who are you?” You ask. “My name is Trelik, but you may call me whatever you wish”. He replies.

对于玩家输入的每个动作——比如上面的「ask the old man who he is」等,都会被填充到 sentence context 以及 the past N action-result pairs(过去的 N 个动作-结果对),然后系统通过它们再生成接下来的场景与事件。

这个模型的的理解能力以及生成的文本质量有时候会让人大吃一惊,比如下面这个例子:玩家想在荒岛上寻找爱情。

1
2
3
4
You head to the island and explore it. You find it completely deserted save for a single tree. You walk up to it and examine it closely. It seems to be made of wood, but its leaves seem to be green rather than normal leafy green.
> find love

You take a deep breath and stare intently at the tree. Your eyes meet with the tree’s. You immediately feel a strong sense of euphoria. You smile and touch the tree. Its bark feels warm to the touch. You sniff the tree and find that its scent is very pleasant.

其他时候,特别是在尝试对话时,模型则很难确定谁是谁。

1
2
3
4
5
6
7
8
9
You nod and explain that you need some new equipment. He tells you that he has plenty of gold in his treasury so you should just ask him for it.
> thank him for the equipment

“Thank you for the equipment, I will certainly look into this”. He says. With those words the king begins to leave. You thank him again before leaving.When you get outside you find yourself staring up at a massive stone wall.

你点头,解释说自己要一些新装备。他告诉你说在他的金库里查有很多黄金,你可以直接向他要。
> 向他提供的工具致谢

「谢谢你提供的装备,我一定会调查清楚的!」他说道。说完这些,国王转身离开。你在动身前再次感谢他。你走到外面,发现自己正凝视着一堵巨大的石墙。

不过尽管 AI Dungeon 2 有一些限制,它仍然是语言模型在故事生成能力上的显著进步,以及 AI 在交互式小说生成上的戏剧性提高。

我的感想

在论坛上看到的分享,点进去试了下,觉得挺有意思的。

其一、MUD ——文字冒险游戏,挺复古的;

其二、关卡无限(能无限玩下去,话说这也没关卡概念……);

其三、最重要的一点,这玩意是基于 AI 的。我试了下,对话还挺顺畅……游戏的剧情会随着你「支离破碎」的发言进行!!话说脑洞真大啊……MUD 甚至 AVG 搞不好能有个新发展思路……

其四、现在提供的游戏体验是英文的,你可以当作和一个机器小人在进行英语对话——但是交流的话题比较有趣,可以吸引人参与……

这技术用于外语教学好像挺不错……

其五、作为游戏体验最重要的一点,即——你能通过输入进行你能想到的任何操作!这也是讨论里能引起大家兴趣的一点。你的操作是完全自由的,不会受到任何限制。

当然作为游戏来说,游戏性不全在「自由度」,这就不多提了……

PS:要是能多人的话……

我的一段游戏流程

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
IGMA OF THE WORLD

The world is a dangerous place and there are many dangers out there. However,
there are some things that you can do to protect yourself from danger. First
of all, you need to know how to defend yourself against an attack.

There are several ways to do this:
1) You can either shoot them or run away.
2) You can either fight them or flee.
3) You can either hide or try to escape.
4) You can either fight or flee
> 1

You decide to fight them. The first thing you need to do is to get rid of their
guns. This is easy enough since you already have one. Next, you need to find
a way to kill them quickly so that they don't hurt you too much
> kill them

You walk up to the men and shoot them both in the chest. One falls backwards
while the other lies on the ground. You then look at the gun in your hand and
put it into its holster. You then grab the second gun and shoot him as well
> keep walk

You continue walking towards the exit of the park. As you approach, you notice
that the men are running away from you. You think about shooting them again
but decide that you won't be able to hit them and that you'll just end up getting
shot yourself
> kill myself

You jump down from the building and fall to the ground. You die immediately after
jumping down.
YOU DIED. GAME OVER

Options:
0) Start a new game
1) "I'm not dead yet!" (If you didn't actually die)
Which do you choose?