What's the Structure of General AI Engine?
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play
"Reducing the world to mathematical equations!"
@InnocuousFox: I got your point you mean that there's no actual AI Engine but rather AI Code in embedded with the AI agents classes
Quote: Original post by ZiKaS
Thanks all for reply.
@InnocuousFox: I got your point you mean that there's no actual AI Engine but rather AI Code in embedded with the AI agents classes
That is correct. At that point, simply building one bit of code at a time is the preferred method. For example, the inclusion an "IF" statement is building your AI. Certainly there are design patterns that you would want to follow.
A Finite State Machine (FSM) is the best place to start when learning how to design and code AI. For that, you may want to look at Steve Rabin's "Finite State Machine Class" in AI Game Programming Wisdom. It was really simple to drop into your code and use. There is a 2nd article near that where he extends it with messaging between objects so that a bullet could inform a body that "I just hit you", etc.
Other good books are Brian Schwab's "AI Game Engine Programming" and Mat Buckland's "Programming Game AI by Example". Mat's especially is a favorite and is very well-rounded.
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play
"Reducing the world to mathematical equations!"
Steering behaviours depend however on locomotion model.
I am trying to keep them separate from locomotion models, and I guess I have achieved a very-small-humble result in a demo I am making slowly-slowly during my spare time (if somebody is interested I will post sources, a feedback would be a lot appreciated).
Maybe behaviour trees could be quite reusable but I cannot tell you the proper data structure that are reusable and those that are not.
About steering behaviour I used normalised left, up and forward local vector to decouple the agent from the graphic engine.
It consumes a little bit more CPU but keeps them separate.
So I guess that it is emerging a set of data structures and procedures rather than a real time engine. Once packed together you would put those in a real time update function.
One thing to be engineered could be a multi-gameloop reasoning, that is something that allow an AI process to run through many game loops in order to keep CPU available for physics or rendering.
Just sparse thought... some times meaningless :-P
@Thunder0ne
What's ur AI code about (FPS, RTS Games, Role Playing..)
It's welcomed if you posted it it will help so much :)
Thanks..