Dialogue Scenario Reasoner
This component is typically used in a game in conjunction with the dialogue scenario editor. While the editor makes it easy for a non-programming expert to develop dialogue content, the Dialogue Scenario Reasoner makes it simple for a programmer to integrate dialogues seamlessly in a game.
The dialogue scenario reasoner handles the expressiveness of the dialogue constructs of a scenario produced by the dialogue scenario editor. The component has two main functions for a game programmer: a scenario parser and a scenario reasoner. The former parses a scenario produced using the dialogue scenario editor, and returns an ID of the scenario. A game at run-time interacts with the dialogue scenario reasoner using the ID of the parsed scenario. The reasoner then provides information about the possible following steps at each step in the series of interactions. The dialogue scenario reasoner also returns parameter values (e.g. incremental scores) and property values (e.g. emotional effects on an NPC) to a game.
A scenario that follows the schema can be parsed by the method ParseScenario, which is for a one-time conversion from XML (output from the editor) to a binary representation. This representation need not change unless the XML changes (i.e. there is a changed scenario/dialogue). This method returns the ID of the binary that are needed for the other API calls.The scenario reasoned is a web-service that offers its services through JSON-RPC. A game interacts at run-time with the scenario reasoner (with the ID of the specific parsed scenario). The reasoner has the following methods:
- scenarioInfo: returns info about the scenario like metadata, definitions and properties of the scenario and the characters.
- examples: returns an initial state that contains the initial values for the parameters that persist throughout the playthrough like the initial emotion of a character.
- allFirsts: takes a state from the list of states returned by this method or the initial state. The list of states returned contains a state per next step (a node in the editor). A step has a type (player, computer or situation) and can be handled accordingly. A step also contains the statement text and the property values and prospected parameter values after that step has been done. If the returned list is empty the dialogue scenario has ended.
The JSON input and output of the methods listed above are detailed in the following: https://github.com/UURAGE/ScenarioReasoner/tree/master/doc/schemas<p class="asset-property"><span class="text-caption">Detailed description:</span> <p>Use the dialogue scenario editor when you want domain-/content- experts/teachers to develop (a lot of different) scenarios for your game. Use the dialogue scenario reasoner to seamlessly integrate these dialogues into your game. </p> <p>The two components, dialogue scenario- editor and reasoner, are typically used together in a game. It is of course possible to use the XML output from the editor; however in that case the game-developer needs to develop their own “parser” and “reasoner” modules.</p> </p>
Jun 30, 2016
The component is implemented in Haskell on top of the Ideas framework from Utrecht University. The Ideas framework has been tested extensively both functionally and non-functionally and used in diverse domain reasoners (DME secondary math education, Math-Bridge, MathDox, Logic tool, Ask-Elle, tutor for Haskell) in addition to the dialogue scenario reasoner.
Apache 2.0 (Apache License 2.0)