Sunday, January 22, 2006
Artificial Intelligence for Computer Games Book Review
Before getting into the book I have to mention the code. You get your first glimpse of code on page seventeen where a class header is shown. The class name is tgGameState. Any guess what "tg" stands for? Neither do I. He tries to save on space by having functions with partial words like "inline getNumCharacters()", but the follows it with a pointless comment // Get the number of characters. In appendix B (Programming) it says that code is written to be as easy to understand as possible and is therefore not that efficient. If he had wanted to go for readability he would have expanded the function names, removed the pointless comment, and ditched all the inlines and not of even mentioned the constructor, deconstructor (which aren't defined in the book anyway) etc. Poor variable names, missing error checking, it would have been much better to use sudo code. I noticed a few bugs even. Overall this was the worst part of the book and I wouldn't want someone in the "entertainment industry" reading this if I was trying to sell them my code.
Onto the actual book. My mention of the reference O'reilly books wasn't just to point out the size. This book really does feel like a jumping off point for AI in computer games. topics are briefly mentioned, but never really gone into depth and to make it sound complicated greek symbols are used when showing a formula. I would have appreciated five or six footnotes per pages telling where to get more information, but most of the time there wasn't. The first two chapters where more of a crash course in game design. So by the time I was on chapter three and on page 33 you can tell that was nervous that i was 1/3 through the book and really hadn't gotten into any sort of real AI stuff. but it picks up from there. There are a lot of hints for how to integrate AI into games. For example a Non-player controller (NPC) could have an arrow drawn on its chest (where it thinks the player is) and other visuals indicating its internal state. Of course these are more likely just basic game tips and nothing to do with AI. One neat idea was that your NPC could have several decision making units that could be swapped out. When really close to the player the most CPU intensive one would be used and when far away in the locked room the "stand still" one could be used. Perception, Mood, Remembering, Searching, some basic physics were all touched upon. In chapter 7 it gets very close to mentioning/talking about genetic algorithms, but alas it was not to be. The last part of the book was very boring and I found myself putting down the book a lot before finally finishing it.
Overall I feet like I was cheated because of the poor cover title. The cover really should have had "an introduction" on it. I expected it to be bigger with more in-depth explanations that didn't leave me hanging, and not such sub-par code for a coding book. On the plus side I found out the name of the orc on the cover is named "Fluffy".
I have previously listed some books I highly recommend and am interested in hearing what you recommend is good.
Friday, January 20, 2006
66 million rows in QTreeView
Sunday, January 15, 2006
Job Trends
So of course I had to put in for kde and gnome. There were both near zero and gnome even did have 0 at one point. Either way they are both so small that the difference is inconsequential. But when you put in some different keyboards you will find out some more interesting things.
- There are about as many jobs for khtml as gtk+
- Companies don't seem to hire gtk programmers, but mono (now the future of gnome with it in fc4?)
- The mono and gtk graphs seem a little in sync again suggesting that if you program in gtk you should know mono too.
- There is about twice as many people hiring with qt experience as mono
- At least right now ajax really does pay to learn
- Companies want more "developers" then "programmers"
- More companies are looking for qt experience than coco (even apple had a job posting looking for Qt experience)

Oh course this is just a graph off some web page so take it with a grain of salt.
On monster.com you can subscribe to keywords and they will e-mail you when a new job is posted with that keyword. It was fun watching as the Qt job postings grew from one every few months to sometimes more then once in a day ( at which point I unsubscribed). It was very easy to see what kind of companies were hiring qt developers. I bet you there is someone out there who is exploiting similar information on the stock market for tools companies. Knowing what a company is hiring often shows where a company is and where it is going.
"
Friday, January 13, 2006
Emotional Design Book Review
- Visceral - Appearance - Look at that, it is shiny and so smooth!
- Behavioral - The pleasure and effectiveness of use - My ipod is a pleasure to use because it just *works*<.li>
- Reflective - Self image, personal satisfaction, memories - I remember the first time I saw someone else wearing white headphones too, the ipod is fun to show off to people who hadn't seen it.
Now those three things mean very different things to different people. A good example is given in the first chapter:
Go outside. Get some air.
Watch a sunset.
Boy, does that get old fast.
-XBox advertisement
This is a very well designed add, but really only for guys 18-35. Everyone else will get different results for the three sections.
Take Qt (at least for me)
- Visceral - Eye Candy, Nice themes, Easy to read GUI code
- Behavioral - I enjoy using it to create my applications, the design is consistent and works with me
- Reflective - Learning Qt was a breeze due to the well written documentation, I really enjoyed showing off what I was able to do and accomplish in a short amount of time.
You learned all this in the first chapter and the rest of the first half of the book fleshed it out. For example you can have something that is annoying to use and doesn't look that great, but has a really high Reflective level (such as an expensive car you can show off) that makes it worth while to have.
The second half of the book seems to jump from topic to topic vaguely related. There are two sections all about robots and giving them emotions, incorporating them into our lives etc, but this just seemed like filler and didn't contain anything new that isn't covered in many other books. The author spends some time dissecting movies, video games, and many other thing too.
I was expecting much more a continuation of "The Design Of Everyday things" (which is very good) and so I was very disappointed. Overall an interesting book to barrow from the library or pick up used off Amazon.
