2

I'm attempting to model the relationships (likes and hatreds) between various mercenaries to reduce friction after team formation.

I'm using sigma.js as graph drawing library and forceAtlas2 as force-directed layout algorithm and having some success (see images below) in modeling just the Likes.

Mercenaries form the Nodes and their Likes for the directed Edges.

My understanding is the Nodes repel each other and the Edges cause attraction. I can color the Edges differently for Likes and Hatreds, but what I'd really like is to change the strength of attraction (including to negative for hatreds). But I don't know what that would be called, limiting my solution seach.

Is what I'm asking possible / mathematically sound? Am I using appropriate tools for the problem I'm describing?

Advice would be much appreciated, as my background isn't in math / data science.

enter image description here

enter image description here

Julix
  • 121
  • 1
  • 2
    According to a comment in this question: https://stackoverflow.com/questions/55005586/how-to-draw-a-proper-directed-graph-with-negative-weights-of-edges-using-python, spring layout in python's Networkx package will treat negative weights as repulsors. But I didn't verify this, and did not search an equivalent in JS (don't know if there is). – Itamar Mushkin Aug 02 '20 at 05:55
  • Spring is a good word for me to learn, and from the linked question "weight" - that might help find solutions. Actually, Networkx looks cool, maybe I should learn Python ^.^ - thanks, Itamar! – Julix Aug 02 '20 at 06:05
  • 1
    'Spring' isn't the important word here (it's the same as other force-directed layouts) but rather 'negative weights'. And I'll be the first to recommend Python for network visualization for networks of this size. – Itamar Mushkin Aug 02 '20 at 06:15

0 Answers0