Monday, November 15, 2010

Strange and Wonderful

It's been a while since I've actively updated this blog, as I've had many other obligations and duties in life this past year. Having the opportunity to express thoughts in a public forum is, quite frankly, overrated in today's world. Between email, FaceBook, YouTube, blogging, and your cell phone, there's plentiful opportunities to talk.

No, what I really appreciate is that so many people wanted to listen. There's such an information overload these days that it's actually a challenge to decide what's worth your time. This past year I confess I've been doing a lot of listening myself and not much talking.

As with all blogs, the BrainWorks blog has undergone blog drift, the phenomenon whereby a blog gravitates away from the original subject and towards whatever is on the author's mind. So I thought it would be nice to do a retrospective of this blog, categorizing all previous posts according to topic. Not everything I write is Kant, but I hope it's not all Nietzsche either.

AI - General Discussion:
AI - Routing and Aiming:
AI - Objective selections:

    Life is strange and wonderful!

    Monday, November 2, 2009


    I love the internet! It's such an amazing storehouse of interesting information, much of which is even true. A while ago I stumbled on the website Every week the site features the linguistically embellished biography of some person who lived a legendary life. By and large they are factually correct (in the case of real badasses) or canonically correct (in the case of fictitious ones).

    A smattering of the many biographies:
    For some reason this site really tickles my fancy. It's the intersection of two things I both love and appreciate: learning and kicking ass. Take this excerpt from the article on Leonardo da Vinci:
    I can't overemphasize how goddamned ridiculous it is that Da Vinci conceptualized the freaking helicopter at a time when most people were riding around on donkeys and using a sundial to approximate the time of day. Seriously, the freaking printing press was considered cutting-edge technology in these days, and Da Vinci was one step away from dusting Versailles in a goddamned Apache Gunship.
    I suppose I could make some point about how "even you can be a badass," but lets face it. That's probably not true. The whole reason stories about these people are worth telling is that the average person simply cannot do what they did. That's what makes the story legendary, after all. You are not Johann Sebastian Bach. You aren't Prince. You aren't even Hannah Montana, and you never will be. Neither will I.

    But that doesn't bother me. Humanity has done some truly impressive things, including walking on the surface of the moon and returning to talk about it. It's worth taking the time to be legitimately impressed, to really understand what makes these feats of strength so difficult and how certain humans triumphed over them anyway.

    Monday, October 19, 2009

    We Can Worry About That Later

    As I've been in the middle of purchasing a house, my life has been extremely hectic. The past several weeks have been filled with housing inspections, mortgage application, reviewing and signing legal documents. And naturally every detail has someone who wants to renegotiate it. After closing, we'll still have painting, moving, decoration, and furniture purchases to handle. My life is really stressful.

    A few days ago my wife and I were reviewing the upcoming task list and for one item I mentioned, "we can worry about that later". I then realized I use that phrase an awful lot, and to me it means "we can handle that later". In other words, to me worrying is synonymous with work. Put negatively, I don't stop worrying until the work has been completed.

    It was an excellent moment of self reflection. I simultaneously realized why I'm so driven, intense, productive, and stressed. This life attitude has its benefits, but it's certainly not healthy in the long term. A few weeks ago I wrote about how the secret of a successful marriage is reducing stress. Perhaps it's better to say:

    The secret of happiness is reducing stress.

    After all, what else is stress but discontent about the possible future? It's a tricky balance though. If you live life in the future, you'll solve all these potential problems but always be tense as a result, never enjoying the present. If you live in the present you'll enjoy it only until something happens that you should have dealt with. How do you focus on the present while building your future? Personally, I feel like I don't balance these constraints very well.

    So I've been thinking about different ways to manage stress. Some common things people try include:
    • Eat and/or drink
    • Have Sex
    • Exercise or spend time outside
    • Sleep or practice deep breathing
    • Read a book, watch a movie, or play a game
    • Daydream or imagine good things
    • Procrastinate by doing less important work
    • Remove the source of stress
    Personally I spend a bit too much time on the last two items. Classifying these options, they seem to fall into one of three categories:
    • Solve the issue
    • Ignore the issue
    • Accept the issue
    Unfortunately if the only mechanism for relieving stress is to solve the problem, you're in for a rough life-- there's always something else you can worry about, and many things you can't fix Ignoring issues seems fine for small problems. And acceptance is the only option available for problems too large to be solved or ignored.

    I believe the real secret to happiness is properly identifying which problems should be accepted and which should be solved. And then realizing that most problems are of the former type. It's easy to get caught up in trying to fix everything, especially as a perfectionist. But the more you genuinely accept misfortunes as Not A Big Deal, the more you can enjoy the truly good things in your life.

    If that's true, then the real secret to happiness is forgiveness.

    Monday, October 5, 2009

    Squeezing The Margins

    My father has been a business consultant for decades, my mother is a certified financial planner, and my brother has run several small companies. So as you'd expect, my family talks a lot about money-- both now and when I grew up. Much of the discussion is about how to make the most money.

    For example, if you have a savings account that earns 3% a year and have a credit card balance that costs you 10%, you have no reason to keep anything in savings until that credit card is paid off. Not paying off the credit card costs you 10%, bringing the net return on savings to 3% - 10% = -7%, or a 7% loss. The 3% return isn't the full story on investment. You also lose 10% in "opportunity cost", since saving the money means you forgo the opportunity of paying down debt.

    On the other hand, if you have some subsidized government school loan with a 4% interest rate and you are earning 5% on average from savings, you will make more money by paying the loan off as slowly as possible, putting all additional money into in savings. When you put $100 into savings rather than paying this loan, you owe 4% more in loan interest ($4) but earn 5% more in savings interest ($5). This is a net gain of 1% ($1).

    I've heard all kinds of other, more complicated ideas to leverage money for potentially greater returns. All the ideas come down to this basic concept though:

    Maximize the spread between your expected investment interest rate and your debt interest rate.

    If you could get a loan with a 7% rate that funds a business with an expected return of 8%, then that's 1% better than not doing anything at all. In theory.

    The problem is that more complicated investment strategies have a greater chance of going wrong. There's simply more potential source of failure. In the real world there is no such thing as a guaranteed 8% return on investment. More typically what happens is that there's a pretty high chance that there will be between say, 6% and 10%. And there's a very low chance you'll get a 0% return or even less. So maybe you'll get lucky and get a free 3%. But another possibility is that the investment will give 6%. The business would consider this a success, but it cost you 7% to make this investment, so you're down 1% for your effort. And there's always the chance of a catastrophic failure, meaning you lose most or all of your investment.

    Lately I've been rethinking this strategy of squeezing the margins. The increased risk is certainly part of it. Mathematically you will maximize your money if you go from a guaranteed $1,000 to anywhere between $900 and $1,400 most of the time and occasionally $0. But maybe maximizing your money isn't the end goal of life. The potential life impact of losing between $100 and $1000 is probably a whole lot worse than the best case scenario of gaining $400.

    Additionally though, more complicated investments just take more time to manage and stay on top of. The purpose of money, at least in my life, is to give me more time and reduce my stress. Working hard for an extra 1% isn't worth it if I can't turn that money back into the time I spent to get it. Squeezing the margins isn't the key to financial security, though it does maximize your odds of getting lucky and striking it rich. Here's the strategy I use:

    Reduce, Reuse, Recycle

    This is the recycling motto. Most people don't know this, but these steps are ordered by importance. In other words, the most important thing you can do is reduce the amount of things you obtain that need to be recycled. The second most important thing is to reuse the things you have. And if can neither do without them nor reuse them, then as the last option you should recycle them. Sadly most people these days focus on "recycle" and ignore the other two.

    This mindset applies just as well to finances though, and with the same priority scheme:
    • Reduce: Don't buy things you don't need
    • Reuse: Don't have money in so many places you can't keep track of all of it
    • Recycle: Put your money in the place it gives the highest return
    That third rule is the same one as "squeezing the margins". Squeezing gets you into trouble when it violates the second rule-- once it takes a lot of effort to manage your investments, you are setting yourself up for a fall. But most importantly, the secret of wealth is not buying things you don't need.

    Monday, September 21, 2009

    A Pearl of Great Price

    My wife and I have been house shopping for most of this year. It's an interesting experience. How many things in your life do you buy that cost over $100,000 and take over a decade to pay for? The process is exactly what you'd expect of a six digit purchase-- exciting, intense, stressful, and a bit scary. The whole thing is making me rethink my basic economic mindset.

    If you go to a store to buy something you think will cost $100 and it actually costs $110, more likely than not you'll buy it anyway. Presumably you went there because you needed it. Driving around hoping to save $10 probably isn't worth the time. And even if an economist's equations state the value of time is worth it, most people just won't bother.

    But think in terms of a house. If you plan on spending $200,000 and the house you want actually costs $220,000, what do you do? $20,000 is a lot of money, and even if you're willing to pay it, you might not qualify for the higher mortgage.

    There was an interesting study done on how price changes affects willingness to buy things. In an experiment, they presented some people with this situation:
    You have decided to buy a full package vacation to Hawaii. The price is $2000. But when you sign up to pay, the price has dropped to $1600. Do you still buy it?
    Obviously everyone still does. Keep in mind that $1600 is a pretty good deal for a full package vacation. Then they gave people a different situation, with only the prices changed:
    You have decided to buy a full package vacation to Hawaii. The price is $900. But when you sign up to pay, the price has increased to $1200. Do you still buy it?
    Overwhelmingly people in this situation will not buy the vacation, despite $1200 still being an amazingly cheap price. For some reason, we as humans get fixated on the relative differences between prices. We approach the situation as, "If I buy the $1200 vacation, I will have to give up $300 in other things I wanted to get." It doesn't matter that we can't think of what those things are, nor that $1200 is still a great deal. It's just that by comparison, the option that is no longer available is superior. People would rather choose nothing than accept the feeling of a loss.

    Note that this is distinctly different from the traditional economic view of humans as rational consumers. Economics is on the assumption that humans rationally choose things that maximize utility, the benefit the consumer gets from consumption.

    Suppose someone values a vacation to Hawaii as being worth up to $2000. That is, if given the choice between gaining $2000 and gaining a vacation to Hawaii, they would have no preference between them. For any value above $2000, they would prefer the money, and for values below $2000, they would prefer the vacation. According to economic theory, this person would have bought both the $1200 and the $1600 vacation in the experiments above. But the experiments prove that this is not how humans operate. At best, humans act semi-rationally. And the extent of "semi" is up for debate.

    For me, this is the hardest thing about house shopping. I realize it's in my best interest to act like the rational economic consumer. I want to act that way, but my brain isn't wired like that. There is this concept of "fair market value" for a house, which essentially means, "what everyone else thinks someone else will pay". But as what prices people will pay depends on the relative context of other prices, the fair market value is at best a hazy estimate.

    What I'm learning is that while fair market value might affect whether a bank will give you a mortgage, it shouldn't affect your buying decisions one bit. Yet it's human nature to think it matters. Buying a house for $200,000 with a fair market value of $220,000 doesn't make sense if the house doesn't provide $200,000 worth of value to you. If it isn't the right size, in the right neighborhood, and so on, don't buy it even if it's theoretically a good deal.

    Fair market value doesn't tell you whether you'll enjoy your purchase. At best it tells you what kind of bargaining the seller might accept. When you compare prices to fair market value, you are making the same mistake that vacationers face with the $1200 Hawaii vacation. You are comparing an option available to you ($1200 or the seller's asking price) to an unavailable option ($900 or the "fair market value"). That's not a good basis for making financial decisions.

    The rational choice is to compare the seller's asking price to prices from other sellers. Suppose you like a place but the seller wants $240,000 for it. Compare it to other available homes with similar features. If the next best option costs $260k, then $240k is good deal, fair market price be damned. And that's doubly true if you haven't found any suitable alternatives.

    It's easy to fall into the trap of thinking of financial success means maximizing your money. Money is only as useful as the things it can buy. It's better to make decisions that maximize the number of things you want to have. It's true that saving money is the best financial decision the vast majority of the time. But when you find what you're looking for, be willing to pay whatever you can afford to get it.

    Monday, September 7, 2009

    Being Mr. Right

    I've been happily married for the past nine years, and we dated over four years before that. Like everyone, we've had ups and downs, but the experience has been overwhelming positive. We have very much grown together. We complement each other well. Not everyone has the same experience, however. I'm conscious that our happy marriage is in large part because of the effort we've put into it, not because "we're so totally in love" or "we're perfect for each other". Those things are true, and they're required for a successful marriage. But neither being in love nor being compatible are sufficient. Contrary to popular opinion, love isn't all you need. If you want your marriage to be a success, or any relationship for that matter, it helps to understand the purpose of that relationship.

    When we were teenagers, my brother said something really insightful to me:
    Americans don't get divorced when they fall out of love. They get divorced when it's less trouble than staying married.
    His point was that many people stay in unhappy marriages because to them, it's better than being alone. But ultimately he's hinting at a rather pragmatic view of marriage. There's so much description of marriage in terms of love and everlasting commitment, but I think that glosses over this simple fact:

    People get and stay married because it improves their life.

    Simply stated, people think they are happier married than single. The list of common causes for divorce looks strikingly like common causes for depression:
    • Financial trouble
    • Child raising issues
    • Sexual incompatibilities
    • Infidelity
    • Lack of Communication
    • Physical or Mental Abuse
    • Addictions
    • Lack of Compatibility
    Really, all these issues boil down to one root cause:
    • Stress
    Either the couple disagrees about how to handle an issue and knows it (a disagreement) or they don't know they've disagreed (a miscommunication). Suppose one person wants to spend money on food, housing, and a fancy car. And the other person wants to spend it on food, housing, and travel. If they buy all four things and get into debt, they'll end up in a situation where they can buy neither fancy cars nor nice vacations. Financial stress will tear a marriage apart.

    But so can any stress. When parents disagree about how children should be raised, they are likely to blame problems the children create on the other spouse's decisions. If one spouse wants sex once a day and the other wants it once a month, then at least one person will be unhappy, but probably both.

    The secret to a successful relationship is using it to reduce life stress rather than create it.

    That's why love is necessary but insufficient. Love is merely the motivation that makes you decide the other person is worth the effort. The secret ingredients are solid communication skills and a willingness to compromise.

    Good communication prevents small problems from becoming large problems. For example, suppose one partner says, "Lets talk about that later" whenever she's feeling a bit overwhelmed with an issue and needs some time to process alone. But her husband interprets that as, "I don't want to talk about this at all." He might end up feeling emotionally shut out by her. And she might feel neglected because he never initiates the conversation at a later date. This problem is completely avoidable as long as both people take the time to express how they interpret what the other person says and does. The misinterpretation would be immediately clear. Without taking time for that though, these irritations build up into years of needless emotional pain.

    Of course, sometimes both people understand each other perfectly well but disagree about what they want to do. In the case of a husband who wants to buy a fancy car and a wife who wants to travel abroad, trying to do both will put them in financial trouble, so that's not an option. Sometimes they just have to compromise on what they want for the sake of the other person. Maybe that means buying a Nissan instead of a BMW, and that they travel to Miami instead of Paris. Or maybe it means they travel to Paris this year, but they buy a BMW in two years. Both people need to realize that their needs can't be the first priority 100% of the time, nor can the same be true of the other person. The overall happiness of the couple needs to be more important than any one particular desire.

    There are also situations where couples understand their differences of opinion and are unwilling to compromise. Abusive relationships fall under this category. When the husband believes it's okay to beat up his wife and the wife disagrees, they shouldn't compromise by saying it's only okay to beat her on certain days of the week. If you can't agree to disagree, that's a sign the relationship needs to end. No amount of love or compromise will stop an abusive spouse or convince someone to quit their drugs. They've declared what they want out of life, and it's simply not compatible with what you want.

    This is really the category of "irreconcilable differences", and applies to innocuous things as well. For example, desired frequency of sex. If one person is unwilling to have sex more than once a month and the other person wants sex daily, there aren't a lot of options. One person could start having an affair, they can agree to an open relationship (essentially a sanctioned affair), they can "compromise" by only having sex monthly and building long term resentment, or they can break up. Breaking up seems like it causes the least emotional pain in the long run in most cases, which means it's often the best choice. There's no shame in breaking up when you realize things won't work out. You just weren't the right people for each other.

    Monday, August 24, 2009

    Self Education

    We can say that Muad'Dib learned rapidly because his first training was in how to learn. And the first lesson of all was the basic trust that he could learn. It is shocking to find how many people do not believe they can learn, and how many more believe learning to be difficult.
    I strongly believe in the value of higher education, but it's just a guidance and support network. The real motivation and effort must come from the learner. As such, I also support autodidacticism, the practice of self-directed learning. I don't just link Wikipedia pages as an academically offensive form of citation. They contain information that's genuinely useful and accurate more often than not for people who want to learn more.

    There are famous autodidacts in virtually every field of mathematics, science, music, and the arts. The list includes Albert Einstein and Frank Zappa, for example. That suggests there are no subjects a self-learner couldn't learn to master. The barriers are just natural aptitude and motivation, not field of study. Of course not everyone can understand quantum mechanics. But I suspect more often than not, people are held back by a lack of motivation, not a lack of aptitude.

    That's not to suggest raw talent isn't important. Famous self-learners are famous explicitly because they happened to be so excellent in their field. Of all the people in the world, on those who both try to learn physics and have the talent will become the next Einsteins. Isaac Newton is famous for his work on Mathematics, Gravity, and Optics. But he also spent years working for the Royal Mint. We remember him most for the areas he excelled at.

    I don't think it much matters if you try something new and aren't amazing at it. As long as you enjoy it, it's worthwhile. Over the past few months I've been teaching myself how to play classical piano. I'll never be Bach or even just a concern pianist. But I will be good enough that I can play some of Bach's works and that's all that matters to me. More than latent ability, I believe the most important factor is the audacious belief that you can teach yourself sometime new. BrainWorks itself is the result of that belief. I started with no relevant formal training in artificial intelligence and produced some pretty groundbreaking game AI.

    You don't have to pick classical piano or AI research if you don't think you're up to the task. But surely there is something you don't know but could. Can you solve a Rubik's Cube? What meal do you enjoy the most that you can't yet cook? Do you know how a television works? What about how the Enigma code was broken in World War II? Can you sail a sailboat? Do you recognize constellations in the night sky? Have you ever made a piece of pottery? Repaired an automobile? Written a short story?

    Humans are far wealthier now than at any previous time in history, and the mere fact that you can read this on a computer proves it. The latest Wall Street fallout is a drop in the bucket compared to the technological gains of the past century. More wealth converts itself to more leisure time if you want it to. That makes this coming century the setting of the greatest potential renaissance ever. Don't waste that time on television or Facebook. Find something you don't know you love and master it!