Advertisement

Many-Core processors -- AI application

Started by July 19, 2008 05:10 PM
29 comments, last by wodinoneeye 16 years, 3 months ago
Quote: Original post by BrianL
Multithreading isn't an AI problem; it is a architectural problem. The most pragmatic solution is to convert any chunks of code that take a significant amount of time to be tasks.

AI code is a good candidate for this, as there are plenty of heavy weight operations in it. At the same time, updating a dynamic mesh or calculating a ray intersection with the world fits the same model.

The right solution here, in my opinion, is to get a task framework running and to leverage it heavily in the AI systems. Moving AI to other threads (ideally on another processor..) will separate AI and the biggest CPU user - the CPU cost of rendering.

That said, I respectfully disagree that the main barrier in games is lack of CPU/memory power. In my personal experience, the biggest challenges have been working with designers to get what they really want and dealing with relatively static presentation (ie lack of high quality animation/audio generation). The AI logic side of the system can be designed to scale relatively easily compared to asset generation.




Multithreading is a solution. Making use of it (and spreading out to many cpus) effectively is the problem. Unfortunatley in games the situation state keeps changing and you cant simply dump every difficult task into the Background. Data become obsolete quickly and the problems being worked on likewise. Tasks are interdependant (lots of data lock&update) and have to be closely scheduled to the 'turn' cycles (which is the temporal limitation). Breaking the processing into tasks is obvious (divide and conquer) but how to divide it up and coordinate is the hard part.

As for thinking AI not so much a problem compared to 'asset generation', consider what you will do once you have you 1000's of animation sequences (and the sounds to go with them). You now have to pick and chose and sequence the right animations to match the game situation which is now much more complicated (because of all those 1000s of animations/actions the other objects will now also be able to do). Similarly the terrain is likely to be more complicated/interactive (those themselves requiring reactive scripting for all those new interaction types and their consequences).

The point of higher quality/more numerous assets is to interact more flexibly/realisticly. That realism requires alot more logic (even for passive behaviors) and far more AI processing for 'intelligent' objects. There willl be more communications/coordination between the intelligent objects (trying to not look stupid/phoney/illogical). Processing increases geometricly with the complexity.


As for 'asset generation' someday (hopefully sooner than later) the figure animation tools will be more affordable (as in free) and easier/more effective to use AND common formats will be decided on which will allow amateurs to publish/share their assets freely to be reprocessed/refined/improved/built upon by others (utilizing different peoples specialization). Game companies will possibly someday foster such a open system (by paying for the tools to be developed) because they will save a huge amount of cash ($$$$$$) reusing the free assets.
--------------------------------------------[size="1"]Ratings are Opinion, not Fact

This topic is closed to new replies.

Advertisement