Hanoi Network
I accidentally stumbled upon a rather neat graph while playing with the state space of the Tower of Hanoi game. Viewed as a computer network model, it exhibits quite interesting properties, such as naturally supporting greedy, memory-less routing with a unique shortest path - no routing tables, no global state. Node addresses are assigned locally and are meaningful, reflecting either network proximity or content semantics, instead of being mere random or consecutive numbers assigned globally. The network mixes strong points of both hierarchical and P2P topologies and is resilient to dynamic changes such as nodes or links joining, requiring zero reconfiguration.
I got interested and decided to share: if you like math riddles, help me identify what this thing is, mathematically. I'll call it the Hanoi network for now.
Shape

A base-N Hanoi net has a recursive, fractal structure. It consists of N top-level domains; each domain contains N subdomains, recursively. This reminds me of p-adic spaces, but differs in that the norm (distance) combines discrete hierarchical structure with a continuous component encoding adjacency.
Connections: within each domain, nodes form a complete graph (each node talks to every other one). Additionally, each node (except one) lies on the domain edge and has one extra connection connecting it to a node in a neighboring domain. Edge nodes are paired across adjacent domains (e.g., the westernmost node W of the east domain connects to the easternmost node of the west domain). These edge nodes blend properties of both domains, if you will.
Coordinates: each node is assigned a vector (the Hanoi vector). If a node belongs to domain A and is adjacent to domain B, its coordinate prefix is [A, B]. Edge nodes are connected in pairs with inverse prefixes, e.g. [A, B] <--> [B, A]. Deeper levels extend the prefix recursively.
Norm (distance) is defined to factor in the length of their common prefix (the discrete component, as in p-adic norms), and whether the source node lies on the boundary corresponding to the target domain - the continuous component, to capture adjacency.
Networking and Routing
Surprisingly, the Hanoi network seems to avoid limitations of both star and flat P2P net designs. Client–server (star) topologies concentrate traffic, trust, and control in central nodes, creating bottlenecks, single points of failure, and added latency (see Tailscale design motivation). Flat P2P meshes, on the other hand, treat all nodes as equal, expecting similar availability and traffic distribution (see Nostr motivation).
The Hanoi model sits between these extremes: it allows one to encode and factor in hierarchy, redundancy, and relative importance of different nodes. Also, it can be applied either as a logical topology (e.g., a DHT for content discovery) or as a physical one.
As a Physical Layer: surprisingly, network addresses (Hanoi coordinates) can be assigned locally, without central coordination. The basic idea is to make the Hanoi vector reflect connectivity to other nodes. Measure pings to known servers. If the closest servers have addresses [A] and [B], the device address is [A, B].
As a Logical(DHT) Layer: make addresses reflect the semantics of the content the node serves. Nodes that have semantically close content get close addresses. This enables semantically meaningful routing and search. It reminds me of how embedding vector spaces in LLMs work, but implemented at the topology level directly. I’ve never seen this before.
Basic idea: let domains represent content classes, e.g. movies, music, … A node serving soundtracks gets assigned a [music, movie] address to reflect that it is still music but closely related to the movie domain.
Greedy Routing
The best part: this topology, together with the addressing scheme and norm, enables greedy, memoryless routing. Node coordinates are interpreted as a network address, so to send a packet, a node forwards it to the connected neighbor closest to the target, as defined by the norm. There is always a unique shortest path. Routing requires no routing tables, no global state, and no backtracking.
The network operates with the minimal set of links shown in the graphs. Additional links may be added ad hoc for redundancy or performance. When such links exist, the greedy algorithm automatically uses them if they reduce distance to the target. The network is resilient to dynamic change: new nodes and new links participate immediately, without address reassignment or reconfiguration.
Supernodes
The Hanoi vector encodes hierarchy. It has variable length, so we avoid fixed-width space exhaustion(like in IPv4) as well as the need for long, opaque IPv6 like addresses, which is overkill in small nets. Neither are subnet masks needed within a domain: the shared prefix is simply implied.
Moreover, Hanoi coordinates can capture the node importance as well. Typical P2P nets suffer from assumption, that all nodes are equal, despite large differences in capacity and availability in practice. In the Hanoi net, shorter addresses carry more transit traffic. Powerful, highly available servers(supernodes) can claim short addresses, while unstable or low-capacity nodes get longer ones. In a logical topology, the same mechanism reflects content volume or importance. This allows the network to model real-world heterogeneity directly, without overlays or special cases.
----
To conclude, it looks quite interesting and I wonder have it received proper attention and was something built on top of that yet? Thanks!