Do many gamers remember Zelda II: Adventure of Link? It was an excellent fantasy game for the first Nintendo Entertainment System which occupied quite a lot of my evenings in 1989. The Non Player Characters were very basic though - typically a lone villager who hints which direction to head for the next dungeon. The villager kept on repeating the same hint long after I’d moved on. Nintendo’s NPCs are not much better in the latest Zelda instalment Skyward Sword in 2011, despite over 20 years of computer and game development in between.
Nintendo’s Zelda series from 1987 to 2011, a huge leap in graphics but not dialogue.
The villagers need some intelligence! To meet that need, Existor has just launched Cleverscript, a simple spreadsheet format and an AI engine for creating chatbots, virtual assistants and Non Player Characters.
You may well have already come across Cleverbot. Over 100,000 people a day chat at http://www.cleverbot.com or through the app version on iOS and Android. Some stay for hours and leave the person convinced that they are chatting to another human. Among bots, Cleverbot is unique. It learns only from what people tell it, and is consequently quirky, unpredictable and entertaining.
Cleverscript builds upon the ideas, successes and raw data of Cleverbot. Cleverscript has two distinct parts: a scripted bot-maker akin to ALICE or ChatScript, but easier and more powerful; and a general chatting ability provided by a slimmed down Cleverbot engine.
Cleverscript
Cleverscript bots are created using a spreadsheet format uploaded to a page at http://www.cleverscript.com. At a basic level, each line in the spreadsheet represents either a user input such as “Where is the key?” or the corresponding bot output, “In the swamp.” But you don’t have to type out all the possible ways of saying “Where is the key?” Using a proprietary concept called phrases you create a reusable hierarchy of language. You can quickly build up a library of phrases to match thousands or even millions of variants of “Where is the key?” such as “Please tell me where I can find the golden key?” You can extract information, use wildcards, and it matches everything fuzzily - automatically allowing for typos and spelling errors. And you can use phrases to make endless variations in your bot’s output as well.
For advanced users, Cleverscript supports branching conversation structures and variables. Using variables it is very easy to remember user preferences; to program mini-games into a conversational script; or to provide different answers based on where the user is or what they already know. Your Cleverscripts can interact with your own code, passing data both ways.
Small talk
Cleverscript bots are easy to create and can exhibit very complex behaviour. But the major innovation which sets Cleverscript apart from the competition is its mini-Cleverbot engine. Most NPCs have a fallback line like “Sorry, I don’t know what you mean.” which is delivered far more often than the game writers ever intended. Cleverscript bots don’t need this. Instead, they can fallback upon a Cleverbot style chat. They can small talk! You don’t have to provide an answer to “Hello” or “How are you?” because the Cleverbot engine can already answer those questions in its entertaining way. The Cleverbot engine also provides reaction and emotion variables so you can guide the visual behaviour of an avatar.
Websites and apps
Cleverscript bots can be embedded in websites, communicating with the Cleverscript servers via an easy-to-configure JSON API. They can be embedded in smartphone applications for iOS and soon for Android, and console games if requested. The Cleverscript library runs completely on the device with no Internet connection required. The memory, disc space and CPU usage are related to the size of the original spreadsheet and the amount of Cleverbot data, but are not high. Cleverscript is the result of several years of development is slim and efficient software. Costs are per-interaction for the API and per-install for smartphones and consoles.
Examples
Cleverscript was recently used in text-based chatting game to promote that James Bond film Skyfall (screenshot on right). It is soon to be used in a talking dog application called Pupito and there are plenty of other fun examples on the Cleverscript website.
Visit cleverscript.com to start creating clever NPCs for your game.