I am working on a chatbot designer interface. The dataset for the conversation flow consists of messages. Each message has a parent message and can have multiple possible next messages. The system displays one of the possible next messages depending on the reply. This makes it a complicated structure of parent-children relations.

On the dialog flow designer interface, the user is able to drag messages around in order to achieve a visual clarity of the designer dialog flow. This is loads of work for the user.

I want to implement an algo that would do this job for the user. So the messages should distribute themselves at even distances and making sure that their children are also around their parent message evenly distributed.

I have not studied algos, so I am not sure what jargon to look for. I don't even know the proper tag to use in this question. What this kind of algorithm is called and how to achieve this?

  • $\begingroup$ I'm guessing you are looking for something like: Force Directed Layout/network Algorithms $\endgroup$ Feb 2 '21 at 20:08
  • $\begingroup$ I don't understand what "depending on the reply" means. $\endgroup$
    – D.W.
    Feb 3 '21 at 0:40
  • $\begingroup$ @D.W. it means since there are multiple possible children (next messages); the system displays next message depending on what the user has replied to the current message. $\endgroup$
    – arxoft
    Feb 3 '21 at 7:07
  • $\begingroup$ We generally encourage you to edit your question rather than leaving clarifications in the comments, so people can understand what you're asking without having to read the comments. $\endgroup$
    – D.W.
    Feb 3 '21 at 7:34

You want to use an algorithm for graph layout. There are many out there, as well as some tools.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.