Lone Wolf story graph

Few days ago Joe Daver of the Lone Wolf fame passed away, that a pity, it was an enjoyable type of book when I was a child. Since several years Project Aon is freely publishing his works in a browsable way.

Project Aon provides a graph representation of the books (e.g. here) but I wanted to have my twist as remembrance.

I have prepared a browsable story graph of the first 7 books, highlighting deaths, combats, quiz nodes, looping edges and death probability. In particular I have create also one single view with all these 7 books that gives an impression of the flow at glance.


Click on the nodes to get to the page.
  • Orange octagons are fighting situations. 
  • Red cut circles are deadly situations.
  • Sommerswerd mention is in magenta
  • Start and End are in green
  • Looping edges have special arrow
  • Edges are colored by death probability (only DAG graphs)
  • Edge label is the death probability (only DAG graphs)
  • Bold edge means shortest path
  • Dashed edges means subject to random pick


All books 1-7: PDFSVG . Title is on top of each columns.

Separate books

  1. Flight from the Dark (PDF, SVG, book)
  2. Fire on the Water (PDF, SVG, book) - initial part structured
  3. The Caverns of Kalte (PDF, SVG, book) - loopy, two ending branches
  4. The Chasm of Doom (PDF, SVG, book) - long simple structure
  5. Shadow on the Sand (PDF, SVG, book) - two large shortcuts
  6. The Kingdoms of Terror (PDF, SVG, book) - simple structure
  7. Castle Death (PDF, SVG, book) - branches, articulated structure

Graph Processing

Graph computing can be used for some statistics:
  • Loopy edges
  • Shortest path - Dijkstra
  • Total number of paths, only if the are able to remove all loops. There are issues with books 2 and 6 for which they have been fixed manually. The algorithms requires topological sort
Note that the shortest is path is purely topological and there is no verification that is had conflicting dependencies (e.g. disciplines) or it has major side effects (e.g. loss and not recovery of the inventory).

Random based edges have been excluded from shortest path computation. If there is no possibility of shortest path we have highlighted with a negative sign.

BookShortest PathTotal Paths
271 (R)384775507967329330790400
336 (R)8821161258410880000
455 (R)95368579164278784000
566 (R)542718250726171907017716793344000

Given the DAG version of the story it is possible to compute the death probability of a path by starting from the tails (0 for winning, 1 for death). We propagate the death probability up based on the possibility of taking a path: we consider uniform possibility for regular path, and instead interval probability for the random paths. In addition if we pass by a node we make sure that probability is at least 50%. Finally the probability is colored with a colormap "cool".

We can combine shortest path and death probability to understand how death probabilities goes in the shortest path. The asterisk is a combat situation.

Some notes about structure as it emerges from graph and from memories of reading:
  1. In book 1 there is a path without fight nor random
  2. Book 3 is the only one with a failing end without death. There is a full branch of many nodes that gives this outcome. 
  3. Book 5 has a quiz, needed to add a custom connection between sections


The code for extraction and generation is on github. It's based on Python with graphviz and networkx. You are welcome to reuse it.

The concept is that we first extract graph structure and semantics from the HTML files, then apply graph processing techniques and then generate the visualizations.


Ideas for improvement on visualization:
  • associate event to nodes with icons
  • track magic items acquisition and use
  • use lightbox with page content instead of new page
Ideas for graph theory analysis:
  • weight nodes by fight relevance / other events and perform other path search
  • if the resolution always has a random path, then compute multiple shortest path by split the graph in parts and look from start to random page and then to end
  • highlight VIP nodes
  • prune edges based on conditions (e.g. disciplines, or objects)
  • identify connected components (sub-stories)
  • solve the removal of cycle problem that prevents the computation of total paths

Graphs and Research

While this is just for fun, I worked on graph analysis applied to Technology Trajectories based on citations among patents.


Popular posts from this blog

Docker for our ROS robotic overlords

cmakego: Simpler access to external libraries in CMake

Algebrical Data Types in C++