
Company News
Andrew Becherer Joins Socket as Chief Information Security Officer
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.
songline-math
Advanced tools
Mathematics of navigable knowledge graphs inspired by Australian Aboriginal songlines — paths through information you can sing (traverse) to reach any destination.
Mathematics of navigable knowledge graphs inspired by Australian Aboriginal songlines.
Songlines are Australian Aboriginal navigation systems — songs that encode geography. This package implements the mathematics of navigable knowledge graphs: paths through information that you can sing (traverse) to reach any destination.
npm install songline-math
import { SonglineGraph } from "songline-math";
// Build a knowledge graph
const sg = new SonglineGraph();
sg.addWaypoint("home", [0, 0]);
sg.addWaypoint("mountain", [10, 0]);
sg.addWaypoint("river", [10, 5]);
sg.addWaypoint("ocean", [5, 10]);
sg.addVerse("home", "mountain", 1.0);
sg.addVerse("mountain", "river", 1.5);
sg.addVerse("river", "ocean", 2.0);
sg.addVerse("home", "ocean", 10.0); // long way around
// Navigate: "sing your way" from home to ocean
const path = sg.sing("home", "ocean");
console.log(path.path); // ["home", "mountain", "river", "ocean"]
console.log(path.cost); // 4.5
console.log(path.dreamtime); // false
// Build and register songs (paths through the graph)
sg.buildSong(["home", "mountain", "river"], "mountain-song");
sg.buildSong(["home", "ocean"], "coastal-song");
// Find corroborees — where multiple songlines converge
const hubs = sg.corroborees();
console.log(hubs); // convergence at "home"
// Dreamtime topology — persistent homology of knowledge space
const topology = sg.topology(5.0);
console.log(topology); // { b0: 1, b1: 0 }
// Evolve a tradition of songs
const tradition = sg.evolve("my-tradition", 10);
console.log(tradition.generation); // 10
song)Core data structures for songlines:
import { buildGraph, buildSongFromPath, reverseSong } from "songline-math";
const graph = buildGraph(waypoints, verses);
const song = buildSongFromPath(graph, ["A", "B", "C"], "my-song");
const reversed = reverseSong(song);
navigation)Pathfinding through knowledge graphs using songline algorithms:
import { singPath, dreamtimeTraversal, navigability } from "songline-math";
const path = singPath(graph, "start", "end");
// If no normal path exists, automatically uses dreamtime
corroboree)Song convergence and graph clustering:
import { findCorroborees, clusterBySongs } from "songline-math";
const hubs = findCorroborees(songs);
const clusters = clusterBySongs(songs, 2);
dreamtime)Persistent homology on knowledge graphs:
import { bettiNumbers, persistentCycles } from "songline-math";
const betti = bettiNumbers(graph, threshold);
const cycles = persistentCycles(graph, 20);
tradition)Living collections of evolving songlines:
import { createTradition, evolveGeneration } from "songline-math";
let tradition = createTradition("my-trad", songs);
tradition = evolveGeneration(tradition, graph);
The unified SonglineGraph class combines all modules:
| Method | Description |
|---|---|
addWaypoint(id, coords) | Add a waypoint |
addVerse(from, to, weight) | Add a directed edge |
sing(source, target) | Navigate from source to target |
buildSong(path) | Build and register a song |
corroborees() | Find convergence hubs |
topology(threshold) | Compute Betti numbers |
persistentCycles() | Find persistent topological features |
evolve(id, generations) | Evolve a tradition |
navigabilityScore | Overall graph navigability (0–1) |
MIT
FAQs
Mathematics of navigable knowledge graphs inspired by Australian Aboriginal songlines — paths through information you can sing (traverse) to reach any destination.
We found that songline-math demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.

Company News
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.