AI engine shaping up
by Mathieu Marquis-Bolduc · 06/19/2006 (4:59 pm) · 11 comments
Well, I had a 3-pages blog entry written, but that was before I found out you should NOT use accents, it erases the whole thing. So Im just gonna sum it up...
My AI decision-making engine is going on pretty well. I now have a demo of 6 korks playing touch football. Their behavior is described in a XML feed. The Torque engine sends gameplay events and information to the AI engine, who apply this information to the behavior rules, and reacts by updating each agent's goal stack and executing actions in the Torque Engine. Right now in the demo, those actions are mainly activating steering behaviors to make the players go around.
The AI engine is finally using variables, which was a huge milestone. I can now have behavior rules that reads like "Protect X against Y if X have the ball and Y is running toward X". X and Y can be anything, as long as you can express it in a 32 bit value. The engine never actually interpret those symbols, it just pass them back and forth to the game engine.
After I improve that demo a bit, there is two features I want to implement in the AI engine. First, verbatim. I want the AI agents to be able to explain, if asked, why they decided to perform an action. That shouldnt be too hard. Next, I want to implement behavior inheritance. For example, you could describe the behavior class "dog", and the behavior class "football player". Then, you will be able to create an agent that mixes both behavior class. You will then get a dog that plays football. Or an agent that plays football like a dog ;)
My AI decision-making engine is going on pretty well. I now have a demo of 6 korks playing touch football. Their behavior is described in a XML feed. The Torque engine sends gameplay events and information to the AI engine, who apply this information to the behavior rules, and reacts by updating each agent's goal stack and executing actions in the Torque Engine. Right now in the demo, those actions are mainly activating steering behaviors to make the players go around.
The AI engine is finally using variables, which was a huge milestone. I can now have behavior rules that reads like "Protect X against Y if X have the ball and Y is running toward X". X and Y can be anything, as long as you can express it in a 32 bit value. The engine never actually interpret those symbols, it just pass them back and forth to the game engine.
After I improve that demo a bit, there is two features I want to implement in the AI engine. First, verbatim. I want the AI agents to be able to explain, if asked, why they decided to perform an action. That shouldnt be too hard. Next, I want to implement behavior inheritance. For example, you could describe the behavior class "dog", and the behavior class "football player". Then, you will be able to create an agent that mixes both behavior class. You will then get a dog that plays football. Or an agent that plays football like a dog ;)
About the author
#2
06/19/2006 (9:43 pm)
what engines can it work in?A6 engine?Unreal engines?Doom engines?Im interested in purchising this.
#3
06/19/2006 (11:02 pm)
do you have a video capture of your football game that you would be interested in showing the rest of us...i think it would be a lot of fun to check it out and see how it works
#4
06/19/2006 (11:31 pm)
That, is cool.
#5
When they are all tested, I might put the Steering Behaviors up as a ressource. Took me only about an hour to code the ones I needed in Torque Script.
In theory, it can work with any engine, I designed it for that. You'll need to expose the game engine to the AI engine, of course. Currently, I have choice of using function pointers or abstract pointers for that. For Torque I made some utility functions to directly expose functions in torque script, so few C++ code is needed if you dont want it.
When the demo is satisfactory to me, I promise I will put it up for you to try :) The behaviors are much too basic yet...
06/20/2006 (6:07 am)
Hey, Thanks for the comments :)When they are all tested, I might put the Steering Behaviors up as a ressource. Took me only about an hour to code the ones I needed in Torque Script.
In theory, it can work with any engine, I designed it for that. You'll need to expose the game engine to the AI engine, of course. Currently, I have choice of using function pointers or abstract pointers for that. For Torque I made some utility functions to directly expose functions in torque script, so few C++ code is needed if you dont want it.
When the demo is satisfactory to me, I promise I will put it up for you to try :) The behaviors are much too basic yet...
#6
06/20/2006 (9:19 am)
sounds very cool...
#7
Your AI is sounding better and better all the time!
06/20/2006 (1:01 pm)
I'd love to see a video of the Kork Touch Football.Your AI is sounding better and better all the time!
#8
Have a nice 24th of June!
06/23/2006 (1:25 pm)
I made a short movie showing korks playing football. Its not much, but so far its been an excellent test-bed for my AI engine. But even with the best engine, your agents will never be smarter than what you make them ! Anyway, if somebody could host the (10meg .wmv) file it would be great, or else we can just wait until its up on google video, and I'll put the link up in a new blog post.Have a nice 24th of June!
#9
08/16/2006 (12:33 am)
Great Stuff Mathieu!
#10
02/20/2009 (2:42 am)
its very nice buddy, i have to implement that type of thing for my project. the code what you developed is some what similar to what i need for my game. so can you please send me that code... i need your help. plzzzz.... for my game the AI players have to move to catch the ball when the ball enters in their LOS. kindly help
#11
02/20/2009 (2:46 am)
my mail id is harimca14@gmail.com, you can send it to my mail 
Torque Owner Cinder Games