home demo documentation credits

Introduction to our Demo.

Our demo acts as a simulator to provide a dynamic and interactive platform to model the problem of 'Consensus'. Analysing how individual votes propagate and influence outcomes in a networked environment. Utilising Cytoscape.js, our tool offers users an intuitive interface to visualise and explore; an invaluable resource for understanding the intricacies of network-based decision-making processes.

The demo consist of a directed graph of nodes. Where through synchronous iterations, nodes can only "pull" from its target. When a node pulls from its target it will have a probability of taking the target's colour or maintain it's own colour ('opinion'). However, if the target node is off, then the source node does nothing. Each node has a uniform probability of pulling from any adjacent node.



Getting Started

The demo simulator can seem confusing with it's numerous different functions and buttons. Our goal with the simulator is to reach consensus! Whereby our simulation only exists a single 'opinion', in other words, all nodes that are 'on' are of one colour.

Let's go through how you can observe how different "opinions" interact!


Selecting Starting nodes

Before starting the simulation, first assign at least two different colours to two different nodes. These colours help represent different 'opinions' within the network of nodes. There are already two buttons designated for assigning two different colours: purple and green. You can also add a more colours to observe the effects of having 3 'opinions'.

This can be achieved with these buttons:

Iterating

You can choose to iterate through the simulation manually, one iteration at a time with each click of a button. This allows you to observe the influence of selected 'opinions' at your own pace. However, if consensus is reached in one of the iterations, it will not display that information to you and you can choose to continue to iterate through the graph of nodes.

This can be achieved with this button:

Simulating

You can run the simulation until consensus is reached. The application will continue to automatically iterate step by step until a consensus is reached.

This can be achieved with this button:

P-Value

The p-value specifies the probability of a node doing nothing at a given iteration. For example, if p = 1, for a given node, it never changes its colour. However, if p = 0, it will always pull the colour from one of it's neighbour (this may include neighbours of the same colour too). Otherwise this would also mean if you set the p-value > 0, the remaining probability will be uniformly distributed to the node's adjacent nodes. So, the probability of choosing an adjacent node is the same probability of choosing another adjacent node. By default, when the p-value is not set, all probabilities are uniformly distributed between the current node and all it's adjacent neighbours.

This can be achieved with this button:

Observing Simulation History

During the simulation, there is a pause button to allow you stop the simulator at a specific iteration. Utilising the 'back' and 'forward' buttons, you can observe how different nodes behave over past iterations. Due to the randomness of the simulation algorithm, you can not continue the simulation until you are back at the specific iteration you paused at. If Consensus is reached, you can observe the simulation history by clicking on the 'back' and 'forwards' buttons before resetting the demo for another simulation. All without the use of the pause button.

This can be achieved with these buttons:

Node Transition Effect

This an effect created for more aesthetic purposes. When toggled, it removes the fade transition animation from all colour-changing nodes when the demo is being simulated.

This effect can be achieved with this button: