I suggest I rewrite the program in to distinct parts: `lineup` and `history`. With each iteration the monkey `clicks` a link from the lineup not yet in history. When the monkey exhausts the available links or otherwise tires, the history has enough information to `graph` the choices made as a tree. The monkey will need methods to recognize various kinds of `links` and to heuristically `choose` from these possibilities respecting writing and browssing conventions unique to a particular wiki. element github
New implementation tries to separate cross-cutting concerns. Major sections identified as follows.
// I N I T I A L I Z E // I N T E R A C T I O N // B E H A V I O R // R E N D E R I N G
pages/walk-the-neighborhood
http://ward.dojo.fed.wiki/assets/pages/walk-the-neighborhood/walk.html