Tuesday, March 12, 2013

Constraint Satisfaction

What's the least amount of work that I have to do in order to pass this course? ~ anonymous students everywhere

Successful people are willing to do the things that others are not ~ one of my teachers from back in the past

I can't get no satisfaction ~ Mick Jagger

I took a post-graduate course on Artificial Intelligence (AI). I loved it, and I wouldn't mind taking it again sometime. The class wasn't easy. We spent a great deal of time and effort designing complex algorithms to solve constraint satisfaction problems, or CSPs.

The constraint part of the CSPs is the set of limitations, situations or events to be maximized or avoided as part of the problem. The methods for solving the CSPs involve complex recursive searches for the best possible of all possible solutions. That's where the artificial intelligence comes in. AI can be defined (according to my source for all such things, Wikipedia) as, "a system that perceives its environment and takes actions that maximize its chances of success".  In a nutshell, AI provides the capability for solving CSPs.

It occurs to me - and probably not just me - that real life is a constraint satisfaction problem. Our day to day lives, as well as our longer term goals, involve the problem of satisfying a set of constraints. And - get this - we solve them by using something called natural intelligence (NI). I sort of made that up, but the term has already been in use to some extent.

As an example, a student may believe that she will get the best possible job by attending the university ranked highest. But the highest ranked universities may have the highest tuition, and our student may only be able to afford so much tuition expense. In addition, our student may want to attend a university within a certain radius of home. All of these limitations and constrictions about the universities are the constraints. So picking the best possible one in order to get the best possible job is a nearly real-life CSP. And we would make the choice based on our best possible application of NI.

I would argue that exactly all of our choices and decisions - our day to day ones as well as those related to our long-term goals - make up constraint satisfaction problems. The hard part, of course, is identifying and weighing the constraints and their relative importance. I would further argue that successful people are those who are somewhat better at doing this. If we can say that successful people are willing to do the things that others are not, that is most likely because they have clearly considered the constraints of the problem in some way such that the negative ones have been minimized and the positive ones maximized.

Naturally this brings us to running. Yes, of course running is a CSP.

To wit, an example of a running CSP: I want to run fast in races. In order to do so, I need to run fast, at least occasionally, in training. But I don't want to get injured, so I shouldn't do too much. It's best to do speedwork at the track, but the Brunswick HS track is often closed. I don't like to drive anywhere to run; I'd rather do it from home. And dang-it if it ain't cold as heck out there, restricting my breathing whilst I try to get moving fast.

A successful runner would probably say, "damn the torpedoes" and run fast anyway. I, on the other hand, need to work on my willingness. And my NI.

And don't get me started on the Knights Who Say Ni; that's a different subject.

2 comments:

ValerieLona said...

Interesting thoughts. Another way to look at it, is that you are planning your running schedule with "optimistic realism"

http://psychcentral.com/lib/2007/realism-and-optimism-do-you-need-both/

Dan Horvath said...

The only time I'm optimistic is when things are going badly. That's when I get into trouble, because then they get worse.