Big Bucks in Smart Games

September 26th, 2009

I believe that there will be big bucks in smart games. More specifically, there are several reasons why selling artificial intelligence to computer game developers could be profitable. Modern hardware (such as computers and game consoles) suffices for some intelligence. Modern games could use a lot more intelligence. And, importantly, todays game industry is a huge market. Let’s look at each of these claims in more detail.

I claimed that modern game hardware is sufficient for intelligence.

It should be noted that intelligence is a very demanding task. I have previously mentioned that your brain is about a million times more powerful than this computer. You and your brain have evolved to cope with the tremendously complex environment we call reality. But a typical computer game environment is not nearly as complex as the real world. Consequently, a game intelligence doesn’t need that much power. Furthermore, new generations of video game consoles have a lot more power than they used to have. E.g., Sony’s latest console, the PlayStation 3, doesn’t just have one processor, but nine. With increasing parallelism it may even become possible to dedicate one or more processors entirely for AI.

There’s also a need for new innovative technologies, like AI.

In fact, The Wall Street Journal quotes John Ricitiello, the CEO of the worlds largest video game company, saying that current games are “boring people to death.”

Finally, today’s game industry represents a huge potential market.

Ricitiello’s company, Electronic Arts, develops the best selling computer game of all times, The Sims. This game series has already sold more than 100 million copies. The Sims is a single player game, but there are also massively multiplayer online games where thousands of players interact with each other over the Internet. The largest is World of Warcraft. Its 10 million paying subscribers outnumber the 9 million citizen’s in my country, Sweden! Blizzard Entertainment, who developed the game, earned 2 billion US dollars from subscription fees alone during 2008. For some comparisons, the video games industry is already larger than the movie industry.

The crux of the matter is the AI development.

How do you program all that hardware to do something intelligent and innovative? This is the really difficult task. I know because that’s what I’ve been trying to do for the last seven years of my life!

Thus, modern game consoles are fast enough for AI, modern games need better AI, there’s a huge market, but the typical game developer doesn’t have time to spend seven years developing AI. That’s why I believe selling artificial intelligence middleware to computer game developers represents a great business opportunity.

This is the reasoning behind my startup company, Boldai, to try to commercialize AI research in the games industry. If I have managed to pique your interest, you can find out more by visiting the Boldai web site where you can learn more about the company, read about our products, and view a short video demonstrating our Trick Trap iPhone game demo. At Boldai we’ll do our best to help create smart games (and earn some big bucks :)

Where’s My Robot Housekeeper?

July 30th, 2009

I wonder where R2D2 and C-3PO from the Star Wars movies are. With all of the research on artificial intelligence, why don’t we have robots that are anywhere near as human-like as them?

Or, where’s HAL9000, the spaceship computer that Stanley Kubrick and Arthur C Clarke predicted would be here by now in their movie “2001: A Space Odyssey?” At least we should have computers that communicate fluently in English, like HAL9000 did?

In fact, I would even settle for a robot that could fix me dinner and do the dishes! Why can’t I just go to the nearest electronics store and buy a robotic housekeeper?

It sometimes seems like AI research has produced nothing of interest. But I suggest that there are three key facts that help explain, or dissolve, this illusion of AI’s failure.

First, we have to remember that AI is still an incredibly young research field.

The term Artificial Intelligence was coined by John McCarthy, who is considered one of the founders of AI. He coined the term in 1956 while organizing the very first conference on the topic, which has become known as the “Dartmouth Conference” because it was held at Dartmouth, Massachusetts.

And the founder, John McCarthy, is still an active researcher and professor at Stanford. In fact, he was present at the Commonsense Symposium in Stanford, which I attended in 2007. The fact that I could present a research paper with the founder of the field in the audience helped me grasp how young the field really is.

Secondly, the computer hardware we use is massively inferior to what “natural intelligence” uses.

We can get some idea of the speed of computers compared to the speed of animal brains by estimating how much information a neuron can process and how many neurons there are in a given brain. Hans Moravec has done so and found that today’s powerful personal computers are comparable to insect brains. A human brain is about a million times more powerful than today’s computers.

But hardware is quickly improving. Moore’s law predicts an exponential improvement of PC performance. If it holds up, we can expect PCs with the capacity of a mouse brain by 2010 and human-level capacity before 2025.

Thirdly, we have to take into account a phenomena that has come to be known as the “AI effect.”

The AI effect is the unfortunate (at least for AI researchers) observation that as soon as something that seemed to require intelligence has been implemented in a computer, it doesn’t seem intelligent anymore. When you look at the algorithm, it’s just doing calculations, none of which seems very “intelligent” by itself.

For example, chess used to be seen as a game that requires intelligence. Many thought that a computer could never beat humans at chess because computers can’t be intelligent.

Well, in 1997 IBM’s DEEP BLUE computer beat the human world chess champion, Garry Kasparov. But no one said “Wow, look at that, we now have intelligent computers!” Instead they said “Well, chess doesn’t really require that much intelligence. It just requires evaluating a lot of possible moves and selecting the best one.”

These three factors, the fact that AI is still a very young research field, the fact that our computers are still much too slow, and the fact that we tend to explain away the progress that we do make, help explain our impatience with the progress of AI research.

Yes, there was some early overoptimism, like Kubrick and Clarke’s movie 2001 that predicted computers would speak fluent English by now. But we should not replace premature optimism by equally premature pessimism. The greatest achievements of AI are still to come. And I believe that, if you keep your eyes on the development of AI in the near future, you will be witness to some truly amazing things!

Computer Games Are A Waste of Time?

June 27th, 2009

Do you ever play computer or video games? Let me ask you - what’s the point of playing games? It seems pretty pointless. It’s just a pastime. A waste of time. And I should know because I’ve wasted many hours playing computer games.

Why, then, am I grateful for having wasted my time with computer games?

It’s been said that nothing has any meaning, except for the meaning you give it. I have found a way to give meaning to what would otherwise appear to have been a waste of time.

But let me start by telling you how I got interested in computer games in the first place. It all started with a SEGA 8 bit video game console that I bought while in elementary school. Included in the package was a game called Wonderboy III. It was a classic sidescrolling platformer. As the game progressed, your character turned into different animal forms, each with different capabilities. I really loved that game and spent countless hours playing.

But video game consoles were quite limited. My friends in junior high all had computers! Naturally, I wanted a computer too. I saved up for an Atari, later traded it in for an Amiga, and finally spent all my money on a PC. A vast number of games had been developed for each of these platforms.

In high school I chose a special study track that was a mix between regular classes and distance learning home study courses. We spent less time in school and more time in “independent study.” This was a tremendous opportunity, to play more computer games. In fact, none of us made much effort at independent study, and the headmaster cancelled the study track from the curriculum the very next year!

When I got to Linköping University, class attendence was not even required. That meant as much free time as you wanted. Of course, it also meant that you suddenly had a lot more responsibility, a concept we didn’t fully grasp. A friend of mine dropped out after two semesters full time study, of Quake.

But all this game playing had another effect on me, apart from wasting my time. I got very curious about how games work and wanted to find out how to make my own games.

As it turns out, games are programs. To make your own games you have to learn programming, which is really quite hard. In fact, programming games requires an even greater investment of time than just playing games. Soon I was more interested in developing games than in playing them, and I envisioned a future career as a game developer. That’s why I came to Linköping to study computer science.

But it was while studying computer science that I found my true calling - artificial intelligence, i.e. programming computers to make them smart. After working a couple of years at the artificial intelligence department at the university I decided to become a PhD student and earn a PhD in artificial intelligence.

By that time I had all but given up my interest in computer games. But I had never quite forgotten how much fun games can be! And, a couple of years ago, I discovered a way of integrating games into my life once again. My idea was to apply my artificial intelligence research to computer games. I could try to make the characters in computer games smart, and thereby make the games much more interesting and challenging. Much more fun!

Thinking back, I have come to realize that it all started with those first computer games. Even though all that time playing all those games looked like a senseless waste of time, it was those games that got me interested in computer programming, and ultimately in artificial intelligence, which is my passion.

That is the meaning I have assigned to games. And that is why I am grateful for having “wasted” my time with computer games. In the end, what started out as just fun and games, has turned into making games that are more fun.

How To Use Text-to-Speech Software to Listen to Blogs While Doing Other Things

March 25th, 2009

Taking a walk. Biking to work. Jogging. Lifting weights. These are all excellent opportunities to educate yourself by listening to audio books or podcasts. But audio books are expensive and not many podcasts are as entertaining as the Get-It-Done Guy’s.

Meet Samantha. Samantha is an incredibly realistic-sounding text-to-speech voice from Nuance. Just listen to a demo MP3 and hear for yourself.

Text-to-speech frees you from the requirement of finding recorded material. You can convert any text to audio and listen to it while you do other things. A particularly convenient tool for automating this is NewsAloud from NextUp. Use it to subscribe to your favorite blogs through RSS. Then, whenever you run out of material on your iPod, let NewsAloud have Samantha read a new batch of fresh blog posts to MP3.

With that said, I’ll also note that the NewsAloud software could be much improved. Its user interface isn’t very polished. It often repeats itself by reading both description and content tags. And you still have to manually copy the MP3 files to your iPod. Nevertheless, NewsAloud is the only text-to-speech tool I’ve found that lets you subscribe to RSS feeds. Please leave a comment if you know of others.

How To Check Gmail Once a Day Without Missing Urgent Information

February 21st, 2009

Do you use Gmail? Do you check email on impulse? Was your first answer a cheerful yes and your second a regretful yes? Read on.

I’ve tried checking email only once a day. The payoff is immediate. I’m more focused on work and spend less time on each email when responding in batch at the end of the day.

Unfortunately, some emails are time critical. The 9:45 message cancelling the 10 o’clock meeting doesn’t help when I read it 6 hours later. These incidents make it difficult to stick to the once-a-day routine.

The functionality needed to solve this problem is already in Gmail. I just lacked an important realization. All time critical emails are sent by a small group of people.

Here’s how to put this insight to work:

  • Go to the filters tab in your Gmail settings. Add a filter that matches emails not from the urgent emailers. This is possible using a boolean query in the “From:” field, e.g. “-(boss@company.com OR partner@home.com)”.
  • In the filter’s actions add “Skip the inbox”, “Mark as read”, and “Apply a label”. My label is unimaginatively called “Inbox2″. This will move non-urgent emails out of sight and enable you to find out about the cancelled meeting without being tempted to read all emails.
  • Install Gmail Notifier. It will alert you within two minutes of receiving an email, but only if it’s from your boss or partner, given the above filter.

Finally, now that you’ve established the habit of batching email, don’t set yourself up for failure by sending urgent messages yourself. If you need a reply within 24h, pick up the phone.

How To Use Lisp for 3D Game Programming

February 1st, 2009
Lisp OpenGL Graphics

Lisp OpenGL Graphics

I love Lisp. But I’ve noticed that some areas of Lisp programming are relatively unexplored. In particular, there’s not much information online about game development using Lisp. And the situation is even worse for accelerated 2D and 3D graphics in Lisp. Therefore I thought I’d write a short how-to based on my own limited experience on the topic.

First, I use the excellent LispWorks Common Lisp implementation for Windows. (LispWorks is available for other platforms but I have no experience with those.) It has a great Emacs-like IDE and can compile your program into a stand-alone executable. If you don’t have to create executables, there’s a “Personal Edition” available for free.

Second, LispWorks comes with a set of OpenGL bindings out of the box. There’s an invaluable example of how to use them in icosahedron.lisp, also in the LispWorks package. Note that the compilation instructions in icosahedron.lisp are wrong. Use these instructions instead. With the example up and running, I used it as the starting point of my experiments.

Third, I wanted to get some content into my 3D game engine. I used the free and impressively full-featured 3D modelling tool Blender. Blender can export models in the XML-based X3D format. This is convenient since you can use an existing XML parser like XMLS to help load the model into memory.

That’s it! With these tools I created the retro-style flat-shaded desert island that you see in the screenshot. Also check out the accompanying YouTube video What would you bring to a desert island?. (Be sure to click “watch in HD” to make the text readable.)

Let’s look at some pros and cons of what we’ve learned:

  • Pros:
    • The implementation is entirely in Lisp.
  • Cons:
    • You have to do everything yourself using the OpenGL primitives, which gets tedious. I’d prefer to use some 3rd party library, e.g. for loading 3D models. Hopefully someone will develop a lisp game programming library that becomes a de facto standard.
    • While LispWorks is not the most expensive Lisp environment, it’s not super cheap either. Especially compared to alternatives like Visual C++ Express, which is free. Corman Lisp is super cheap, delivers stand-alone executables, and has reportedly been used for 3D graphics. But I’ve had no luck with getting that to work.

Summing up, I’d say the advantages easily outweigh the disadvantages ;)

How To Compile Your LaTeX Document in Emacs With Only One Key Press

January 27th, 2009

Do your fingers ache after hammering C-c C-c repeatedly in Emacs just to compile and view your LaTeX document? Mine did. But you can take your hands out of harms way.

If you use the MiKTeX Windows distribution there is a neat program called texify that basically does all the work. It runs BibTeX and LaTeX until all the references have been resolved. There’s even a command line parameter that will cause it to display the result. The only thing left is binding a key in Emacs. I bound C-c v to a function that saves the current buffer, runs texify, and gets rid of the shell command output buffer. (If you figure out a better way of hiding the output buffer, please tell me.)

(global-set-key "C-cv" 'one-key-latex)
(defun one-key-latex ()
  (interactive "")
  (save-buffer)
  (shell-command "texify --run-viewer c:path-to-your-tex-filefile.tex")
  (switch-to-buffer "file.tex")
  (enlarge-window 26))