gametechmods
Robot Arena => Modifications => Topic started by: Madiaba on February 08, 2009, 12:50:07 PM
-
This is a new tweak that is kosher for Stock and DSL Tourneys. And it can give an advantage to bots if constucted well.
It is called "Servo Oriented Weapons" or S.O.W.
This is where your weapons system(s) are attached to a servo motor, which is coded to turn your weapons so that they are always oriented toward your opponent,.. no matter which way your bot is facing. So ideally you no longer have a vulnerable back or sides, since the weapons will confront the enemy constantly.
The coding is based off of Apanx's work on servo angles. It has been revised to work in this application.
Several other User options I've coded into my AI.py version are things like: weapons firing control, sequential weapons firing (machinegun, rapid multiple pistons firing...), SmartZone or Location triggering, special SRM, and anti-immobility features.
Phil took this work and has modded it some, but I haven't looked through it yet to see what cool things he came up with.
There are some pros and cons concerning this appraoch, which will be enumerated later.
A note for coders about Servo orientation control itself: SZ's can be used to control the servo, NP. But controlling the servo through python 'servoangle' is both more consistant and precise. Also, SZ Controller commands will over-ride python coded commands, if the 2 were ever in conflict.
I'll post some of my bots, and Phil has some of his that he's been tweaking out.
...
-
Here is a basic bot I built as a test-bot for this SOW tactic. The weapons are mounted to a Servo motor that is always directing the weapons toward the opponent in any direction. Outside and inside shots:
(https://gametechmods.com/uploads/images/79651SkinHead_1.jpg)(https://gametechmods.com/uploads/images/66098SkinHead_2.jpg)
-----------------------------------------------------------
-----------------------------------------------------------
Some of Phil's experimental SOW bots:
and the last bot of this team is Felix the cat.
Not a killer, but an innovative bot with a AI that control a servo motor (will be soon delivered in the corresponding thread).
I will deliver this team to Nayar.
(https://gametechmods.com/uploads/images/78151felix%20the%20cat.png)
(https://gametechmods.com/uploads/images/96479ze%20happy%20king%20cat.jpg)
-----------------------------------------------------------
-----------------------------------------------------------
This will be one of the HW bot of this team.
I have to make it more compact, relook it, certainly rename it, but it looks promising .
It uses the 'SpinServo AI' which drives the servo motor.
(https://gametechmods.com/uploads/images/98581drowned.png)
Next post will show it finalized.
-----------------------------------------------------------
-----------------------------------------------------------
Here is the reshaped "Drowned" renamed as "poison of Maatet" (one of the scorpion guard of goddess Isis)
(https://gametechmods.com/uploads/images/64818maatet.png)
SpinServo Ai : 2 custom zones are defined. when an ennemy enter on of theses, the servo turns to face its weapons on the good direction. thus, if 'Poison of maatet' is taken apart from behind, better then turning its all chasis, it turns its weapon.
to learn more about this AI and others, see :
https://gametechmods.com/forums/showthread.php?t=1103 (https://gametechmods.com/forums/showthread.php?t=1103)
-----------------------------------------------------------
-----------------------------------------------------------
This is a LW version of a SpinServo Ai-ed Bot :
(https://gametechmods.com/uploads/images/47363lwSpinServo.png)
Armor is Plastic 1.
Trouble : it is not realistic : weapon goes through this big wheels.
Movie on the site in my signature
-----------------------------------------------------------
-----------------------------------------------------------
Madiaba:
Here are some vids of the bot I put together (pictured above) to give one of my ideas of how this AI tactic might be used, against some tuffer bots. It did not win all of it's battles, but it did win well over half (70-80%) of them against some well established good bots. So with a little more effort, a well/better built bot could be a contender. This one is called 'SkinHead' because it attacks from the top. But it could be a Face Spinner, Poker, Saw, HS,.. that is mounted to the Servo. Some vids of it in action:
Mako-4 (http://www.madiaba.gametechmods.com/VIDS/Mako-4.wmv)
ObZen (http://www.madiaba.gametechmods.com/VIDS/ObZen.wmv)
Shebeast (http://www.madiaba.gametechmods.com/VIDS/Shebeast.wmv)
Tunit3 (http://www.madiaba.gametechmods.com/VIDS/Tunit3.wmv)
...
-
I agree with Mad : this kind of AI-ed bot, in good builder hands (which i am not), may be dreadfull opponents, In RA2 more than DSL because of the 'realistic rules'.
For those who would like to investigate this field, here are a summary of previous post :
1st : to know the Id of the servo motor (suppose you have only one) ; you can do this
in the activate function :
while goon == 1:
if i == self.GetNumComponents(): break
currentType = self.GetComponentType(i)
if currentType == "ServoMotor": self.Motor = i
i = i+ 1
2nd /To know the angle made by
- the servo motor current direction, our current position, the nearest ennemy position :
def Tick(self):
enemy, range = self.GetNearestEnemy()
if enemy != None:
enemyHead = self.GetHeadingToID(enemy, False)
selfangle = self.GetMotorAngle(self.Motor)
angleToMoveServo = ( enemyHead + selfangle)
3rd/ servor motor must be link to analog control, suppose is it name 'Servo' here is an instance of use :
...
needToTurnClock = ...
if needToTurnClock : self.Input("Servo", 0, 30)
else: self.Input("Servo", 0, -30)
4th/ Angle go from 0 (heading) to math.pi, then -math.pi and than back to 0
this mean that when a servo motor turns, its current angle may suddently go from a positive value (math.pi)
to a negative one -math.pi.
I hope all of this may help some of you and we could see valuable research results soon.
BTW : Please Mad, can you post the AI you used for this bot ?
PS : I'm surprised about the stability of you bot, so much weight so 'high' and still a good reaction against mako head-attack. development should not have been so easy, shouldn'd it ?
-
I am extremely surprised about your bot being able to beat Mako 4 with absolutely no wedges.
obZen isn't much of a challenge with just several razors.
Both of Shebeast and TuNiT 3 have exposed tops -> easy battles.
IMO this could beat InfCon too.
Yeah, i'd update the team gladly.
-
These are 2 bad servo Bots :
(https://gametechmods.com/uploads/images/80452badBots.png)
the first one has stability problem, the second one have have too heavy weapons attached to the servo compared to its small wheel : when i turn the servo -> it is the chassis that move !
designing those bots is not so easy :-(
-
Possibility for a new Tazbot replica?
-
Now THIS is a good idea.
-
Phil:
BTW : Please Mad, can you post the AI you used for this bot?
I will.[/COLOR]
Gig: Nice thought.
Phil:PS : I'm surprised about the stability of you bot, so much weight so 'high' and still a good reaction against mako head-attack.
It has a unique SRM tactic, that includes User-adjustable settings. I'll show you.[/COLOR]
Nar: This tactic: One huge advantage of an HS is that it's weapon(s) are efficient 360 degrees. This tactic facilitates the same peripheral advantage, while enabling other kinds of weapons to be used.
Nar: This bot: bot: SkinHead's particular weakness is its supporting arm that holds the weapons in place. If an opponent can get to it, it is it's achilles' heal. SkinHead could be tweaked to be better, for sure. As Phil said, with some thought and time a good builder could probably make an effective bot with this tactic. I appreciate your help with making this practical and User-friendly.
Phil: I was thinking of making/adding some coding that would enable the bot to see if another bot is under it, and then activate either a servo-ed weapon or SRM to direct weapons to under it's chassis onto the opponents. I was thinking of a combo of getLocation(Z and X) to see if the 2 bots are at the same location, and then getLocation(y) of both bots to see who is under whom; and then do what needs done...
-
I was thinking of a combo of getLocation(Z and X) to see if the 2 bots are at the same location, and then getLocation(y) of both bots to see who is under whom; and then do what needs done...[/COLOR]
In this context, a custom zone should be a good solution ?
Possibility for a new Tazbot replica?
here is a TazBot with a slightly modified version of laserGuided.py :
https://gametechmods.com/uploads/files/TazbotLG.rar (https://gametechmods.com/uploads/files/TazbotLG.rar)
This bot has no custom zone.
(the file uploader seems to truncate the movie, so i made an archive 4 Mo)
-
Phil, did you upload a vid or a bot?
-
Well Mad i'm not sure about the efficiency of the razors you directly put on your extenders.
Plus with a drive that weak you may want to use something like 4-5 ant batteries rather than overpowering the bot with 2 battlepacks (more total power, see Daisy Might that got immobilized because of battery power).
EDIT: YEAH i'm in orange now! Awesome.
-
Mewannabeaorange
Making Tazbot use this would be a good idea, IMO.
-
wow, this could change the whole aspect of bot building
-
Phil, did you upload a vid or a bot?
This is a movie, i will post the bot and its AI soon.
-
I was looking at your Tazbot vid and it's pretty much awesome.
You could send it directly to Click for DSL3, but i think it should lift rather than flip (like Biohazard) and the bot's turnspeed should be higher (just like the real Tazbot)
-
TazBot and its ai can be download here :
...
https://gametechmods.com/uploads/files/tazbot.rar (https://gametechmods.com/uploads/files/tazbot.rar)
i improve my previous bot :
(https://gametechmods.com/uploads/images/11409servohead.jpg)
Edited' : invert bug fixed.
-
Here is the AI.py that runs most of my SOW bots: Ici!:Top_Smasher_2R (http://www.madiaba.gametechmods.com/Top_Smasher_2R.rar)
Phil, (or anyone else,) if you see any places to improve it let me know.
I was going to include your 'goon' coding, but haven't had the time yet. If you want to do that and append the title '..._goon' or whatever that's fine with me. I'd like to differentiate between the 2 pys though, because I have several bots that have more than 1 servomotor on them.
Idea-1: I was actually thinking of coding an Army combat assault vehicle with 3 SOW-ed automatic cannons (ACAMS's M-guns), that would lock onto the other 3 opponents individually and open fire on each simultaneously. If/When one opponent was destroyed, then that gun would turn to assist another cannon in it's assault...and so on till all 3 were pummeling the last bot with automatic fire. What do you think?
Idea-2: I also had an idea of an ACAMS.bot that bears a SOW-ed, automatic M-gun in each arm. As soon as the buzzer sounds, he comes out of the corner with both guns blasting away...(Maybe call it "RAMBOt"... hehe).
Ok, Goose and I will take our pills and go sit down for a while....
(http://http:/%5bURL=http:/www.madiaba.gametechmods.com/Beta_HangarArena.rar%5d%20Beta_HangarArena%5b/URL%5d)[/COLOR][/SIZE][/U][/B]
..
-
Idea 1 has some potential. You should try that one. Maybe someone could make a battleship-bot!
-
Ideaa 2 sounds like fun. Gonna put a cowboy hat on that Acams bot ......? Maybe send me the skin so I can put a little red bandana over the lower half of the face? May as well go for twin holsters on the sides, too ..... the "Bandido Bot"
. o O (I am going to be SO dead when Acams sees this ......)
-
All right if I use that Tazbot for DSL? I've been intending to make its head rotate.
-
I was going to include your 'goon' coding, but haven't had the time yet. If you want to do that and append the title '..._goon' or whatever that's fine with me.
i will post it soon (i was on holidays )
EDIT 03/09 : In fact, i won't, not that i'm leazy but it is explained in a previous post and i think it 's good that people, as long as they are intersted, try by themselve. However, i will help anybody who meets trouble in his attempt.
...1st : to know the Id of the servo motor
All right if I use that Tazbot for DSL? I've been intending to make its head rotate.
I do not feel owner of Tazbot and even the AI has strongly taken a starting point from Mad works. So Feel very very Free to do, change or use whatever you want.
-
I like how the Tazbot works. The way the arm moves is freakishly realistic to what the normal Tazbot was like.
-
here are variation of bots with servo motor.
these are RA2 Stock HW bots. Quiet effective against some Rage bots, they do not hold the challenge against stareCore ones.
(https://gametechmods.com/uploads/images/62357servoGuidedStock.png)
-
Still trying to make a good HW SOW with stock ...
(https://gametechmods.com/uploads/images/645servo1.png)
(https://gametechmods.com/uploads/images/84564servo2.png)
still work to do yet !
bindings line look like that
list.append( ("head on", "LaserGuidedV2",{ 'range':80, 'radius':2.5, 'servorange':2.8,'servonose':-1,'delta':0.25, 'servospeed':50, 'topspeed':99, 'mayFire':True, 'throttle':130,'weapons':(1,2,3,4,5,6,7,8,9)}))
servorange : when servo is aiming and ennemy at servorrange -> fire
servonose : same idea as 'nose' : take into account the fact that the attachement to the serbvo motor is not always in the original direction of the servo
mayFire : Set to True if firing target are attached to servo.
-
Rear sawblade on a HP ztek is useless.
However, i like the skin of this first bot...
-
That bottom bot looks real cool. Maybe a smaller chassis might help...
If it's not too impositional, Phil, could you post a vid or the bot itself?
-
Well one thing you could do to improve on it is two use HPzs rather than RADS.
-
You could take out the spikes that are currently behind the snowplow.
-
This isn't a showcase. If you think you can do better, try it on your own stock showcase. Jeez.
I'm actually quite impressed by this. The S.O.W AI isn't as good in stock, but purely amazing in DSL.
-
Thanks for the feedback, guys. Phil and I have wanted a couple of you super 'stock- builders' to see what was possible with this kind of tactic. And DSL too, for that matter. Naryar has had it for a while now...
S-32, if you tried a SOW stock bot, then could you please report what you found (what kind of weapons, how did it work, pros/cons,...). And you tried a DSL one? How did that one work....?
BTW: I forgot to link this in the right thread:
Here is the SOW.bot, AI.py, and Bindings line I posted above:
https://gametechmods.com/uploads/files/SOW.rar (https://gametechmods.com/uploads/files/SOW.rar)
This bot is DSL.
..
-
That bottom bot looks real cool. Maybe a smaller chassis might help...
If it's not too impositional, Phil, could you post a vid or the bot itself?
EDIT 09/03/09 : video of the last bot : does not win the match but let you see how does it works :
[media]https://gametechmods.com/includes/flvfiles/headon2.flv[/media]
and to download this STOCK bot and its AI :
https://gametechmods.com/uploads/files/headon.rar (https://gametechmods.com/uploads/files/headon.rar)
And for Reier how does it happens that my vids works ? well, you just have to be patient while the uploader upload ! inital video size was 4 Mo.
-
Hey Phil, how do you get GTM's vid uploader to actually upload? It never works for me.
Cool vid, BTW.
-
The video uploader does work!
You have to imbed it into the forum with media tags [media]link to vid then brackets /media......which should appear as soon as the vid uploads.
-
I'm not saying it doesn't work, it just doesn't work for me for some reason. It just sits there when I upload usually. I did get lucky once, I uploaded 2 vids that are in my showcase.
-
video + bot
previous post updated, can download the bot too.
-
This is really neat! I've seen it attempted on Robot Wars but without much success due to human error. What happens when an SOW bot goes into a match with 2 or more opponents? Does it understand that it can only be pointed towards one enemy at a time?
Also, I have a replica that has a Servo-mounted hammer, and this would be just perfect to make it more life-like in battle It's a Dutch robot called Bamm Bamm. I'm no good with programming though, so I was wondering if one of you guys would be willing to code it for me if I give you the bot file?
-
Phil, I've notices that bots with out all-encompassing weapons work best with the SOW AI. Axes, Pistons, FS and VS work best.
-
What happens when an SOW bot goes into a match with 2 or more opponents? Does it understand that it can only be pointed towards one enemy at a time?
It aims to the 'nearest ennemy' according to the python function of the same name
Also, I have a replica that has a Servo-mounted hammer, and this would be just perfect to make it more life-like in battle It's a Dutch robot called Bamm Bamm. I'm no good with programming though, so I was wondering if one of you guys would be willing to code it for me if I give you the bot file?
Send it to me or shom me a picture of your bot (inside) and its controls, i will comment the picture according to the AI.
Phil, I've notices that bots with out all-encompassing weapons work best with the SOW AI. Axes, Pistons, FS and VS work best.
maybe in good builder hands ... not mine ; This is the subject of this thread, invite good builders to show their bots according to these kinds of AI. We are not numerous yet, but it may change : show what you've done.
-
Thanks for agreeing to help, here is the bot file:
https://gametechmods.com/uploads/files/Bamm Bamm.rar (https://gametechmods.com/uploads/files/Bamm Bamm.rar)
-
Thanks for agreeing to help, here is the bot file:
https://gametechmods.com/uploads/files/Bamm Bamm.rar (https://gametechmods.com/uploads/files/Bamm Bamm.rar)
Sonny, i cannot open your bot (crash application) in RA2 'stock edition'. It seems that your bots refers to non standard components such as a servo motor called Components\Styles\chservo.txt and battery named Components\WP836E.TXT.
I have not those components.
so I propose : you send me your bots and the components (components/xxxx components/styles/xxx) that go with, or you can try to do it yourself.
here are the standard controls :
(https://gametechmods.com/uploads/images/32882LaserGuidedControls.png)
names are case-sensitive.
"Forward" and "LeftRight" are the standard ones.
"Spin" has to be linked to a standard motor that spin ! (not your case)
"Servor" is the name of the control attached to your servo motor
"ServoFire" is the name of the piston/burst motor controler attached to the servo motor (your case)
no need of custom zone.
about the binding line, it may be something like (with the 'nose', 'servonose' and 'weapons' restriction as i don't know them) :
list.append( ("Bamm Bamm", "LaserGuidedV2",{ 'range':80, 'radius':2.5, 'servorange':2.8,'servonose':-1,'delta':0.25, 'servospeed':50, 'topspeed':99, 'mayFire':True, 'throttle':130,'weapons':(1,2,3,4,5,6,7,8,9)}))
Ai may be found here :
Big name for little AI ! ...
Also available : Madiaba AI called "SOW", acces is here :
Here is the SOW.bot, AI.py
(bindings and controlers command are different, tell me if you want i comment them this way)
-
Phil, if Bamm Bamm has a WP836E it's a DSL bot...
-
Phil, if Bamm Bamm has a WP836E it's a DSL bot...
i can't no more import it in DSL (due to the 'chservo' ?).
-
Bamm Bamm does have a couple of custom components. There's a rooster servo that turns the mechanism, and the decorative top is the disc from Component Pack D1 (also known as Dummy). The rest is stock
There are no DSL components though, so if you download the Beetlebros and the D1 pack, you shouldn't have a problem.
-
i can't no more import it in DSL (due to the 'chservo' ?).
Oh, I forgot to mention that this bot uses components from the BeetleBros and Dummy packs.
Do you have the beetlebros' pack and the D1/D2 pack? You will need both to access this bot. Try downloading those and then you should be able to access the bot in DSL.
-
Oh, I forgot to mention that this bot uses components from the BeetleBros and Dummy packs.
Do you have the beetlebros' pack and the D1/D2 pack? You will need both to access this bot. Try downloading those and then you should be able to access the bot in DSL.
Well Sonny, i do not really want to download all those packs: I have yet 3 RA2 environements : 1 for DSL , 1 for all the RA2 standard AI pack (starcore, rfs + RAGE ) and a last one only for Rage that as use as 'show off' for friends or others who would like to try the game. I don't want to have another one with special components or to mix special pack with those env.
SO What ?
1/ try what i said in a previous post about controlers names and binding lines
or
2/ Ask Mad or another one who have these pack installed
or
3/ make a bot with standard components, i do AI it then change it later
-
Ok, I've gone with option 1 and input the codes like you said and everything's nominal, except that Bamm Bamm won't use his ax as a srimech when flipped, he keeps trying to turn the servo instead. Is there a way to fix this?
-
Ok, I've gone with option 1 and input the codes like you said and everything's nominal, except that Bamm Bamm won't use his ax as a srimech when flipped, he keeps trying to turn the servo instead. Is there a way to fix this?
you must have a contoler named 'Srimech' attached to your burst motor.
your binding line must have the information: 'invertible':False
i will change the AI to tell it not to turn the servo if inverted and not 'invertible' : post soon.
-
Ok, Bamm Bamm is up and running. Check it out:
http://www.youtube.com/watch?v=P_0iPgtRuzg
And thanks for all your help.
-
Looks real nice SR. Only thing is youneed to tweak it's firing angle so that it is pointing at the target when it fires... Did you use a Smart-Zone or servo-angle to trigger the weapon?
-
Looks real nice SR. Only thing is youneed to tweak it's firing angle so that it is pointing at the target when it fires... Did you use a Smart-Zone or servo-angle to trigger the weapon?
I'm not sure, where would I look to find out?
-
That or dsl forgot to put the best battle bot in the us(s)on (o)f (w)yatchi
-
I really like this bot, SR.
I'm not sure, where would I look to find out?
Well, does your bot have a SZ attached to the servo (requires bot file editting, NP)? If not then it is 'servo angle' actuated. In this later case since I don't know your exact coding, send(PM) me your AI.py and I'll show you how to adjust and fine tune it yourself. It can work allot better than it presently does....
-
I'm not sure, where would I look to find out?
WELCOME TO THE (future) BIG BAND OF SOW BUILDERS, SONNY !
if you used LaserGuidedV2.py (no smartzone), you have a parameter called servoNose that r may take a value that works much like the 'Nose' , typical values are:
-1, -0.5, -0.25,... 0.25, 0.5, 1 (default value).
-
Thanks, Phil.
1. I'd like to see your "LaserGuidedV2.py ", if possible.
2. I'll send you my crude 'Evasive.py' Module.
3. Tovaner and I worked on some coding commands from the exe, and now he's hacked through a quite a few more of them by himself... FB and CB added their input too. I'll send the latest to you...
-
Thanks, Phil.
1. I'd like to see your "LaserGuidedV2.py ", if possible.
here is it :
.....
mostly your own AI
-
funny i never looked in this topic yet.. my BBEANS entry actually has a servo weapon, i was hoping it would be unique but now i wonder :P
-
This small AI came from a request of JoeBloe whose bot have 3 weapon systems that could switch between them.
see
Natural High 4 (http://i148.photobucket.com/albums/s36/westcoastdrags/screenshot_207.png)
for more details
how does it works :
As usual an analogic control named 'Servo' is attached to the servo motor.
given a fixed period, the servo turns a given angle.
turn angle is math.pi / parameter called 'servoNbPos'
period is a calculated from a count-down which initial value is defined by the parameter 'servoTimer'
here are sample bindings :
list.append( ("shiftweapon", "ShiftWeapon2", {'nose': math.pi, 'servospeed':60, 'servodelta':0.05, 'servoTimer':50, 'servoNbPos':2,'weapons': (8, 12, 14, 15) }) )
list.append( ("shiftweapon2", "ShiftWeapon2",{'nose': math.pi, 'servospeed':60, 'servodelta':0.05, 'servoTimer':50, 'servoNbPos':3,'weapons': (8, 12, 14, 15) }) )
(https://gametechmods.com/uploads/images/39620shiftweapon2.png)
to get it (samples are stock) :
https://gametechmods.com/uploads/files/shiftweapon.rar (https://gametechmods.com/uploads/files/shiftweapon.rar)
.. i know, i have to post a movie, i will.
Weakness :
- havoc explosion !
to do : not tested with a bot with custom zone much like JoeBloe one( AI should support CZone anyway).
-
that is truly awesome work philetbabe I will defiantly give it a test tomorrow as sadly I have a lot of non RA2 work I need to do
-
Just a question...
What .py should I use for a thing that works like Omni.py but with just 2 independent smartzone-using weapons? (hammer/poker hybrid actually)
-
Just a question...
What .py should I use for a thing that works like Omni.py but with just 2 independent smartzone-using weapons? (hammer/poker hybrid actually)
Topknot should be good,
oterwise, there have been a rewriting (less specialized in its name of controler/zone) that is shown here :
this is in JoeBloe thread
and downloadable here (called omni multi-zone) :
https://gametechmods.com/forums/showt...zone#post24825
-
its on page 5 of my stock showcase
https://gametechmods.com/forums/showthread.php?t=1471&page=5
-
That's cool Phil, nice work. Yea, how about a vid?
I experimented with something like this 'specific weapon at specific servo angle'. It was called 'InferNo-Way'. It had the weapons at 3.14 radians from one another. On one side the main weapon was 10 flame throwers, that would take the life out of the opponent real quickly. When the life of the opponent reached < .1, the servo would turn the flames away and instead point a dozen or so piston-mounted pointy tip arrows at the wounded enemy and easily finish him off (usually) in one stroke.
Can you expound a bit more on some detail about your cool bot here...
-
That's cool Phil, nice work. Yea, how about a vid? .
i'm slow (i suck ?) at video because, most of the time, i wrote AI between 12h to 14h in my work and there i have not Fraps and, even if i had it, i am not allowed to upload/download video.
so i have to do them when i'm back home, and there, i have so much to do that i am distracted most of the time.
about the bot you talk above, is it the one in your showcase that looks like ACAM ?
BTW, this is not flattery, but your showcase is one of the best with flying planes, tanks, grasshoper, etc.
i like it much .
Can you expound a bit more on some detail about your cool bot here..
the cool bot is JoeBlo one. i just try to ai it.
the idea of the previous bot is to have extender attached to servo motor, this last one will change its position after a certain amount of time (role of the countdown parameter). Each change of position will make the servo motor rotate a certain angle which is calculated from the value of the parameter 'servoNbPos'.
this AI should be a basis for other AI that change servo motor position according to a special condition : for instance, once you've reached a certain amount of damage, or once one of your component reached a certain amount of damage
I will post a better version of this AI soon. it has a bug : crash the game when i stop a match (may be because the tick function takes to long to be executed).
here is the video :
[media]https://gametechmods.com/includes/flvfiles/joebloeai.flv[/media]
-
... continuation of post above ...
here is the corrected shiftWeapon AI. (servo motor change angle from time to time)
Bug corrected : no more crash after stoping a fight / parameter servospeed taken into account
improvment : localized code : yet the change of angle is conditionned by a timer. other condition may
be defined (written in python) in the function ShiftConditionOk(self).
bindings parameter : all are optionnal
'range' : range for spin motor, defualt 99
'servodelta' : optionnal : angle tolerance. the higher, the less the servo oscillates
but the servo may stabilizes in an ngle far from the 'aiming' one.
default : 0.05 (low)
'servospeed' : speed turn of the servo, default 100
'servonose' :angle correction due to attachement of mototrs or extenders. default value 1
typical calue : -1, 0.25,-0.25,1
'servoNbPos' : number of different position switched.
default : 2
if value = 2, servo change from angle 0 to angle math.pi
value = 3 is good for tribar
value = 4 is good for attachement with 4 extenders.
'servoTimer' : duration (abstract value) between 2 switch of position. default 15 (low)
Sample bindings (for the bots below)
list.append( ("shiftweapon I", "ShiftWeapon3", { 'nose': math.pi, 'servospeed':60, 'servodelta':0.15, 'servoTimer':25, 'servoNbPos':2,'weapons': (1,2,3,4) }) )
list.append( ("shiftweapon II", "ShiftWeapon3", { 'nose': math.pi, 'servospeed':30,'servodelta':0.05, 'servoTimer':35, 'servoNbPos':4,'weapons': (1,2,3,4) }) )
the sample bots (stock) in the .rar :
(https://gametechmods.com/uploads/images/27681shiftweapon3.png)
the Ai :
https://gametechmods.com/uploads/files/2762shiftweapon.rar (https://gametechmods.com/uploads/files/2762shiftweapon.rar)
next subject of work : a 2 servo motor bots, mounted on each of its flank, and that should works like 'arms' ... to think about.
-
Looks real nice, Phil.
Thought-1: It would be very cool to check the kind of bot the enemy is, so that, like a switch blade, you could put forth your best weapons system to face it.
These may be some useful commands:
....-plus.describe(BotID)
....-self.GetComponentType
....-one to find the AI.py of your opponent?(maybe Trov,BB's, or Apanx ran into one)
If there is a way one can gleen enough info to discover the type of the opponent bot, then this would work.
--------------
Thought-2: Another thought on your bot above, is that you could attach a SZ to the extender that would move with and trigger that particular weapons system on the bi/tri-bar; and only run the particular weapon that is engaging the enemy. *Of course that's BFE.... but cool.*
.
-
self.GetComponentType(CompID) wouldn't work because it is the opponent's components but AI.running_ai[AIBotID].GetComponentType(CompID) might... (AIBotID is different than the BotID because it is only looking at the AI bots but you could use AI.running_ai[AIBotID].GetID() for conversion). You can see what AI.py is being used by an opponent by typing in the coding above without the command at the end. Unfortunately, it isn't very easy to get the name of the AI.py without the extra text around it...
If you would like any more help or explaination, feel free to ask.
-
i will have a look at that.... Trovaner, do you have try any experiment on this information before ?
i've seen there is also
#ai_bindings = [] # list of AI scripts & which bots use them
which should give me quickly the information bot<->AI
the use of such information should be to switch between HS and VS
to study so.
-
The coding I gave you, I've tested before and I know it works but be careful not to over do things because you can also control your opponent using this or temporarily change coding for them. In the past, I've tried working on something that could tell apart bot types but ran into so many problems that I haven't touched it in months.
AI.ai_bindings contains everything in Bindings.py including bots that aren't fighting and the extra info so I think you'll run into the same problem as before (having troubles taking everything else out)
For similar weapon setups (such as HS, VS, FS, etc.), I would recommend using this: plus.rayTest(XYZ-StartingLocation, XYZ-EndingLocation)
It will return the BotID, CompID+1 (but still 0 if chassis), X-Coordinate, Y-Coordinate, and Z-Coordinate (in that order) of the first point that it hits between the starting and ending locations (on a side note, it will return -1 for the first two values if it doesn't touch anything or if its hits something other than a bot).
-
One of the big problems is that, even if one can:
......-ID all of the enemy's components
......-ID which AI.py the enemy's using
......-ID even which Tactics mode ('Engage',...) the enemy's running in
all of this is still not enough info to distinguish between a HS, VS, FS or TS, for instance.
Only a few like Poker.py or a Rammer.py would devulge enough of the needed info.
(Trov, could you IM me when you can on Yahoo...)
.
-
i've not work much on AI that reconize other AI yet ...
as i'm working on an AI that 'open arms' while far from foe and close its arms while foe are near (in custom zone), here are the first images (foes bots are from gigafrost AI pack).
[media]https://gametechmods.com/includes/flvfiles/openarms.flv[/media]
the AI have still to be improved ... or will be rejected if no good.
-
Phil, nice work.
In my experience, articulating servo motors accurately with SZs is a thankless effort. Please post any progress you make here, Phil, because I'm interested.
IMHO, I would try:
-triggering combine:
....-range and self.GetHeadingToID(enemy, False).
-servo control use:
....-self.GetMotorAngle(13).
....-self.Input('Grab', 0, +/-100)
Thus, if enemy is in range and in front, then adjust (analog controller) servo motor in radians to close weapon-arms; else default (open) mode.
-
the idea of this AI is resume in this code extract from the tick() function :
haveToOpenArms = True
targets = [x for x in self.sensors.itervalues() if x.contacts > 0 \
and not plus.isDefeated(x.robot)]
if len(targets) > 0 :
haveToOpenArms = False
if haveToOpenArms :
self.isOpenArms1 = self.openArms(self.MotorOne, "Servo1", 0 )
self.isOpenArms2 = self.openArms(self.MotorTwo, "Servo2", 1 )
else :
self.isCloseArms1 = self.closeArms(self.MotorOne, "Servo1", 0 )
self.isCloseArms2 = self.closeArms(self.MotorTwo, "Servo2", 1 )
with closeArms and openArms both with something like that :
def openArms(self, idMotor, CtrlServo, anglePositif):
selfangle = self.GetMotorAngle(idMotor)
if anglePositif == 1 :
winkel = self.servoOpenArmsAngle - selfangle
else :
winkel = -self.servoOpenArmsAngle - selfangle
return self.AimTowards(winkel, CtrlServo)
and a binding
list.append( ("testBotX", "InMyArms", { 'servoopenangle':0.3, 'servocloseangle':2.9, 'servodelta':0.28, 'servospeed':60,'weapons': (1,2,3,4) }) )
in fact, the problem i meet is about stability : aiming to open or to close, the arms still oscillate,
even if i change the THRESHOLD value of AimTowards().
what should be fine would be to attach piston to those arms, but a long as i did not resolve this
oscillation trouble, i can't.
and in fact, i wonder if 2 servo pointing always to ennemy is more efficient than this idea of open/close arms to (theorically) range attack the side of the ennemy.
Edit 2009/06/11 : Yeah ! i get it !!! the bot open its arms, let the foe get in, than close it arms and rip its flank ! i post soon video + bots + AI. just the time to 'improve the AI' : let attach firing meccanism to the extender so the bot may fire when it is in a 'closing' position.
(https://gametechmods.com/uploads/images/74364InMyArms.png)
Edit 2009/06/17 : here is the link to tha AI :
https://gametechmods.com/uploads/files/inMyArms.rar (https://gametechmods.com/uploads/files/inMyArms.rar)
the movie i'd made cannot be upload here, so i will make another...
Still a big problem : when attaching piston to those arms -> the servo had problem to stabilize and, sonner or later there is an havock explosion. Bots givent in the .rar are stock ones.