Showing posts with label work. Show all posts
Showing posts with label work. Show all posts

Monday, August 10, 2009

Follow Your Dream

I've been watching some presentation videos on TED.com from their yearly conferences and as I scientist, I've found them very inspiring. There was a demonstration of a cheap water filter that could be deployed across the entire globe and seriously reduce infectious diseases that billions of humans are currently in danger of. Deaf percussionist Evelyn Glennie talks about music and listening. I watched a video of Elaine Morgan talking about the major differences between humans and other great apes. She makes a compelling argument for humans evolving from a species of apes that lived in water.

But most of all I appreciated this talk about living a passionate life. The speaker tells a story of a Yugoslavian Jew who escaped Nazi Germany and at every stage in his life found the resources to make a profound impact on the region he was living in. After watching these videos, I found myself very motivated to make an impact on the world at large. I believe that in several decades, I too could present something of value, and if I don't do that, then perhaps I'm not living up to my potential. But then I wondered if my motivation was misplaced. Michael Pritchard worked on a water filter because he was dismayed by the aftermath of Hurricane Katrina, not because he wanted to "make an impact on the world".

I rethought all the presentations, trying to find the common thread. What did these these people have in common that helped them accomplish their dreams? They all have some raw talent, but primarily I got the sense they were strongly motivated, and their motivation was directly for the the task they wanted to accomplish. Evelyn Glennie wanted to be a musician even though she is deaf. Through this she has become inspiring, but her motivation wasn't to be an inspiration.

Rather, I see these characteristics making up their stories:
  • Be motivated by the dream itself, not the result of the dream
  • Make plans on the scale of decades but don't follow them exactly
  • Don't ever give up when facing opposition
All of these people are somewhat talented and have a clear wealth of motivation. There weren't any presenters who were totally brilliant but only somewhat motivated. Success is about persistence. Each person had enough motivation to focus on something that would take years or decades accomplish. They all got discouraged and did not quit. When something stood in their way, they changed their plans to get around that obstacle. This leave us with two questions to answer:

What things do I care about?

How can I increase my motivation?

No two people have the same answers for these questions, and I believe you can only find these answers through introspection. In general though, people are motivated by positive feedback, concrete objectives, and small, discrete tasks. Things get hard when there aren't any positive results, the objective isn't clear, and the tasks can't be easily divided into portions.

This suggests that successful people are intrinsically optimists with a healthy dose of realism. They need to believe things will work out even when there's no feedback suggesting that while remaining grounded enough to change plans to get around adversity. Too much optimism and you'll stubbornly try the same thing and fail. Too little optimism and you'll just quit.

The good news is that this provides a metric for determining what you need to change to achieve your dreams. If you try things and then quit, then you need to become more optimistic. If you keep trying the same thing and it doesn't work, you need a healthy dose of reality to see why your original plan didn't work and how to revise it. If you try different things and they don't work, expand the realm of your search. But don't ever give up on the things that truly matter to you.

Monday, August 25, 2008

Sitting on the Fence

For roughly the past month, I've been interviewing at a few different places looking for a new job. I've felt overqualified at my current place of employment and really wanted some more challenging work. At the end of the process I had two offers to choose from, both of which were really similar and far superior to my current job. I suppose most people might decide based on some simple, simple heuristic like "highest salary", "most attractive coworkers", or "did I flip heads?"

But I'm a compulsive optimizer. Naturally I agonized for two weeks over which offer I should. I was hoping one offer would be clearly better than the other, but both the corporate cultures and salary packages were similar. I analyzed every angle I could think of, from the commute times to little things my interviewers had said. I called friends I knew and got as much inside information about the places. I made risk estimates for the companies based on their respective industries. Talk about overkill! My opinion changed on a daily basis, but after two weeks I finally made my final decision.

This is, of course, the exact opposite of what good AI should do.

In most systems where a computer must analyze some data and make a decision, there's a problem when two choices are very similar. Sometimes the system can get caught in an oscillation state where working on either choice makes the other one better. For example, a Quake 3 bot might decide to pick up armor, but the act of moving towards the armor makes it decide that picking up some health is a better choice. So the bot instead moves towards the health, and on the way decides the armor is better. The bot can end up in a situation of indecision where it picks up neither of the two items, and clearly this is the worst of the three choices.

Item pickup isn't the only situation where this occurs. Target selection and weapon selection can have the same problems. A bot can try to chase down one target but on the way decide it would rather aim at a different one and waste valuable time aiming at neither. Or in theory a bot can switch to one weapon and change its range based on the new choice, but by the time it gets in position it decides another weapon is useful. If you've never seen a BrainWorks bot do this, that's great! I've worked hard to remove these indecisions from the AI, but it's neigh impossible to make AI that works in all situations. There are two basic tactics you can use to solve indecision oscillations, each with their own costs.

Most of the time I give the scoring estimate a bonus of between 10% and 25% for keeping the same decision. In other words, the AI won't change its mind unless the new option is at least 25% better than the old. The higher this factor is, the fewer oscillations will occur. However, the risk is that an option that's genuinely 8% better will be missed, even if it wouldn't cause an indecision loop. Additionally, it's rare but still possible that even with a 25% factor, the bot can get stuck in indecision. This method is best used for situations where the estimated value of one option over another doesn't change that rapidly. This is how general item pickup oscillations are handled, as well as enemy selection.

When a small buffer isn't sufficient, the other option is to prevent the bot from changing its mind until it completes its selection, or at least for a reasonably long duration (such as half a minute). This is guaranteed to solve the problem. But there are two drawbacks. Not only will the bot be more likely to make suboptimal decisions, but it could get caught in a situation where it's very predictable. As such, it's best to apply this tactic only when absolutely necessary and ideally when the action can be completed quickly.

This method is used in item pickup for items the bot is very nearby. If a bot can pickup an item in less than one second, it immediately overrides all other item pickups and grabs it no matter how useful some other item may be. It turns out that even with a bonus factor for keeping the same item selection, bots could still get stuck in indecision loops when they were very close to an item of low value. That's because the estimated points per second is the ratio of two very small numbers, so the estimation has a large margin of error. No bonus factor could stop the bot from switching between the bad nearby item and the good item that was far away. The code forces the bot to spend half second to grab the nearby item, thereby preventing the loop from occurring.

Regarding my new job, I was leaning towards the place that offered slightly less money but seemed to have higher job satisfaction. In the end they decided to beat the salary offered by the other company, so it was a no-brainer to pick the job that has both higher pay and happier workers.