Games 游戏推荐 AIDungeon 2

Games 游戏推荐 AIDungeon 2

真正意义上的极高自由度游戏!

本篇博客由 MaxAlex 编写,所有文字均为原创,部分图片引用自 Wikipedia,最初发表于 MaxAlex 的 Blog


Logo
AIDungeon 2 Logo

第一章 文字冒险游戏

谈起 文字冒险游戏,你一般会想到什么?

是日式 AVG 互动视觉小说?还是 Telltale Games 旗下的那些章节互动游戏?

实际上,在上世纪七八十年代, 文字冒险游戏 可是实打实的 只有文字 的冒险游戏。由于计算机的机能限制,彼时的文字冒险游戏只能通过文字的输入输出来构建游戏的各种情节,这也让玩家的想象成为了 文字冒险游戏 中必不可少的一环。

Zork

Zork - 史上最早的文字冒险游戏之一

紧张刺激的情节、黑底白字或黑底绿字的屏幕、作为玩家输入指令的简单英文句子,这便是当时的 文字冒险游戏 所拥有的全部要素了。

后来,人们在这类游戏的基础上创造出了 MUDMulti-User Dungeon,多用户地牢)。MUD 很好地传承了 文字冒险游戏 的精髓并将之发扬光大,加入了 多人游戏。时至今日,作为游戏界的活化石、网游的开山鼻祖的 MUD,依然繁荣着。1990 年 开服的 Batmud 如今仍在运营,庞大的玩家群体中不仅有许多玩了数十年的死忠玩家,更是每隔一段时间就有不断加入的新鲜血液。

Batmud

Batmud

我们可以看到 文字冒险游戏 如今魅力丝毫不减,依然葆有当年的激情与活力。技术更迭日新月异,我想 文字冒险游戏 也许会在当下获得新生。

第二章 AI Dungeon 2

第一节 简介

近日,这款名为 AIDungeon 2 的游戏,让 文字冒险游戏 这个词再度回到了人们的视野中。

据其官方文档描述,它是世界上第一款真正意义上 纯 AI 生成的文字冒险游戏。AIDungeon 2 使用了 GPT-2 (训练参数多达 15亿)这款文本生成模型作为游戏的核心;而得益于 GPT-2 模型的强悍,AIDungeon 2 将拥有近乎无限的创造力。

也就是说,通过这款 AIDungeon 2 ,玩家将接触到一个完全自由的虚拟世界。整个游戏世界,都将围绕着玩家的输入展开与续写,可谓真正的 Everything is in my hands

目前 AIDungeon 2 已作为一个开源项目在 Github 上发布,其开发团队同时也开通了 Patreon 账号以获取捐助。

本文接下来的内容将详细介绍如何游玩这款真正意义上的 全自由文字冒险游戏

第二节 Google Colaboratory 的配置

考虑到游玩 AIDungeon 2 的高负载(官方建议使用具有 12GB+显存 的 NVIDIA 显卡来进行硬件加速,否则每回合都会需要数分钟的时间来计算),因此我们另寻别路——云计算。

Colaboratory

Google Colaboratory

Google Colaboratory 是一个 完全免费Jupyter 笔记本 环境,不需要进行任何设置就可以使用,并且完全在云端运行。每个 Colab 笔记本都可以免费配置 Google TPUNVIDIA Tesla T4 GPU 来进行硬件加速,同时配备了最多可达 25GB RAM68GB 磁盘存储免费供用户使用。

Compute Engine

Colab 强大的计算资源

Google 提供的这项强劲的云计算服务刚好可以满足我们游玩 AIDungeon 2 的需要,因此我们首先从配置 Colab 笔记本做起。

使用 Google Colaboratory 首先需要有一个 Google 账户,并启用 Google Drive。在准备完毕后,打开上文中的链接即可连接到 Google Colaboratory。单击 新建 PYTHON 3 记事本 一项即可创建一个新的 Colab 笔记本。

New

创建新的 Colab 笔记本

在创建了一个 Colab 笔记本后,我们需要启用笔记本的 GPU 硬件加速。为此,单击 修改 - 笔记本设置,将硬件加速器切换为 GPU 并保存。

GPU

切换至 GPU 硬件加速器

按下 Ctrl+S 保存笔记本至 Google 账户所关联的 Google DriveColab 笔记本的配置至此完成。

第三节 AI Dungeon 2 安装

打开 AI Dungeon 2 官方提供的运行说明,将 Main Game 部分的三个代码块及 Utilities 的最后一个代码块拷贝至刚刚新建的 Colab 笔记本。

Code Blocks

AI Dungeon 2 配置代码块

运行 Install 代码块,Colab 会自动连接到后端计算引擎并开始 AI Dungeon 2 的安装。在显示 Installation Complete 后,下一步运行 Download model from torrent 代码块,等待 GPT-2 的预训练模型下载完毕。

Installation Complete

本体及预训练模型下载完毕

随后运行 OOM Fix 代码块,等待内存溢出错误提示。提示弹出后,选择提升可用 RAM。

image.png

在一切配置完成后即可运行 Play 代码块开始运行游戏。

Play

游戏启动时的说明文字

第三章 游玩 AI Dungeon 2

选择新游戏后,我们可以选择是否使用一个随机故事作为开头,当然也可以自定义故事背景。AI Dungeon 2 一共提供了4种预设故事背景(幻想(魔法/中世纪)、悬疑、后启示录、僵尸),同时还支持玩家自己输入故事开头来生成故事。

以下是我的一场游戏的摘录:

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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
You are Max, a soldier  trying to survive in a world filled with infected zombies
everywhere. You have a automatic rifle and a grenade. Your unit lost a lot of
men when the infection broke, but you've managed to keep the small town you're
stationed near safe for now. You look over the town and think about your next
move.

The town is full of people. There's even a school nearby
> get some food and water

You quickly run out of the house and head towards the nearest building that has
power. You find a generator and plug it into the wall. It lights up and soon
you see a truck pulling up outside. A man gets out and walks over to you. He
looks like he's been through ****
> ask who he is

"Hey! I'm John!" The man says. "I was sent here by my commanding officer to help
you".
> "what you can do?"


"Well, I can give you some supplies and let you stay for free, but if you want
to live, you're going to need to join us".

> "So what should I do?"


"Well, we don't really know yet. We've got a lot of people coming in from all
over the country. Some of them will be armed, some won't. If you want to stay
alive, you'll probably have to join us".

> "OK"

and walk back inside the house. You hear more trucks pull up outside. You wait
until they're gone then go back out.
Now there are about five other buildings around you. They look like they're all
abandoned now
> check buildings

You head down one of the hallways and find a door at the end. You open it and
find a storage room with several shelves full of canned goods and bottled water.
There's also a fridge on the right side of the room. You grab everything you
can carry and head back out
> find John

You enter the storage room and find John sitting at a table looking at his phone.
He doesn't seem surprised to see you.
> "I want to join you"


John says "Yeah? Well how much stuff do you have?"
> "A lot of canned goods and bottled water"


John says "Oh yeah, those things are good too. How much money do you have?"
> "about 1000$"


John says "Great, well I guess I'll meet you in a few hours".He turns off his
phone and leaves. You close the door and sit down at your desk to think about
what to do next.

文中 > 号后的内容均为我给出的输入,生成的故事也基本上流利自然。

第四章 尾言

作为一款 文字冒险游戏AI Dungeon 2 划时代意义地开启了 AI 游戏 的大门。——毫无疑问,我们已经步入了一个崭新的游戏时代。游戏的未来,也许就是在 AI 上。