Alex Champandard over at AIGameDev.com posted a preview of my book last night. He had been waiting for Amazon to get the cover displayed before he did so. Well, AIGameDev has about 3600+ subscribers so it is understandable that a write-up would affect my Amazon sales rank. However, I was not expecting this when I woke up this morning!
As of this hour (9:30AM CST), I jumped up to 16,384 in the overall books category. When you figure that my previous high was 74,604 (after Alex posted a small blurb in his weekly link digest) and that most of my time is spent between 200,000 and 600,000, being around 16k doesn't suck at all!
More importantly, I jumped up to #14 in Game Programming. I had only appeared on that list (100 books) 4 times in the past 2 weeks, no higher than 57th, and usually only for a few hours. Maybe this time I have some staying power.
I am also #2 in the "Hot New Releases of Game Programming. I had been #3 or 4 a few times, but this is a pretty fluid list. Again, however, it will be nice to see how high this climbs.
I figure the next few days should look pretty good as Alex's post is only about 12 hours old. And it probably takes a while for 3600 people to get around to their RSS feeds. Either way, I want to thank Alex for his support and the shout-out on the book.
Well, the cover for my book "Behavioral Mathematics for Game AI" is finally uploaded to Amazon (and I assume other retailers as well). It was odd having that mysterious question mark there for so long. But I suppose when the book is on sale before you have even finished writing it, that's the price you pay. Anyway, it's nice to have it show up properly on the page, the best-sellers lists, and the Amazon ads.
Speaking of rankings lists, I have been floating anywhere between 3 and 20 on the "Hot new releases in 'Game Programming'" list. I've even made a few appearances on the top 100 Game Programming books in the past few weeks. Once, I was as high as 57. It doesn't last long, however. They update those sales figures and rankings every hour so it is very susceptible to fluctuation. I figure that I will do a little better now that I have a pretty cover picture on the sites. (I guess people would be skeptical of a book with no cover.)
For those of you who bounce out to the site, the book description and the bio are still not updated exactly as they are supposed to be. From what I understand, they will changed in the next week or so. They have been pushed out the Amazon, but it takes a while for those sorts of changes to updated. *shrug*
I do want to give a shout out to my colleague, Brian Schwab, who just released his second edition to AI Game Engine Programming in the past few months. I'm looking forward to picking that up soon. He deserves props for being the only new AI book ahead of me (for now!).
Anyway, I need to finish getting the downloads section ready for the book. There will be all sorts of nifty stuff in there. I hope you all find it valuable!
bots use items as the primary motivating factors for deciding where to go. The pathing and routing code will tell you how to get from point A to point B, but all of that is meaningless if you don't know what point B is. The typical strategy is for the bot to pick up the items that help it the most and require the least amount of movement. If the bot can't find any enemies, it will head to the nearest generally useful item and hope a target wanders by. Item placement is the core component of goal selection in BrainWorks.
While I'm cool with all of that and can see the point he is trying to make, I don't necessarily agree with the following (emphasis mine).
When two human players are in a level that contains no items, however, they don't get confused at all. Instead they strategically run and hide around the map, using cover to create good shots on the opponent while dodging their return fire. What BrainWorks is missing (and all first person shooter AI bots for that matter) is this dynamic tactical movement. You just don't notice it's missing from BrainWorks because of the item pickup code.
It's very difficult to design AI that can recognize and avoid dangerous areas of terrain while simultaneously taking advantage of opponents in those spots. But it's not impossible.
If that is the design of the bot, certainly that is a problem. This used to be a problem in FPS games, but I don't believe it is as much any more. Most AI isn't built in the same purely functional framework as a bot. AI is also designed to 'do nothing' in a reasonably convincing fashion. Many games now have plenty of things for the AI to do when it is idle or lacking any obvious goals. Games such as STALKER (I refuse to put the periods in there), Far Cry, Crysis, Far Cry 2, and even Left 4 Dead, have many idle behaviors.
Specifically regarding tactical movement, however, many of the recent generation of FPS games have such features as seeking and using cover, finding adequate fire points, etc. Ted addresses this somewhat by suggesting potential algorithms to use:
Here's the basic algorithm I have in mind. The first objective is to create a "danger map" for the level. The danger map estimates how tactically risky it is to be in each area of the level. Note that "area" needs to be relatively small-- roughly one to two square meters on the ground. Too much larger and the algorithm will get muddied, mistaking good regions for bad. Too much larger and the computation will become prohibitive.
He is correct in his suggestion. Much of the tactical awareness of an AI agent is done with either subdividing the map or by using many pre-positioned cover points. Many variations of these techniques are already in use. AI Game Programming Wisdom 3, for instance, had a number of exceptional articles on FPS tactics. Damian Isla (Halo 2 and 3) wrote about Probabilistic Target Tracking and Search Using Occupancy Maps, Remco Straatman and William van der Sterren (CGF-AI) wrote a brutally cool article on pretty much what Ted defines above entitled Dynamic Tactical Position Evaluation, and Christian J. Darken and Gregory H. Paull wrote Finding Cover in Dynamic Environments which even included the height and visibility of terrain. And those three articles were back to back in that book!
That is why I wholeheartedly disagree with Ted's statement:
It's far too hard to analyze the geometry of a level to create a danger map, although some simple techniques could be used for a first pass analysis. [snip] This all sounds well and good on paper, but if it were actually that easy, it would have been done already. You might be wondering what the catch is.
That's simply not true. Sure, it helps to have some pre-processing done, but it can be done without as well.
Anyway, Ted is usually on his game over there at Brainworks. (I'm hoping to get his butt over to GDC so I can meet him!) However, on this one he might have been outside his comfort zone. After all, writing a bot isn't exactly the same as writing AI.
The author is not alone... many players want what he lists here. And they are getting rather vocal about it. I'm just not so sure that the game companies and the publishers "get it" yet.
I took a moment to assure him that we, as AI programmers, hear his plaintive cry. This, my colleagues, is why we formed the AI Game Programmers Guild and why we are holding the AI Summit at GDC.
Some of you have asked me questions about my new book, "Behavioral Mathematics for Game AI." The information that is on amazon and other retailers is not up to date. For one, there is no cover picture. There's a good reason for that. The cover is still being laid out and will be uploaded to the resellers soon. In the mean time, here's the cover art that I developed (click for a nicely detailed larger version).
The description text that you see on the resellers' sites is based on what I originally submitted to my publisher when I began the writing process. Things have changed a little bit since then. The following is likely what we are putting on the back of the book and will eventually be updated on Amazon, etc.
Human behavior is never an exact science. As a result, the design and programming of artificial intelligence that seeks to replicate human behavior is already an uphill battle. Usually, the answers can not be found in sterile algorithms that are often the focus of artificial intelligence programming. However, by analyzing why people humans (and other sentient beings) behave the way we do, we can break the process down into increasingly smaller components. We can model many of those individual components in the language of logic and mathematics and then reassemble them into larger, more involved decision-making processes.
Drawing from classical game theory, this book covers both the psychological underpinnings of human decisions and the mathematical modeling techniques that AI designers and programmers can use to replicate them. With examples from both "real life" and game situations, the author explores topics such as the fallacy of "rational behavior," utility, and the inconsistencies and contradictions that human behavior often exhibits. Readers are shown various ways of using statistics, formulas, and algorithms to create believable simulations and to model these dynamic, realistic, and interesting behaviors in video games.
Additionally, the book introduces a number of tools that the reader can use in conjunction with standard AI algorithms to make it easier to utilize the mathematical models. Lastly, the programming examples and mathematical models shown in the book are downloadable, allowing the reader to explore the possibilities in their own creations.
If you have any other questions about the book, feel free to ask! (And yes, it should be available at the Charles River Media booth at the Game Developers Conference next month. I'll be there quite a bit... flag me down!)
Although not directly related to AI, this article on Wired is worth a look. A group of researchers and scientists at 5 universities is trying to engineer the human mind by reverse-engineering the brain. Here's a couple of clips:
The researchers' goal is first to simulate a human brain on a supercomputer. Then they plan to use new nano-materials to create logic gates and transistor-based equivalents of neurons and synapses, in order to build a hardware-based, brain-like system. It's the first attempt of its kind.
Ok... no surprises so far.
Computing today is based on the von Neumann architecture, a design whose building blocks -- the control unit, the arithmetic logic unit and the memory -- is the stuff of Computing 101. But that architecture presents two fundamental problems: The connection between the memory and the processor can get overloaded, limiting the speed of the computer to the pace at which it can transfer data between the two. And it requires specific programs written to perform specific tasks.
In contrast, the brain distributes memory and processing functions throughout the system, learning through situations and solving problems it has never encountered before, using a complex combination of reasoning, synthesis and creativity.
"The brain works in a massively multi-threaded way," says Charles King, an analyst with Pund-IT, a research and consulting firm. "Information is coming through all the five senses in a very nonlinear fashion and it creates logical sense out of it."
This is the part that blew me away, though...
The brain is composed of billions of interlinked neurons, or nerve cells that transmit signals. Each neuron receives input from 8,000 other neurons and sends an output to another 8,000. If the input is enough to agitate the neuron, it fires, transmitting a signal through its axon in the direction of another neuron. The junction between two neurons is called a synapse, and that's where signals move from one neuron to another.
OK wow. 8000 connections... each? Now when you multiply that by the number of neurons in the brain...
The human cortex has about 22 billion neurons and 220 trillion synapses, making it roughly 400 times larger than the rat scale model. A supercomputer capable of running a software simulation of the human brain doesn't exist yet. Researchers would require at least a machine with a computational capacity of 36.8 petaflops and a memory capacity of 3.2 petabytes -- a scale that supercomputer technology isn't expected to hit for at least three years.
I don't even know what a petabyte or a petaflop is. That's just some scary stuff right there.
Oh well... I'm sure that I will see it in my lifetime according to Ray Kurzweil's keynote address at the 2008 GDC.