John Lekberg


Multi-threaded user interactions

Created 2019-09-23.

Showing multi-threaded users interactions (multiple conversations) in a graph theoretic space instead of a rectangular frame.

Original graphic


Redesigned graphic

The original graphic is from the paper "Petri Net Machines for Human-Agent Interaction".

The graphic specification I sketched out for the original graphic:

ELEMENT: point(position(thread*thread_step))
ELEMENT: text(position(thread*thread_step), label(global_step))

Where:

I think the original graphic does a good job showing that there are multiple threads, but following the numeric labels to see the conversation flow is hard. I thought that, instead of using a frame defined by thread*thread_step, a redesigned graphic could use a graph-theoretic space, which is what I did.

Instead of using numeric label to cross reference the script with the threaded conversation, I wanted to see if it were possible to put the script inline in the graphic.

Now that I think about it, since the user's response is triggering the context switching in the system, maybe the edge labels should be user response and the node labels should be system responses.

I used Graphviz to generate the redesign, using the dot command.


Code used to create "Multi-threaded user interactions"


script.graphviz - DOT language code describing the graphic.
digraph {
  node [shape=none]
  overlap = scale

  i1 -> i2 [penwidth=3]
  i2 -> i3
  i3 -> i4
  i4 -> i5 [penwidth=3]
  i5 -> i6 [penwidth=3]
  i6 -> i7 [penwidth=3]

  subgraph cluster_1 { bgcolor="#d7f6fc";  i1; i5 }
  subgraph cluster_2 { bgcolor="#f7d4cb";  i2; i3; i4 }
  subgraph cluster_3 { bgcolor="#f5eab5";  i7 }


  i1 [label="U: How can I get to {X}\nS: Do you see the {red sign}?"]
  i2 [label="U: Actually, I need to go to the toilet first\nS: Certainly. Do you see area {Y} on my left?"]
  i3 [label="U: Yes\nS: Can you take the {stairs}?"]
  i4 [label="U: Yes I can\nS: To get to the {toilets} you need to go..."]
  i5 [label="U: Also yes, I can see the {red sign}\nS: Awesome! Do you see the {blue sign}?"]
  i6 [label="U: You are very helpful!\nS: Thank you! ... [Persona]"]
  i7 [label="U: Can I take a selfie with you?\nS: Of course! <starts selfie skill>"]

  i0 [shape=point]
  i0 -> i1 [penwidth=3]
}