Tuesday, January 29, 2013

Cyclomatic complexity and improvisation

I really believe in cyclomatic complexity (aka cyclometric complexity) matters outside computer science.  I believe that the more choices one makes the more likely one is to make mistakes. 

But I also like to improvise in scenes.

I work in computer science.  After a while some of the concepts start to infect the rest of your life.  I look for answers by something similar to an AStar.  I weigh probabilities by means like a beam search.  I look for patterns as a (high-dimensional) mixture of Gaussians.  Concepts from work have become the lens by which I view my life.

Cyclomatic complexity is a way to measure the complexity, so the number of possible failures, and hence the difficulty of a scenario.

A significant chunk of my career has been spent reverse engineering the abandoned work of others.  A visual guess of cyclometric complexity has come to be my proxy for the "here be dragons" of old maps. 

In the dungeon, I have a couple scenes that I do really well.  Even for a mostly improvised scene I will set out equipment as though for one of my standard scenes, and understand where I could, if necessary, rejoin a standard scene.  Even if never used, an escape hatch into a good scene is a good backup.  Branches and return to known state generally has low cyclometric complexity.

But during negotiation I listen really hard, and try to figure out what really motivates a boy. And I really try to hear how I can modify a scene to match the appropriate fetishes and triggers.  I try to figure out exciting branches from standard scenes.  But one of the things that I keep in mind is the cyclometric complexity from a well known scene. 

Planning and theory aside, I had an odd weekend. I had a scene that involved a lot of moving parts (boys). Overall the scene was pretty good, but I made a few mistakes along the way.  The weekend had a couple overreaches.  I got slightly off-plan.  I doubt the bottoms noticed or remembered. 

In retrospect I realize that part of the problem was that the cyclomatic complexity of the scene was too high for me to fully understand the dynamics.  I need to build up to that from simpler scenes.