不要錯過第一款基於機器學習的冒險遊戲

遊資網發表於2019-12-17
引言

有錢,在某種程度上好像可以為所欲為……

那麼,一般人只能在遊戲中為所欲為。不過這個也是打了折扣的,基本上很難玩到一款讓人真正自由行動的遊戲,“高自由度”想來都是相對而言,少見有突破性的高自由度遊戲。

但最近火得一塌糊塗的 AI Dungeon 由於是基於機器學習,所以給我們帶來了前所未有的自由度,這次幾乎真的可以在遊戲中“為所欲為”了。(我們一直希望能見到機器學習在遊戲中的大規模使用,這款 AI Dungeon 終於讓我們見到了可能。

我在這裡會簡要介紹一下 AI Dungeon 2,並且展示一下我是如何在幻想遊戲中將想要攻擊我的紅龍擊敗並且縮小,然後又在殭屍橫行的末世裡靠賣土豆發了橫財……

呃……哈哈!

AI Dungeon 2


不要錯過第一款基於機器學習的冒險遊戲

文字冒險遊戲是電子遊戲早期的產物,遊戲基於全文字不說,玩家還要費力的輸入固定的片語來推進,比如“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,版本太高也不讓跑。

不要錯過第一款基於機器學習的冒險遊戲
AI 每次計算都吃掉大量 CPU

遊戲啟動後你會見到如下的畫面:

不要錯過第一款基於機器學習的冒險遊戲

然後可以做一些選擇,比如故事型別,你想要扮演的角色,名字等,很簡單的資訊:

不要錯過第一款基於機器學習的冒險遊戲

接下來,遊戲就開始了。

我的第一次中規中矩的嘗試:

  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。

這一次我發現自己站在一個大石頭牆面前,但是有著一個畫著法師形象的小門。

不要錯過第一款基於機器學習的冒險遊戲

遊戲過程記錄

  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 設定,這部分設定會比較完善,其它的包括偵探故事什麼的都不是很完善,所以結果也就不會那麼理想,但是還是可以玩兒的。

不要錯過第一款基於機器學習的冒險遊戲
遊戲過程記錄

這部分內容這部分內容的文字版

  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/

相關文章