beware of forward chaining [12/20/2006 06:21:28]
Warning: long, rambling, meta-introspective self-reflective forward chaining stream of consciousness rant ahead.
I admit it. I am a forward chainer.
- When I sit down to write one of these posts, I don't know how it's going to end. I just get an idea in my head, and I start writing in order to explore that idea.
- When I hit a site like reddit, I'm not looking for anything in particular. I just want to see what's new and follow the interesting links.
- When I go into a bookstore, I just wander around, looking for anything interesting.
- When I answer email, each issue I tackle makes me want to launch some new project to solve that issue once and for all.
- When I see a plate of cookies, I suddenly want a cookie.
- When I see candy in the grocery store, I pick it up.
- When I see something I want in the store, I buy it.
- And so on.
As a forward chainer, I'm rarely bored and I come up with all kinds of cool ideas, but forward chaining naturally leads to excess:
- long, rambling posts
- time wasted surfing the net
- piles of unread books
- hundreds of unfinished projects and commitments
- an expanding waistline
- mounting debt (or shrinking bank accounts)
- And so on.
A perfect example: right now, as I type this, my mind is on chess. I was going to say that chess is a perfect example of a forward-chaining game, but then I realized it only seems that way to me because of how I play chess. I play like a computer: asking "what would happen if I did this?" for a large number of moves. But unlike a computer, I can't follow all the chains and pick the best one. Forward chaining works great for computers, but not so great for me. The best players, though, only consider one or two moves each turn. Could it be because they only consider the moves most likely to get them what they want?
These sorts of tangents run through my brain all the time, and I often have trouble distinguishing between productive and unproductive lines of thought. I know for certain I'm off track whenever my thoughts turn to lojban, but most of the time it's not so cut and dry. :)
Another thing I've been thinking about lately is super-powers, and how super heroes tend to use their power as the answer to every problem. I was thinking about how abilities such as persuasion, marketing, programming, and so on work the same way. To a marketer, everything is a marketing problem. To me, everything seems like a programming problem - or at least a system-manipulation problem of some kind (perfect example: learning piano by writing piano training software). Forward chaining might be such a "super-power" because I sure do come up with some clever stuff some times. But it's the type of power you gotta learn to control, or else it's going to wreak havoc.
One alternative to forward chaining, is (of course) backward chaining.
I was going to write a post called Writing for Real. The difference between what I do here and "real" writing is that with the real writing, I'd organize my thoughts. The important stuff would come first, and I'd have a thesis and I'd think a lot about the reader, and where I want to take them. Then I'd work backwards to figure out how to get them there. This is the essence of backward chaining.
Sometimes putting a different label on things makes a huge difference. One of the seven habits of highly effective people is "begin with the end in mind". Another is "be proactive". Both of these hint at the idea of backward chaining. I try to follow both of these habits, but I guess in my mind, they were reserved for bigger issues. For example, my list of 1-year goals is very much along these lines, but I still have a hard time really visualizing what it means to "release my web framework" or "spec and implement tangentstorm".
Until now, my approach to my goal has been very much about the next action. What's the next action for tangentstorm? Well, one feature it will have is an outliner, so I made an outline class. The "next action" concept, as described by David Allen in Getting Things Done, is very much about forward chaining. I mean, you could have your entire project planned out, working backwards from the goal, and then when it comes time to ask what's the next action? you can just look it up on the plan. But that's not how Mr. Allen describes it.
In the Getting Things Done system, you have this thing that you don't know what to do with (he calls it "stuff") and you figure out the next action. Basically, you consult your intuition and come up with a small step that will lead you toward the bigger goal. Then you chain backwards from this small step until you find the action you can physically do. (For example, if the step you come up with is call Bob, the next action might actually be to ask Sally for Bob's number.) So basically, GTD shows one way to combine forward and backward chaining.
One problem I see with the GTD approach is that sometimes the next actions I come up with seem to bring me closer to the end goal, but then it turns out the path I was following is a dead end, and I have to come up with a new path to the end goal. This is a common problem with forward chaining, and of course the solution is to backtrack.
(Oh yeah: by the way, forward chaining, backward chaining, and backtracking are all terms from the development of expert systems and logic programming. So I'm using the terms in a technical sense, though fuzzed up a bit because I'm talking about brains rather than computers.)
In his book, It's Not Luck, Eli Goldratt presents a set of thinking tools, many of which are all about forward and backward chaining:
- The Current Reality tree helps you chain backwards from existing undesirable effects (problems) to the underlying core problems.
- The Future Reality Tree helps you chain (either direction) between a proposed change and the desired effects, to ensure that the idea really gets you what you want. This includes working around negative branches (new problems that would arise from the proposed solution).
- The Prerequisite Tree helps you chain backwards from a goal to the present moment, by identifying obstacles that need to be overcome.
- The transition tree is a more fine-grained chaining tool, for detailed planning of intermediate objectives.
(Also handy are the classic PERT and Gantt charts, though these fit better with larger, multi-person projects.)
I use all these tools from time to time, whenever I set a big goal. I also use an outliner. But the software I have available to me is crude. Each piece of software gives me only one view of my thoughts (granted, tinderbox has both outline and map views, but the map view doesn't work the way I want). So my drawings don't talk to my outlines and my outlines don't talk to a database, so it's hard for me to take an idea from concept, to plan, to a task list I can share with other people, and so I'm constantly wanting to create a new tool that works better for me.
The "tangentstorm" program I keep talking about is of course my answer to these problems. It's a diagramming tool and an outliner, and it can talk to the same amorphous backend database that my web stuff uses. It's on the goal list because I was tired of half-starting it and then deciding something else was more important before I got anywhere with it. I wanted to just sit down and write it once and for all.
I really think that having tangentstorm working will make me a better backwards chainer, and provide me with a tool for choosing how and when to unleash my forward chaining superpowers. :)
But.
Well... I can't shake the feeling that I'm onto a core problem here. It's not sufficent to be a better backward chainer a few hours a week when I'm planning out my day or the goals for the week. If so many of the problems I listed at the top of this post are caused by one mode of thinking, then maybe I should make an effort to change that one thing. How hard can it be to stop whatever I'm doing and ask myself am I working toward a clear goal here? In places, it could be as simple as making sure I have a grocery list before I go to the store.
Well, let's try it. Am I working toward a clear goal with this post? No, I'm just exploring an idea. It's fun. It seems educational. I feel like I'm getting a benefit. I suppose the reason I sat down was to think about forward chaining and whether it really is a major cause of my problems. I suppose I've convinced myself that it is, so now I'm just... Well forward chaining about that idea.
I should note that forward chaining logic is still logic. It's not about being irrational, it's about how you choose what to think rationally about.
See, but here's my problem. Whenever I get to a point like this... Well, I feel I've gained some insight here, but I'm not sure what to do with it. I guess what I'm thinking is that if I could get in the habit of backward chaining as the default -- on a minute to minute basis, and not just for the big things -- then I'd be a lot more effective.
The disconnect is that backward chaining means looking at my list of goals and focusing on those. And here I'm chaining forward on something and I don't know if it connects to those goals or not. That's the whole point of forward chaining. I come up with tons of cool ideas, but I'm off on a tangent. And of course this one is particularly tricky because it's not about my goals but about my strategy for meeting my goals. Going down my list here, I see that every one of these goals would benefit from better backwards chaining and less forward chaining.
I suppose what I've done here is create a very rough current reality tree in my mind showing how a bunch of problems boil down to a core problem, and now I'm sort of half-visualizing the corresponding future reality tree where all these problems get solved if I somehow change my habitual way of thinking. I haven't filled in all the links, though, and my mind is already working on the problem of how I'd make this happen, before I even see how it needs to work in order to reach my goals.
I'm stuck. I see the direction, but I don't see the connection.
... Just went to grab Six Thinking Hats off my shelf only to discover I no longer seem to own it. Probably for the best. Why did I want it? Because I don't know where I'm going with this idea and I wanted a list of things to try. I approach a lot of problems this way. Forward chaining. My bad.
Okay, so... Why am I still doing this? Because I feel like I have something actionable here that will help me reach all my goals much more quickly, but I yet see how to apply it. So I'm looking to test out a bunch of ways to apply the idea, and see if any of those are interesting. Holy crap. I just can't stop.
What would backward chaining look like, then?
I'd begin with the end in mind. The goal is to reveal to myself how each of my goals is much more doable once this idea is applied. And either I'll figure out how, or I would realize I'm wrong and toss this whole idea. But I don't think I'm wrong.
So, working backwards, my search begins with my lists of goals: my 12 personal goals, and the 14 or so goals I've listed out for my company. Well, obviously, some of these are projects, and the way to chain backwards would be to make a project plan, either as a pert chart or a prerequisite tree, or a transition tree. So I could go down the list, and make plans for each project goal.
Negative branch: this is not "agile". What does that mean? I mean I could spend months doing nothing but detailed planning, and not actually get any work done. A refinement would be to prioritize the project list, and do one thing at a time. In other words, make it a depth-first backward chain rather than breadth first backward chain. That's easy.
Next issue: I can't make plans for all these things, or sort them, because it's not clear to me what a solution would actually look like for each goal, nor do I have a clear sense of the time and energy costs involved. Solution: write a paragraph or so explaining how I'll know when each goal will be accomplished, then prioritize, and then begin following the depth-first backward chaining algorithm; creating a detailed plan for the highest priority project, and then implementing that plan, and then starting over with the next highest priority project.
Next issue: while all my company goals appear to be projects, some of my personal goals are not. Instead, they are goals about changing habits. Some, such as going on six dates and writing a novel and visiting 25 groups could be either project goals or habit goals. The dating thing is kind of weird there. The real intent is that I'd change my ongoing habits when it comes to dealing with attractive female strangers. The point is to be more friendly and outgoing, not to fill a quota - that's creepy. I'm trying to change a habit and the numbers are just a simple indicator that I've changed my anti-social ways. :)
Same thing with the money goals. I'm not currently in a position to save my way to 10,000 dollars. The goals specify that something dramatic will have changed in my relationship to money, but I'm not clear what that would be. Creating a systematic, well defined marketing pipeline that I can then optimize seems to fit the bill, but is one such tool enough? I don't know.
These are not good goals. They're just reminders of some ill-defined changes I want to make in my life. I suppose it's not surprising that I haven't made much progress on any of them.
Three of my habit goals are very well defined. I broke rondo alla turca into the small repeating pieces and I hacked up some software to help me practice a small piece, and I'm doing quite well with it. With my bookshelf, I've divided the books into piles of ten and I'm reading one after another. With getting in shape, the goal is well defined and it's very clear to me what I need to do to get in shape, but I have a very hard time getting myself to do those things. It's not lack of motivation, it's lack of organization: not exercising because it always seems to be the middle of the night, not eating right because I don't have a meal plan - or I plan a few meals and then exhaust the plan and just wind up snacking on whatever's quick and easy. Forward chaining in action.
...
Had to take a break for a few minutes. Some thoughts that occurred to me:
- Another word for backward chaining is top down. And another word for forward chaining is bottom up.
- Most of my really great, breakthrough ideas - including this one - are a result of forward chaining.
- HOWEVER: forward chaining produces so many great ideas that nothing gets done. It's a quantity vs quality issue. As Stalin said, quantity has a quality all its own. Of course, Stalin was hardly a role model. It seems much better to really dig deep on a few "great ideas" and finish them than to come up with a million great ideas that never actually get implemented.
- When I'm writing like this I get the feeling I'm on to something, and I just keep writing until I find out where the idea takes me. Except sometimes it turns out the ideas don't go anywhere at all, which is why I end so many posts with something like "okay, I'm rambling. Time to shut the heck up."
- A bottom-up approach like Getting Things Done could still be very useful for all the little things I have to deal with. I might even find it usable if I used this backward chaining stuff for the bigger issues and limited GTD to the little stuff.
Anyway. My weight issue is certainly the most visible manifestation of forward chaining. As I said, I know what I need to do to get in shape. And I often do those things. I eat right, and I exercise. But I also eat junk food and avoid exercise. There's a plate of chocolate chip cookies in my kitchen right now, and just typing this makes me want to go eat one. The thing is, most of the time I would eat the cookie. I wouldn't even to stop to think whether it was in line with my goals or not. The chain of thought that leads me to eat the cookie (or buy the cookie) is a completely different and disconnected mindset from the one that leads me to go work out.
Same thing with sleep. I've spent the last few nights forward chaining on ideas (hopefully in the general direction of some of my goals) and reacting to my inbox. And so now it's 4:30 in the morning and I'm wide awake. I know this sort of nocturnal schedule is bad for me and interferes with all kinds of things, but in the moment I'm not thinking about that. I'm caught up in some other idea that may or may not even be connected to any of my goals.
Even the six dates and twenty-five groups goals are indicative of this way of thinking. The real goals of course are to have a great relationship and make some friends here in Atlanta to hang out with. That's what I want. But when I tried to make those into a specific goal, the thinking was: well, just meet a bunch of women. Go to a bunch of groups and meet people. Perform a bottom-up, forward-chaining search.
In a sense, there's nothing wrong with that. I mean, part of the idea behind the number six was that I don't necessarily want to just jump into a relationship with the first nice woman I hit it off with. It's a protection mechanism. But what it's protecting me from is jumping into a relationship with someone when I don't have a clear idea what I want out of a relationship. My last girlfriend was great, but she doesn't want to move to Atlanta or give up smoking and so it was pretty much doomed from the start.
A backward chaining solution would be to figure out what I want in a girlfriend, figure out what kinds of things I'd have to do and what qualities I'd have to cultivate in order to attract that kind of person, and what sort of places I'd have to visit to meet someone like that, and go make all those things happen. I guess it was easier to say "go have 6 dates, even if they're bad" than do all that work. Also, going on six dates is a numbers game. Dates are not hard to come by if you don't have any standards. But it turns the whole concept into... Well, a project. It's just a dumb goal. At least I had the sense to add an escape clause in case I got involved with someone.
...
Anyway, so I have habit goals and project goals and a few goals that aren't yet clear to me at all. I need to clarify all the goals, prioritize the project goals, and then somehow need to break all this down to the level of daily action.
That's the stumbling block. How do I put these ideas into action without becoming a robot?
That's not fair. Many people are very goal driven yet manage to have fun, well-balanced lives. In fact I can easily see how this kind of thinking would result in more fun and balance in my own life, if I could just do it.
There's still a disconnect here though. How do I make this happen in the moment? Is practice sufficient? What, specifically, do I do?
Well, I guess I know what it would look like if I were to do this. I would have outlines or diagrams showing clear paths to all the habit goals, and for the highest priority project goals. I'd have a very clear cut eating plan and exercise every day. I'd have some sort of system in place to let me know what I would be eating each day, and so I would be able to generate grocery lists from that, either by computer or by hand. I'd have to have some kind of flexibility in there though or I'd go crazy. This could be as simple as committing to the Body for Life system - but as a lifestyle, not a 12-week plan. I'd have a daily checklist, or schedule.
Uh-oh. I've had schedules in the past. I tended to drift. But I've drifted from goals I've had in the past, too, whereas the current batch have remained pretty solid for me.
Of course in the past, I was trying to schedule my life in spite of my habit of coming up with millions of unfocused ideas and distracting myself. Whereas now I know my priorities (even though the actual lists are not yet prioritized), and I'm aware of this forward chaining habit and its consequences, and I can make decisions about when to use it and when to turn it off.
...
Some psuedocode:
habits = [
('sleep', 8.0),
('workout', 1.0),
('shower', 0.5),
('meal_01', 0.25), # 6 small meals/day on BFL
('support', 2.0),
('piano', 0.25),
('gtd', 0.25),
('meal_02', 0.25),
('work_code', 2.0),
('meal_03', 0.25),
('goal_code', 2.0),
('meal_04', 0.25),
('reading', 0.5),
('social', 1.0),
('meal_05', 0.25),
('support', 0.5),
('meal_06', 0.25),
('write', 0.5),
]
slack = 4
assert slack + sum([time for (_,time) in habits]) == 24
while True:
if today==SUNDAY:
pass # free day
else:
for area, time in habits:
focus_on(area, time)
except Exception, e:
handle(e)
...
Yeah. That's pretty rough, but it seems to cover my priorities. If I don't have a clear next action in an area, I would spend the time revisiting my goal and working backward until I had a clear plan.
...
I'm trying hard to come up with some negative branches here. I've got a lot of doubts but nothing explicit.
I guess the most basic is: how do I know this is going to make a difference? If I imagine trying to live this way, I see weird things happening:
- No more long, rambling blog posts, except perhaps on sundays. These things take hours to write. I see more short notes in an "idea" outliner, and more tightly focused posts based on fully formed ideas.
- No more marathon coding sessions. At 2 hours a day for the top company project and 2 hours a day for the top personal project, my coding style would change dramatically. I'd have to break each project into specific tasks and work from a plan.
- By default, the 4 hours of slack would be for getting things done. Shopping. Laundry. Paying bills. Most of my entertainment time would center around reading (working through the bookshelf).
- If I really put a value on backward chaining, I'd do a lot less surfing. When my mind wanders and I run out of things to do, I'd reach for my project plans - not for that reddit bookmark in my browser. :)
- Part of that getting things done time would involve planning my diet. I may wind up planning the whole week out on Sunday (from a default template) and doing all my shopping up front.
- The social aspect still seems hard. It would be good to find some weekly, recurring events to go to. (Group biking on Saturday, Karaoke on Thursday...)
- I'd need some sort of channel for writing down cool ideas, just to get them off my mind. Perhaps a "someday/maybe" outline. Maybe I'd just write them here in this blog.
- For some reason, I suddenly see myself doing poetry readings. Not in a "pour my heart out" or "o dark soul and dismal world" kind of way, but just little clever, funny poems. Fitting a concept into a particular framework in verse seems like a fun puzzle. This came up when I started thinking about what I'd do to meet the kind of women I might really like, but it's also a way to channel all my crazy thoughts into something manageable, something I can do while I'm riding around the park, and it would give me an excuse to get up on stage.
- I see myself sticking to a regular sleep schedule naturally, without even worrying about drifting off into vampire mode.
- I see the switch from forward to backward chaining as my "system default" being a little awkward at first, but quickly becoming a habit, and a very comfortable way of working.
I dunno, this seems right to me. It makes sense to me, it's clearly connected all the way back from my list of goals, and I can start taking action on it right this minute. I guess I'm done here. Neat.
