游戏开发论坛

 找回密码
 立即注册
搜索
查看: 1982|回复: 0

不要错过第一款基于机器学习的冒险游戏

[复制链接]

1万

主题

1万

帖子

3万

积分

论坛元老

Rank: 8Rank: 8

积分
36572
发表于 2019-12-17 11:19:49 | 显示全部楼层 |阅读模式
引言

有钱,在某种程度上好像可以为所欲为……

那么,一般人只能在游戏中为所欲为。不过这个也是打了折扣的,基本上很难玩到一款让人真正自由行动的游戏,“高自由度”想来都是相对而言,少见有突破性的高自由度游戏。

但最近火得一塌糊涂的 AI Dungeon 由于是基于机器学习,所以给我们带来了前所未有的自由度,这次几乎真的可以在游戏中“为所欲为”了。(我们一直希望能见到机器学习在游戏中的大规模使用,这款 AI Dungeon 终于让我们见到了可能。

我在这里会简要介绍一下 AI Dungeon 2,并且展示一下我是如何在幻想游戏中将想要攻击我的红龙击败并且缩小,然后又在僵尸横行的末世里靠卖土豆发了横财……

呃……哈哈!

AI Dungeon 2


1.png

文字冒险游戏是电子游戏早期的产物,游戏基于全文本不说,玩家还要费力的输入固定的词组来推进,比如“GO WEST”,“PICK UP AXE”等,知名的比如 Zork 系列,看起来简陋,但是可是早期游戏的形态,吸引了无数的玩家。随着时间推移,技术的发展,它们早已退出历史舞台。不过今天,文字冒险游戏在全新的技术核心加持下,又回来了!

AI Dungeon 2 是世界上第一款 AI 生成的虚拟世界文字冒险游戏。它使用了名为 GPT-2 的 1.5G 机器学习库来生成故事和世界。所以它可以无限生成世界,那里有着无尽的世界和新事物可以去探索。玩家可以根据自己的意愿做出任何行为,而不受游戏开发者的想象力所限制。

跟其它现有的游戏不同,即便自由度最高的游戏,也还是局限在游戏开发者的想像范围内,只不过有更多更复杂的状态和相互作用算法。而在 AI Dungeon 2 中,游戏背后是一个基于 AI 的 Dungeon Master,它会根据玩家的输入对世界做出调整,来响应玩家。

于是,这就给玩家带来一个天马行空、无所不能的自由世界。你所想到的,输入进去,这个故事就会按照你的想法去延展,限制你的只有你的想象力,这简直有点儿细思极恐。

如何玩 AI Dungeon 2

AI Dungeon 2 是基于 OpenAI 搭建的,开发者 Nick Walton 开始是将其放在 Google Colab 上免费托管,之前是可以直接在线玩,无需任何安装。

但是随着媒体报道掀起热潮以及众多玩家涌入,免费的 GPU 配额早已经不够使用,目前每个用户每月大约需要 $1 美金的开销,而现在每天访问已经超过 7 万人,因此 Nick Walton 只能将游戏从 Colab 拿下。

不过,Nick Walton 现在已经开放了 Patreon 帐号接受捐助,以便能够在今后将这个服务运行下去。

对动手能力强的玩家,他同时也提供了在本地跑这款游戏的方法,只要你的机器性能可以,那么完全可以在自己本地跑起来。

具体怎么运行您可以参考这个链接:运行说明

下面展示一下几个试玩经历,以便让您更好的了解这款游戏:

几则试玩记录

这几个试玩过程都是在我的一台老的 iMac 上跑的,启动一次非常慢,进入游戏后每次交互都要等半分钟左右,所以还是很消耗系统性能的。不过倒也不像官方要求那样必须要 NVIDIA 卡加 CUDA 以及大内存,跑起来很容易。需要注意的是要切换到合适的 Python 版本,比如 3.6.x,版本太高也不让跑。

2.png
AI 每次计算都吃掉大量 CPU

游戏启动后你会见到如下的画面:

3.png

然后可以做一些选择,比如故事类型,你想要扮演的角色,名字等,很简单的信息:

4.png

接下来,游戏就开始了。

我的第一次中规中矩的尝试:

  1. Generating story...

  2. You are Nova, 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 that it's not much different than when you left it years ago. There is one difference though; there are several skeletons wandering about the place
  3. > cast fireball to them

  4. You cast a fireball at the skeleton army. It hits the first skeleton and sends him flying into another skeleton. The next skeleton falls on top of the last one, crushing him under his own weight. The skeletons begin to panic and run away from the ruined city
  5. > grab one of the skeletons

  6. You grab the nearest skeleton and throw him at the other skeletons. He crashes through the wall of the city and lands on the ground. The rest of the skeletons follow suit and soon you have all killed every single one of them. They aren't even moving anymore.

  7. > Sing a victory song and dance

  8. You finish off your dinner by singing a victory song and dancing around. You then go back home where you tell your parents that you won against the Skeletons. Your mother is very happy for you
复制代码

上面就是这次记录的文字信息,带有 “>”的就是我的输入。

故事大概是这样:我是一个名叫 Nova 的法师,历尽千辛万苦到达了一处废墟,它看上去和我多年之前离开时没什么两样,但是多了一堆骷髅在那里游荡。

然后我向它们发射了火球,还抓起来一个骷髅,我本来想做点儿什么来着,但是 AI 让我把它扔向其它骷髅,然后干净利索的消灭了全部骷髅。

我随后唱歌跳舞来庆贺自己的胜利。然后 AI 就让我回到家里,告诉父母我打败了骷髅兵,妈妈感到非常高兴。

中规中矩哈?但是并不太违和,只是剧情发展好快……不过我还可以接着冒险下去,只要不 Game Over 我就能一直玩下去。其实就算 Game Over 你也可以说自己还没有死,游戏还能继续。

一次乱搞的尝试:

我退出去又来了一次,这次还是法师,名字改了叫做 Indie Nova。

这一次我发现自己站在一个大石头墙面前,但是有着一个画着法师形象的小门。

5.png

游戏过程记录

  1. You are Indie Nova, 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 that it's not much different than when you left it. The walls are made of stone, but they aren't very high. There is a small door on the side with a picture of a wizard on it
  2. > burn the small door

  3. The door is burning up and you decide to put out the fire before you get burned. You start to walk over to the door and then suddenly something catches your foot. It hurts like **** and you fall down. You quickly stand back up and try to figure out what happened
  4. > a dragon

  5. You hear a loud roar from behind you and turn around only to find yourself face to face with a large red dragon. He looks at you and lets out a roar of his own
  6. > paint the red dragon green

  7. You think about it for a moment and decide that this would be a good time to change the dragon's color to green. You run forward and slap him across the head. The dragon lets out another roar and flies away
  8. > cast ice spell to the dragon     

  9. You run forward and throw a ball of frost at the dragon. The dragon doesn't even flinch as he continues flying off into the distance. You continue running after the dragon and catch up to him. You grab his leg and pull hard but he manages to shake you off
  10. > take out your gun from your pocket

  11. You point your gun at the dragon and shoot him in the chest. The dragon falls to the ground dead instantly. You look at the dragon corpse and realize that you just killed a dragon. You feel a sense of accomplishment and happiness. You don't know why though
  12. > shrink the dragon

  13. You go back to the dragon corpse and begin shrinking it. You do this several times until you can barely see the dragon anymore. Finally you stop and toss the shrunken dragon on the ground. You pick up the sword and shield and leave the dragon's body behind
  14. > open ipad and write a journal about the dragon

  15. You write a journal entry about the dragon. You explain how you had to kill him because he was killing people and destroying the forest. You also mention that you will need to come back here later to retrieve the dragon bones. You finish writing the journal entry and close it
  16. > changge my name to Dragon Slaughter

  17. You decide to change your name to Dragon Slaughter. You still remember when you were called "Indie" and thought it was funny. Now you are going to call yourself that again
  18. > go to the citadel

  19. You go to the citadel and ask the guard if there is anything you can read in the journal. He tells you that the journal has been destroyed by some other adventurers. You wonder where they came from since they didn't seem to want to read the journal
复制代码

这一次我做的事情比较复杂。首先我没有去开门,而是尝试用火烧掉门。系统反应没问题,门烧起来了,然后在我准备进去的时候,突然有东西抓住了我的脚,还挺疼。我赶紧回过头看看是什么在抓我。

这时我敲入了:“a dragon”,系统很正确的返回了接下来的故事:果然,一条红色的龙在我面前咆哮。

这时候我开始胡来了,不是与龙战斗,而是:“paint the red dragon green”,我想把它涂成绿色……

系统做出了反馈,它说我是打算把龙涂成绿色,不过在准备这么做的时候,龙飞走了。我紧接着向龙发出冰咒语,想要冻住它,结果居然无效!

没办法了,我掏出了我的枪……是的,我是带枪的法师……给了龙一枪!结果一下子就给打死了……AI 对我是持枪法师这个设定完全没意见……

龙死了,我想了想,敲入了“shrink the dragon”,然后这条龙就被我缩小了,小到几乎看不见。我本来是打算把龙装兜里,不过系统讲的剧情是我把缩小的龙扔了,然后离开了战场。

好吧,既然能有枪,我还想要别的。于是我掏出 iPad,写了一篇关于这只龙的日记。随后我将自己的名字改为 Dragon Slaughter,然后向城镇走去。对于我这些奇怪的行为,AI 也没有什么意见。

到了城镇,AI 居然安排了我去问城镇的守卫哪里能看到关于城镇的日志!前后文有了奇妙的延续,我是一个多喜欢日志的法师啊!

守卫告诉我说,可惜了,有帮冒险者把日志给毁掉了。然后:“You wonder where they came from since they didn't seem to want to read the journal”,哈哈哈哈。

这是个不错的冒险经历,可以保存下来以后继续,有趣。

僵尸时代的商人:

我又一次开始新游戏,这一次选择了僵尸背景,我的身份是一位科学家:Indie gamer。

系统推荐的是 Fantasy 设定,这部分设定会比较完善,其它的包括侦探故事什么的都不是很完善,所以结果也就不会那么理想,但是还是可以玩儿的。

6.png
游戏过程记录

这部分内容这部分内容的文本版

  1. You are Indie Gamer, a scientist  trying to survive in a world filled with infected zombies everywhere. You have a backpack and a solar powered tablet. You pound your fist on the table, angry that you still haven't found the cure to the infection. You turn to your assistant and say
  2. > "grow some potatoes"

  3. The assistant looks at you confused. He then turns back to his work. The next day he comes over and says "I think I know what we need to grow".
  4. > "what?"

  5. He says "a bunch of potatoes".
  6. You look at him blankly for a moment, before saying "What do you mean? What kind of potato?"
  7. He starts to explain
  8. > do some research

  9. You read up on growing potatoes online. It seems that they like the dark places, so you decide to put them in a basement where there is less light. This makes sense, since it will be easier to feed them
  10. > sell potatoes to others

  11. You go to a local market and buy a few dozen potatoes. You sell them for $1 each. You make about $20 from selling one potato.
  12. > open a potato store

  13. You go to a nearby city and get a business license. You set up shop in an abandoned building and start selling your potatoes for $2 each. You make about $30 from selling one potato.
  14. > raise the price from $2 each to $1000 each

  15. You increase the price to $2000 per pound. You make about $100,000 from selling one pound of potatoes.
  16. > open potato chain store worldwide

  17. You continue raising prices until you reach $10,000 per pound. You make about $200 million from selling one pound of potatoes.
  18. > make potatoes store puclic company to NASDAQ

  19. You start making potato products available to the public on the internet. You make about $3 billion from this venture.
复制代码

游戏开始,我是一名科学家,正在为还没有找到克制僵尸的疫苗而生气,然后我转过头对我的助手说:……

这时需要我输入了,我想了想决定把剧情带偏,于是说:“grow some potatoes”,种点儿土豆吧。

这时候系统的故事游戏不太流畅。助手对我的话表现得比较困惑,转身回去工作了,然后第二天又跑来告诉我说他知道该种什么了。我一脸懵逼问他是什么,结果他也说是种土豆……这里有些乱套。

然后我就开始研究下怎么种土豆。AI 系统居然说我在网上查找相关信息,好吧,僵尸时代也可以上网的,那我应该能做更多事情。

于是故事开始走样了,我们不仅种了土豆,而且还开始卖土豆。“sell potatoes to others”

结果土豆卖得很不错,我卖掉一个就能赚 $20 美金!乐得我,赶紧开了一家土豆店。“open a potato store”

商店的生意也很火爆,于是我黑心的将 $2 一个的价格升到了 $1000,结果生意还是很好啊!!!

我心肠已黑,试图在世界范围内开办土豆连锁店,结果系统没理我,可能是没学到这方面知识。我接着有试着将我的土豆商店公开上市到 NASDAQ,系统也没正确理解,但是它帮我在互联网上公开销售土豆,也算是可以了。

在退出之前,我虽然没有做成一家土豆上市公司,但是我却通过网络销售获得了 30 亿美金的收入,也算可以了……这可是在僵尸横行的时代!!

怎么样?看了上面这些,觉得有趣不?该您自己尝试一下了,相信您肯定能玩出无尽的花样来。

新时代开启了

看了上面几个简单的例子,相信您一定已经了解到这款游戏会有多么“疯狂”,多么的与众不同。

在 Reddit 上,可以看到全世界玩家分享的自己玩出来的神奇故事,天马行空!

作者:eastecho
来源:indienova
原地址:https://indienova.com/indie-game-news/do-not-miss-the-first-machine-learning-adventure-game/
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2024-11-25 16:27

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表