Need a start in AI
by Randy Hearn - Magnum · in Torque Game Engine · 12/13/2005 (9:44 pm) · 14 replies
OK,
I have read through a lot of AI threads and been playing around with AI Guard, with not much luck.
However, what I would like to do is implement some basic AI, through script. I know GG is working on an AI model, so I just want to understand a few things and then work on other things until an AI is rolled out.
One thing I would lke to do is take the current Starter.fsp and add in code so that when the AI PLayer see's me there is a reaction.. this can be anything - even something printed to the console. I am confused on which function actually controls this is it the aim function?
Can someone lead me to a link that would explain this. I learn more from short examples than anything. Most of the code I have found includes C++ updates. Right now I want to learn/understand what the limits/benefits are on scripting.
TIA
Randy
I have read through a lot of AI threads and been playing around with AI Guard, with not much luck.
However, what I would like to do is implement some basic AI, through script. I know GG is working on an AI model, so I just want to understand a few things and then work on other things until an AI is rolled out.
One thing I would lke to do is take the current Starter.fsp and add in code so that when the AI PLayer see's me there is a reaction.. this can be anything - even something printed to the console. I am confused on which function actually controls this is it the aim function?
Can someone lead me to a link that would explain this. I learn more from short examples than anything. Most of the code I have found includes C++ updates. Right now I want to learn/understand what the limits/benefits are on scripting.
TIA
Randy
About the author
Technical Product Designer (Mechanical Design) for Boeing for over 25 years working with CAD and PLM systems. I have a Associates Degree in Business and a partial B.S. in Game and Simulation, just couldn't see paying the costs for some of the classes.
#2
I will look at this closer tomorrow. I have not seen this link before :)
Thanks.
12/13/2005 (10:25 pm)
Very good info.I will look at this closer tomorrow. I have not seen this link before :)
Thanks.
#4
Am I correct in saying that there is no way to navigate to that page without a direct link?
12/14/2005 (1:42 pm)
@ Matt - thanks for the link. Am I correct in saying that there is no way to navigate to that page without a direct link?
#5
12/14/2005 (1:47 pm)
Atm, yes....I will be adding it to the TDN TGE hub really soon.
#6
12/14/2005 (2:45 pm)
You should also look at the CTFBot resource offerd by Mark H. It handles many AI related things such as navigation, team recognition and other useful tools.
#7
Just be sure that you follow instructions on how to implement that resource correctly and you will have a lot of response from your AI.
If you need any help feel free to ask.
12/16/2005 (2:20 am)
Well it's strange that AIGuard and/or AIPatrol doesn't work for you. I had play with that resource for the last few months and it's one of the best/easiest AI resources I have work with.Just be sure that you follow instructions on how to implement that resource correctly and you will have a lot of response from your AI.
If you need any help feel free to ask.
#8
I got so far on the AIGuard and AIPatrol that I can add the markers and such, but when I ran the game, the bots just sat there.
I could still play around with it. But I wanted to understand a little of the basics. I can copy my code and try and recompile. I have added the files so that they will compile.. but no luck..
But the information provided in the links above is what I was looking for. Just some basic commands to get started.
And thanks for the offer.. I may try and recompile the code again. I just downloaded CVS and trying to understand and use it. I have done a lot of programming but have never used a version control.. which is funny since I involved at my work with data control and verification ... which requires version control software :))
Only so many hours ina day to learn all of this software.:)
12/16/2005 (3:27 am)
@DeniseI got so far on the AIGuard and AIPatrol that I can add the markers and such, but when I ran the game, the bots just sat there.
I could still play around with it. But I wanted to understand a little of the basics. I can copy my code and try and recompile. I have added the files so that they will compile.. but no luck..
But the information provided in the links above is what I was looking for. Just some basic commands to get started.
And thanks for the offer.. I may try and recompile the code again. I just downloaded CVS and trying to understand and use it. I have done a lot of programming but have never used a version control.. which is funny since I involved at my work with data control and verification ... which requires version control software :))
Only so many hours ina day to learn all of this software.:)
#9
Found my problem and Now AIGuard works great... so far anyways....
Found out I had not linked the source code correctly.. Noticed that when my exe size did not increase. And also one thing not in the instructions that are downloaded inside is to set $AI_GUARD_ENABLED = true;.. Dang I even read that in the forums, but kept missing it on my files....
There are a lot of things I would like to eliminate in this code, and hopefully not have to go ino the C++ again. But this AI looks for health patches... I guess it would be a big deal if I don't add them in the game, I just hate to thing of the processor using time to search for something I am not using.
But for now, thanks for the info. That resource and the info provided in the link really starts clicking things together for me...
Randy
12/16/2005 (9:51 pm)
@Denise..Found my problem and Now AIGuard works great... so far anyways....
Found out I had not linked the source code correctly.. Noticed that when my exe size did not increase. And also one thing not in the instructions that are downloaded inside is to set $AI_GUARD_ENABLED = true;.. Dang I even read that in the forums, but kept missing it on my files....
There are a lot of things I would like to eliminate in this code, and hopefully not have to go ino the C++ again. But this AI looks for health patches... I guess it would be a big deal if I don't add them in the game, I just hate to thing of the processor using time to search for something I am not using.
But for now, thanks for the info. That resource and the info provided in the link really starts clicking things together for me...
Randy
#10
I also had running over 30 bots at the same time and everything works like a charm :)
12/16/2005 (11:35 pm)
Well you can modify a lot in aiguard script. I am not home at the moment but I remember that i disabled everything I didn't needed inside aiguard.cs or AIpatrol.cs.I also had running over 30 bots at the same time and everything works like a charm :)
#11
Thanks... IT's time to play now;)
12/17/2005 (6:47 am)
Yes, I looked at the script last night and realized there was a lot I could do inside the scripts as well.Thanks... IT's time to play now;)
#12
12/17/2005 (9:36 am)
Yeah I have no Idea why AIguards start out disabled if someone went through the trouble of getting it in they probably want to use it.
#13
12/21/2005 (12:11 am)
Acctually I think is great to start disabled ;) It kind of forces you to look at the script and try to figure out what is happeninig when you place the bots (and that is very important especially in AI) ;)
#14
I don't think I could ague that point..:))) It does force you tol look at it.
Actually, I really don't mind either. As long as it is documented at the start of the script.. which it was...
Overall a good script now that I have been using it for a while, but you are correct. I am going to have to dig into the script. The Ai is good, but will need some changes I am afraid of to do what I want. It seems to arcadish for the bots to chase me then run backwards when they are hurt or low on ammo.. Not realistic at all.
But, it does give a very good starting point with which to build off of.
12/21/2005 (1:51 pm)
@Denis,I don't think I could ague that point..:))) It does force you tol look at it.
Actually, I really don't mind either. As long as it is documented at the start of the script.. which it was...
Overall a good script now that I have been using it for a while, but you are correct. I am going to have to dig into the script. The Ai is good, but will need some changes I am afraid of to do what I want. It seems to arcadish for the bots to chase me then run backwards when they are hurt or low on ammo.. Not realistic at all.
But, it does give a very good starting point with which to build off of.
Torque Owner Sam3d
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=9133
You can wait for GG to release things, but the community seems to continually roll out a variety of resources due to being unfettered by the need to 'productize' things.