← mysimulator.uk πŸ•ΈοΈ Social Network Community Detector β€” Louvain Live (2D) AI & ML β†’

How the real algorithm runs here

A synthetic social graph is generated with genuine community ground-truth: several dense friend groups plus a sparse scattering of cross-group edges, without ever telling the algorithm which group is which. Run Phase 1 step executes one full sweep in which every node considers moving to whichever neighbouring community yields the largest real modularity gain, computed from Ξ”Q = ki,in/m βˆ’ Ξ³Β·Ξ£totΒ·ki/(2mΒ²). Aggregate β†’ next level collapses the discovered communities into super-nodes (internal edges become self-loops, cross-community edges become weighted links) so the next phase can find higher-level structure. Run full algorithm automates both phases to convergence. The modularity score shown is always recomputed directly from the original graph's edges and the current community assignment of every original node β€” never a placeholder value. This 2D edition swaps the 3D WebGL scene for a flat force-directed canvas layout with pan/zoom/drag, so the same algorithm reads as a classic network diagram.