| 1 | = Dialog Manager |
| 2 | |
| 3 | The dialog manager is a tool to create and execute dialogs with a human user. |
| 4 | |
| 5 | == Terminology |
| 6 | * Dialog state. The current state of the dialog, comprising the situation and the user's answers so far. Stored as a set of Parameters. |
| 7 | * Parameters. A set of key-value pairs where the keys are unique string labels and the values are a ParameterValue (a String, Double, or boolean). |
| 8 | * Distance between parameters: the euclidean distance (sqrt of the sum of squares) of the difference between the two parameter values, on a per-key basis. Only values for which hoth parameters have the key are compared. |
| 9 | * Dialog specification. A kind of finite state machine. The nodes are "dialog phases" and each have a unique label. The START and END phase indicate the usual start and end of the dialog. |
| 10 | * Dialog phase. Each dialog phase represents a situation where we want the user to answer some question. This question can be formulated in different ways depending on the situation and user's previous answers. |
| 11 | |
| 12 | The dialog manager contains a number of key mechanisms |
| 13 | * All data structures can be (de)serialized to JSON. |
| 14 | * Various datastructures available to store key elements for dialog management |
| 15 | * a DialogState represent the entire dialog state plus the entire dialog specification in a single file. Useful to store/recover the entire user state in one single file |
| 16 | * A DialogSpecification represents all possible dialog phases. Useful to storethe entire dialog tree but without the user's answers so far |
| 17 | * Parameters that store the user's answers so far |
| 18 | * The NextPhase determines the next phase, based on the current parameter settings. The GoToIf selects the phase that has parameters that are smallest distance to the current state (picks one if multiple at same smallest distance). The GoTo unconditionally jumps to the given state. |
| 19 | |