Combining artificial intelligence with interactive fiction - Think Skyrim, but as an interactive book

in #programming7 years ago

Bildschirmfoto 2017-10-07 um 11.45.37.png

I was looking at Google’s Dart programming language again yesterday, it’s becoming more interesting again due to Flutter, which is Google’s attempt to create a better way to create Android applications in the future, that even run on iOS and possibly other devices without any of the pain that comes with that.

Looking around I stumbled upon a work in progress project called egamebook, written in Dart by Google employee Filip Hracek who is also working on the Dart language itself. Egamebook aims to combine artificial intelligence with multiple choice style interactive fiction (which is popular on mobile devices right now) to bring interactive fiction into the 21st century, making them as open and sandboxy as modern open world video games like Skyrim are.

Bildschirmfoto 2017-10-07 um 11.44.59.png

In single player video games, the enemies are controlled by the computer, by an artificial intelligence. It looks at the state of the world, creates a list of possible actions it could take and chooses the best one.

Using this as a template, egamebook uses the same mechanic to not only control the world and the enemies in it to create a living, breathing world, but it also creates the choices that the player is given in a text interface. It takes the list of possible options that the artificial intelligence has chosen, takes the top four or so options and presents these to the player to choose from.

The idea here is that you wouldn’t want to give players stupid choices, like “run against the wall”, only choices that make sense, so the top choices are chosen. But you still want the player to be able to fail, so he has to find out for himself which of the options is the most likely to succeed.

And we’re really talking about most likely here. There is no option that gives you sucess and all others fail. It’s all a bit more fuzzy than that. The options are either more or less likely to lead to success. It depends on the state of the world with a little bit of chance added.

So let’s say you are playing a fantasy interactive book, where you are a knight who leads an army into battle. You are given, among other options, the choice to attack the south wall of the enemy castle. But if you succeed and breach the wall is not set in stone by the author of the interactive fiction. Instead, it depends on how many soldiers you have recruited for the battle prior in the story, how many catapults you have built, and so on. Just like in a video game. But in an interactive, multiple choice style interactive fiction book instead.

So this brings the openness of text adventures like Zork to multiple choice interactive fiction, which is much simpler to use and also works really well on smartphones.

The creator of this tool has written a few sample stories to improve it. The first one he created is called Loch Ness, you can play it here. It was created in just two days for a game competition so don’t expect too much, but you can already see that the idea of combining artificial intelligence with interactive fiction actually works.

Bildschirmfoto 2017-10-07 um 11.44.13.png

The second one, Edgehead, is a lot more sophisticated. You can play it here.

Bildschirmfoto 2017-10-07 um 11.46.31.png

As you can see, there isn't just text, pictures are shown here and there to make it more interesting which I think is a great idea.

Creating this new type of interactive fiction is going to be a lot harder than using something like Twine or Ink, you have to write actual programming code, but it seems to be worth it if it leads to creating a whole new generation of interactive fiction that is as open as the old classic text adventures like Zork. Do you think so too? Tell me what you think in the comments!

Links:

egamebook

-> egamebook website

-> Google+ community

-> Mailing list

egamebook games

-> Loch Ness

-> Edgehead

-> Edgehead source code

Sort:  

The @OriginalWorks bot has determined this post by @crypticwyrm to be original material and upvoted it!

ezgif.com-resize.gif

To call @OriginalWorks, simply reply to any post with @originalworks or !originalworks in your message!

To enter this post into the daily RESTEEM contest, upvote this comment! The user with the most upvotes on their @OriginalWorks comment will win!

For more information, Click Here! || Click here to participate in the @OriginalWorks sponsored writing contest!
Special thanks to @reggaemuffin for being a supporter! Vote him as a witness to help make Steemit a better place!

Coin Marketplace

STEEM 0.16
TRX 0.16
JST 0.030
BTC 58092.36
ETH 2469.79
USDT 1.00
SBD 2.38