Author Topic: AI Robots attempting to outmaneuver instead of "Leroy Jenkins!"  (Read 4309 times)

Offline Phoenyx

  • *
  • Posts: 253
  • Rep: 0
  • Finally using my official Avatar
    • pheonyximperius
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
AI Robots attempting to outmaneuver instead of "Leroy Jenkins!"
« on: September 06, 2012, 04:16:57 AM »
The short version: Is it possible to AI a robot to use tactics besides "box rushing = win"?

The long version: I was messing around with an IRL robot I built and I was in an exhibition match with Storm 2. When the match started, Storm 2 mindlessly charged at me as usual. Of course, against Storm 2 that means you will never touch the ground again. I find it annoying against lifters and rammers, cheap when dealing with hammers and robots that can trap you, and just plane dumb when any spinner does it, especially the slower ones that can't turn well. So I've been thinking... Why were they programmed like that, and can it be changed? Is there any way to tell an AI robot to retreat, hold position, attack a potential weakness like the sides or back, circle the opponent, feint a charge, or in any other way use actual tactics instead of rushing in like Leroy Jenkins? I'm not really looking to dumb down the AI but rather have it operate more realistically. I'm sure it would have more applications than just making the game more fun to play. Imagine tournaments where the robots don't end up getting stuck in a corner until one is destroyed or is counted out.

Of course, it could also screw up the metagame in a way (SnS robots without melty-brain capability would become uncompetitive), but then again I've seen worse.
  :SFTW

Offline Pwnator

  • *
  • Posts: 6676
  • Rep: 15
  • Awards BOTM Winner
    • View Profile
    • http://pwnator.tumblr.com
    • Awards
  • See profile for gamer tags: Yes
Re: AI Robots attempting to outmaneuver instead of "Leroy Jenkins!"
« Reply #1 on: September 06, 2012, 04:48:37 AM »
Your solution is already in the title. All you need to do is to create an extremely thorough flowchart on what the robot should do and should not do and create a Python file out of it.

And as you can see from what I have written above, that it's so damn tedious with a possibility of even being anticlimactic if your robot is terrible.


There's a reason robots here are quite specialized. You can't force a bad bot to win a match through luring the opponent to a hazard. You can't have it detect weak spots and specifically strike at that area. Therefore the only major variables that dictate the outcome of the match are how well-built the robot is and if your robot counter your opponent's or not.
Clash Cubes 1 - Grey Matter (Runner-Up)
King of Karnage - Sideshow Freak (Runner-Up, Best Engineered)
Rust In Pieces - Paper Cut 3 (Grand Champion, Most Dangerous Bot)
Wheely Tag Tournament - Ion Thruster (Grand Champion, along with Ounces' DiSemboweLment)
UK vs USA - Dark Striker (Grand Champion)
Rust In Pieces 2 - Claymore (Runner-Up, Favourite Bot)
BBEANS 6 - Infection 4 (Runner-Up)
RA2 Team Championships - Serious Business, Skeksis (Runner-Up, along with Scrappy, S_M, and Badnik)
RA2 Team Championships 2 - The Other Stig (Runner-Up, along with Scrappy, S_M, Badnik, 090901, and R1885)
Replica Wars 3 - Abaddon (Runner-Up, Luckiest Bot)
BroBots - wheebot & yaybot (Runner-Up)
Robo Zone 2 - Dipper (4th place, Survival Champion, & Best Axle Bot)
ARBBC - The Covenant (3rd place, BW Rumble Winner, Most Feared BW)

Offline Naryar

  • Posts: 23267
  • Rep: 20
  • hybrids oui oui
    • http://www.youtube.com/us
  • Awards BOTM Winner
    • View Profile
    • Awards
  • Skype: TheMightyNaryar
Re: AI Robots attempting to outmaneuver instead of "Leroy Jenkins!"
« Reply #2 on: September 06, 2012, 04:52:43 AM »
Possible, but probably tedious, just as pwnie said.

Offline Phoenyx

  • *
  • Posts: 253
  • Rep: 0
  • Finally using my official Avatar
    • pheonyximperius
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
Re: AI Robots attempting to outmaneuver instead of "Leroy Jenkins!"
« Reply #3 on: September 06, 2012, 05:10:34 AM »
Well, tedious is my specialty...

I guess I'll start working on it, although before that I will need to know if it's possible to program the AI to attack a general angle as apposed to the chassis in its entirety.
  :SFTW

Offline Clickbeetle

  • *
  • Posts: 3374
  • Rep: 21
  • In Soviet Russia, bugs stomp YOU!
  • Awards BOTM Winner
    • View Profile
    • Beetle Bros site
    • Awards
Re: AI Robots attempting to outmaneuver instead of "Leroy Jenkins!"
« Reply #4 on: September 07, 2012, 12:29:28 AM »
See here's the problem.
 
Try fighting, say, Storm 2 like you already mentioned.  Try to retreat, hold position, attack a potential weakness like the sides or back, circle the opponent, feint a charge or in any other way use actual tactics.  It's not easy, and you're a skilled human driver!  Imagine getting the AI to do that and you see why no one has done it.
 
Now try fighting a spinner like Grog.  Try using any of those tactics.  It's not just hard, it doesn't work at all--the only way to beat Grog is by charging in full throttle shouting "LEEEROOOOOOY JENKINS" at the top of your lungs.  But how is the AI going to know that?  There's no way for the AI to tell what type of bot it's fighting.  Maybe, with a lot of dedication, you can AI something that successfully outmaneuvers opponents, but it's going to be worthless against spinners.
 
Hence the simple box rush strategy: simple, and close to what humans do anyway against some bots.

To lack feeling is to be dead, but to act on every feeling is to be a child.
-Brandon Sanderson, The Way of Kings

Offline Phoenyx

  • *
  • Posts: 253
  • Rep: 0
  • Finally using my official Avatar
    • pheonyximperius
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
Re: AI Robots attempting to outmaneuver instead of "Leroy Jenkins!"
« Reply #5 on: September 07, 2012, 01:10:49 AM »
What I was thinking:

As you can see I already have an idea of what information would be needed and what strategy to use at a specific time (at least for a basic prototype), I just need to know if it's possible get that information. That's all I'm asking at this point.
  :SFTW

Offline Naryar

  • Posts: 23267
  • Rep: 20
  • hybrids oui oui
    • http://www.youtube.com/us
  • Awards BOTM Winner
    • View Profile
    • Awards
  • Skype: TheMightyNaryar
Re: AI Robots attempting to outmaneuver instead of "Leroy Jenkins!"
« Reply #6 on: September 07, 2012, 03:46:31 AM »
Hence the simple box rush strategy: simple, and close to what humans do anyway against some bots.

also it's GLORIOUS and MANLY

Offline Phoenyx

  • *
  • Posts: 253
  • Rep: 0
  • Finally using my official Avatar
    • pheonyximperius
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
Re: AI Robots attempting to outmaneuver instead of "Leroy Jenkins!"
« Reply #7 on: September 07, 2012, 05:26:54 AM »
also it's GLORIOUS and MANLY

Sometimes, but it can be cheap and cowardly if it ends up with an immobilization due to pinning, or just plain foolish - Rage 3, for example.

At the very least this would be useful in IRL tournaments. You don't see real combat robots box-rushing...
  :SFTW

Offline SKBT

Re: AI Robots attempting to outmaneuver instead of "Leroy Jenkins!"
« Reply #8 on: September 07, 2012, 07:24:37 AM »
You couldnt have two bots with the proposed AI fight each other. They would both flawlessly circle eachother trying to flank but failing every time because both are programed not to show their sides and to get to the sides of the other one.

Offline Trovaner

  • *
  • Posts: 1222
  • Rep: 32
    • View Profile
    • Awards
Re: AI Robots attempting to outmaneuver instead of "Leroy Jenkins!"
« Reply #9 on: September 07, 2012, 09:18:58 AM »
What I was thinking:

As you can see I already have an idea of what information would be needed and what strategy to use at a specific time (at least for a basic prototype), I just need to know if it's possible get that information. That's all I'm asking at this point.
You can't view the trigger names of human bots without accidentally AIing them (assuming they bothered to name the triggers properly). Also if you look at the components (not that you mentioned doing this), you will have troubles differentiating between things like FS and HS which would have completely different battle tactics.

You can break out of the random circling if you add a random variable but any form of circling usually exposes your sides.

I've attempted to make intelligent tactics in the past but there is currently no easy way of doing this. I've tried scanning bots in game (slow and I can't tell what component I'm looking at), reading bot files (too difficult to read all the sources that RA2 does), and waiting until the first attack hits (to see if it was a rotational or linear force being applied).

Perhaps, if we used a guess and check type of AI. Something like Snow (Seism 13's AI) would work well for battles that are performed more than once.

Offline System32

  • *
  • Posts: 4663
  • Rep: 4
  • Reality
    • View Profile
    • Awards
Re: AI Robots attempting to outmaneuver instead of "Leroy Jenkins!"
« Reply #10 on: September 07, 2012, 09:35:05 AM »
We've already discussed this. This entire forum defended TERRIBLE AI to the death for about 4 pages because the only thing that apparently is an accomplishment is how many hours you spend hovering blacks over each other and how many hours you reattach the same components to get a better wedge.
 
123savethewhales already pointed out that Building has plateu'd god knows how long ago, and every time someone suggests something to change it the same 5 retards dogpile the thread with the same crap because the wedge war is sooooooooooooooooooo absolutely important and damn anyone who doesn't love it 101% to heck and back.
 
Screw everyone who is part of this circlejerk and posted here with clear intent to shut down discussion. Also, anyone who posts from now on with the same intent can go get cancer or something.
Put this onto your signature if you were part of this crappy fad in '03.

Offline Naryar

  • Posts: 23267
  • Rep: 20
  • hybrids oui oui
    • http://www.youtube.com/us
  • Awards BOTM Winner
    • View Profile
    • Awards
  • Skype: TheMightyNaryar
Re: AI Robots attempting to outmaneuver instead of "Leroy Jenkins!"
« Reply #11 on: September 07, 2012, 10:11:13 AM »
the wedge war is sooooooooooooooooooo absolutely important and damn anyone who doesn't love it 101% to heck and back.

but it actually isn't ?

Offline System32

  • *
  • Posts: 4663
  • Rep: 4
  • Reality
    • View Profile
    • Awards
Re: AI Robots attempting to outmaneuver instead of "Leroy Jenkins!"
« Reply #12 on: September 07, 2012, 11:08:05 AM »
It wouldn't be if you and others like you didn't shoot down everything that would.
Put this onto your signature if you were part of this crappy fad in '03.

Offline Naryar

  • Posts: 23267
  • Rep: 20
  • hybrids oui oui
    • http://www.youtube.com/us
  • Awards BOTM Winner
    • View Profile
    • Awards
  • Skype: TheMightyNaryar
Re: AI Robots attempting to outmaneuver instead of "Leroy Jenkins!"
« Reply #13 on: September 07, 2012, 02:48:10 PM »
It wouldn't be if you and others like you didn't shoot down everything that would.

Wedge war is sooo last year man. Nobody really cares about outwedging people anymore now that the top builders are becoming equal to each other.

What i mean is... well wedge efficiency is still needed but nobody knows what is the ultimate wedge recipe (implying there is one to start with), and considering that most people have the same wedge recipes, wedge efficiency cannot be qualified by builder.

So wedge efficiency is now essentially random, therefore ruining the wedge arms race.

Offline Trovaner

  • *
  • Posts: 1222
  • Rep: 32
    • View Profile
    • Awards
Re: AI Robots attempting to outmaneuver instead of "Leroy Jenkins!"
« Reply #14 on: September 07, 2012, 04:36:34 PM »
It has never been a question about which would be better. The current tactic is just easier to code and works decently well when close to the opponent. While this has been discussed numerous times in the past, it is always nice to get people's input on possible solutions and problems. There have also been quite a few advancements in terms of understanding the mechanics of RA2 and its built-in commands.

That said, it is important that other people know what they can work with. Here are all the commands from my big list that could be useful in an a flanking AI.
Code: [Select]
#----- Plus Codes: -----
#plus.describe(BotID) - gives all component IDs and their corresponding bases
#plus.getContacts(BotID) - returns a value for each wheel (in order of CompID) that is equal to 0 when the wheel isn't touching anything and 1 when it is touching something (returns 0 if broken off)
#plus.getDirection(BotID,NoseOffset) - returns vector pointing in the forward direction for this player's bot with botlab nose offset. All three values are within the range positive 1 to negative 1. Each value equals positive 1 when directed toward their coorisponding XYZ-Direction (for example, the first value equals 1 when the bot is pointing in the direction of positive X).
#plus.getFPS() - returns the current FPS (for some reason it causes errors when used in certain sections such as Tick)
#plus.getGameType() - returns the name of the arena type (ex: "TABLETOP")
#plus.getHeading(BotID) - returns up axis heading for this player
#plus.getHealth(BotID,ComponentID) - returns the amount of health remaining (ex: 1.0 is 100% health, .5 is 50% health, ect.)
#plus.getHitpoints(BotID,ComponentID) - returns the amount of remaining hitpoints for the component
#plus.getLocation(BotID) - returns a list containing the XYZ-Location of the designated bot
#plus.getPlayers() - returns a tuple of all the BotIDs of all players (will not change when bots are disabled, destroyed, or eliminated)
#plus.getSpeed(BotID) - returns the current speed of the designated bot
#plus.getTimeElapsed() - returns the amount of time that has passed since the start of the battle
#plus.getWeight(BotID) - returns the weight of the designated ID (changes when components fall off) (I'm not sure how accurate this is because I used it in the botlab on one of my bots then in the test garage while it was still in the air and there was a 4kg difference...)
#plus.rayTest(XYZ-StartingLocation,XYZ-EndingLocation) - if something is between the two points it will returns the BotID (-1 if it is not a bot), the ComponentID (lowest component value is 2) (0 if chassis), the XCoordinate of intersection, the YCoordinate of intersection, and the ZCoordinate of intersection; otherwise it will return -1 for all five values if it doesn't hit anything. If it hits something that isn't a bot, the first two values are -1 while the rest are the XYZ of the point of intersection

#----- AI Codes: -----
#self.GetDistanceTo(XYZ-EndingLocation) - returns the distance to the designated location
#self.GetDistanceToID(BotID) - returns the distance to the designated BotID
#self.GetEnemies() - returns the IDs of all opposing bots
#self.GetHeading(True/False) - returns up axis heading for this AI bot. The given parameter specifies if it is going in reverse or not.
#self.GetHeadingTo(XYZ-Coordinates,True/False) - returns the heading to the given location. The second parameter specifies if it is going in reverse or not.
#self.GetHeadingToID(BotID,True/False) - returns the heading to the given BotID. The second parameter specifies if it is going in reverse or not.
#self.GetID() - returns the ID number of the bot loading this
#self.GetLastDamageDone() - returns the CompID for this AI that delivered damage to another bot, the amount of damage, time of hit, opponent's BotID, and the opponent's damaged CompID.
#self.GetLastDamageReceived() - returns the CompID that recieved the damage, the amount of damage, time of hit, opponent's BotID, opponent's CompID that delivered the damage
#self.GetLocation() - returns the coordinates of the bot loading this
#self.GetSpeed() - returns the current speed of the bot loading this
#self.GetTurning() - returns the current turning of the bot loading this
#self.GetZoneContents(SmartZoneName) - returns a list of strings containing two values for all components inside of the designated smartzone. The first value repressent the BotID+1 and the second value represents if it is a chassis.
#self.IsEnemy(BotID) - returns 1 if the designated bot is an enemy otherwise returns 0 (this sometimes results in random errors so I like to compare the BotID to the ones listed in GetEnemies)

#----- Arena Codes: -----
#(I can't remember if these are accessible within the AI.py's 'self' but if not, use 'a' instead ("a=Arenas.currentArena"))
#self.FromGrid(XYZ-Coordinates) - returns the XYZ-coordinates according to the map file (there is no diffence in results when the Y-Coordinate is given)
#self.GetMapResolution() - returns the arena's resolution setting (this command is used to determine how accurate the map file is)
#self.GetMapSize() - returns the arena's size setting (this is usually set at the top of the Arena.py)
#self.SetSearchRadius(Value) - used to determine the size of your bot so that it avoids walls and hazards (this is usually set to the value that you gave for the radius)
#self.RayTest(XYZ-StartingLocation,XYZ-EndingLocation) - if there is an object between the two points it will return a one and a list of the XYZ Coordinates for the point where it hit something. It will return a zero for the first value and (None, None, None) if nothing is between the two points.

As far as identifying the opponent's type, we are limited to only knowing their components' base. We have no idea how the components are connected. For this reason, we are better off determining if it is a type of bot that we don't want to flank. For HS, you could use plus.rayTest to see if any weapons are moving in the front of the bot at the start of the match (you would also need to make sure that you aren't looking at a FS or VS). For FBS, you could determine if their heading keeps changing at the start of the match. There is no one-size-fits-all solution for figuring out bot types so even this solution would require quite a bit of coding.

As far as flanking goes, you can check the size of the arena, the speed of both players, their current headings, and use the turn and max turn speeds from the bindings of the AI bot. The map size is rarely correct in custom arenas but you can use a self.RayTest as a corrective measure. If the hazards were properly labeled, you can also tell it to avoid them (preferably before attempting the flanking maneuver).

Offline G.K.

  • *
  • Posts: 12155
  • Rep: 10
  • Striving for a good personal text since 1994.
    • View Profile
    • Awards
Re: AI Robots attempting to outmaneuver instead of "Leroy Jenkins!"
« Reply #15 on: September 07, 2012, 04:50:48 PM »
Does Plow.py not cover this?
My above post explains everything about everything.

Host of: Wheely Tag, Back To The Beginnings, BTTB 2, BTTB 3, BTTB 4, & BTTB V.

Heavy Metal: Champion (Mockery of the Whole Concept)
Robotic International Wars Series 1: Champion (Minifridge 6)
RA2 Team Championships 1 & 2: Champion (High Speed Train & Upthrust - as part of Naryar's Not Quite Evil Council of Doom)

Runner Up in: The Amazing Rage (Team Fedex), R0B0NOVA (Zaphod Stock), Steel Warzone (Inception of Instability), Box of Nightmares (Gicquel), Wheely Tag (Minifridge the Second)

Clash Cubes IV: 5th place (Fretless)
BBEANS 6: Rumble Winner & 6th Place (Minifridge 4)

Offline Trovaner

  • *
  • Posts: 1222
  • Rep: 32
    • View Profile
    • Awards
Re: AI Robots attempting to outmaneuver instead of "Leroy Jenkins!"
« Reply #16 on: September 07, 2012, 05:22:21 PM »
Was Plow.py ever used outside of philetbabe's AI Chart? I don't know if it would work because I don't know the context that the Disable method was being use in. If I used it on ANY of my RA2 versions, the method would crash on me because my SuperAI doesn't inherit or define a Disable method and "self" is being used in the wrong way. Anyone using it without calling that method would merely be using the Charge and Shove tactics without any active weapons.

Offline Phoenyx

  • *
  • Posts: 253
  • Rep: 0
  • Finally using my official Avatar
    • pheonyximperius
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
Re: AI Robots attempting to outmaneuver instead of "Leroy Jenkins!"
« Reply #17 on: September 08, 2012, 12:57:47 AM »
I apologize for not realizing how divisive the subject of AI and its effects on the Metagame is.

Now for the original reason I began posting:

It has never been a question about which would be better. The current tactic is just easier to code and works decently well when close to the opponent. While this has been discussed numerous times in the past, it is always nice to get people's input on possible solutions and problems. There have also been quite a few advancements in terms of understanding the mechanics of RA2 and its built-in commands.

That said, it is important that other people know what they can work with. Here are all the commands from my big list that could be useful in an a flanking AI.
Code: [Select]
#----- Plus Codes: -----
#plus.describe(BotID) - gives all component IDs and their corresponding bases
#plus.getContacts(BotID) - returns a value for each wheel (in order of CompID) that is equal to 0 when the wheel isn't touching anything and 1 when it is touching something (returns 0 if broken off)
#plus.getDirection(BotID,NoseOffset) - returns vector pointing in the forward direction for this player's bot with botlab nose offset. All three values are within the range positive 1 to negative 1. Each value equals positive 1 when directed toward their coorisponding XYZ-Direction (for example, the first value equals 1 when the bot is pointing in the direction of positive X).
#plus.getFPS() - returns the current FPS (for some reason it causes errors when used in certain sections such as Tick)
#plus.getGameType() - returns the name of the arena type (ex: "TABLETOP")
#plus.getHeading(BotID) - returns up axis heading for this player
#plus.getHealth(BotID,ComponentID) - returns the amount of health remaining (ex: 1.0 is 100% health, .5 is 50% health, ect.)
#plus.getHitpoints(BotID,ComponentID) - returns the amount of remaining hitpoints for the component
#plus.getLocation(BotID) - returns a list containing the XYZ-Location of the designated bot
#plus.getPlayers() - returns a tuple of all the BotIDs of all players (will not change when bots are disabled, destroyed, or eliminated)
#plus.getSpeed(BotID) - returns the current speed of the designated bot
#plus.getTimeElapsed() - returns the amount of time that has passed since the start of the battle
#plus.getWeight(BotID) - returns the weight of the designated ID (changes when components fall off) (I'm not sure how accurate this is because I used it in the botlab on one of my bots then in the test garage while it was still in the air and there was a 4kg difference...)
#plus.rayTest(XYZ-StartingLocation,XYZ-EndingLocation) - if something is between the two points it will returns the BotID (-1 if it is not a bot), the ComponentID (lowest component value is 2) (0 if chassis), the XCoordinate of intersection, the YCoordinate of intersection, and the ZCoordinate of intersection; otherwise it will return -1 for all five values if it doesn't hit anything. If it hits something that isn't a bot, the first two values are -1 while the rest are the XYZ of the point of intersection

#----- AI Codes: -----
#self.GetDistanceTo(XYZ-EndingLocation) - returns the distance to the designated location
#self.GetDistanceToID(BotID) - returns the distance to the designated BotID
#self.GetEnemies() - returns the IDs of all opposing bots
#self.GetHeading(True/False) - returns up axis heading for this AI bot. The given parameter specifies if it is going in reverse or not.
#self.GetHeadingTo(XYZ-Coordinates,True/False) - returns the heading to the given location. The second parameter specifies if it is going in reverse or not.
#self.GetHeadingToID(BotID,True/False) - returns the heading to the given BotID. The second parameter specifies if it is going in reverse or not.
#self.GetID() - returns the ID number of the bot loading this
#self.GetLastDamageDone() - returns the CompID for this AI that delivered damage to another bot, the amount of damage, time of hit, opponent's BotID, and the opponent's damaged CompID.
#self.GetLastDamageReceived() - returns the CompID that recieved the damage, the amount of damage, time of hit, opponent's BotID, opponent's CompID that delivered the damage
#self.GetLocation() - returns the coordinates of the bot loading this
#self.GetSpeed() - returns the current speed of the bot loading this
#self.GetTurning() - returns the current turning of the bot loading this
#self.GetZoneContents(SmartZoneName) - returns a list of strings containing two values for all components inside of the designated smartzone. The first value repressent the BotID+1 and the second value represents if it is a chassis.
#self.IsEnemy(BotID) - returns 1 if the designated bot is an enemy otherwise returns 0 (this sometimes results in random errors so I like to compare the BotID to the ones listed in GetEnemies)

#----- Arena Codes: -----
#(I can't remember if these are accessible within the AI.py's 'self' but if not, use 'a' instead ("a=Arenas.currentArena"))
#self.FromGrid(XYZ-Coordinates) - returns the XYZ-coordinates according to the map file (there is no diffence in results when the Y-Coordinate is given)
#self.GetMapResolution() - returns the arena's resolution setting (this command is used to determine how accurate the map file is)
#self.GetMapSize() - returns the arena's size setting (this is usually set at the top of the Arena.py)
#self.SetSearchRadius(Value) - used to determine the size of your bot so that it avoids walls and hazards (this is usually set to the value that you gave for the radius)
#self.RayTest(XYZ-StartingLocation,XYZ-EndingLocation) - if there is an object between the two points it will return a one and a list of the XYZ Coordinates for the point where it hit something. It will return a zero for the first value and (None, None, None) if nothing is between the two points.

As far as identifying the opponent's type, we are limited to only knowing their components' base. We have no idea how the components are connected. For this reason, we are better off determining if it is a type of bot that we don't want to flank. For HS, you could use plus.rayTest to see if any weapons are moving in the front of the bot at the start of the match (you would also need to make sure that you aren't looking at a FS or VS). For FBS, you could determine if their heading keeps changing at the start of the match. There is no one-size-fits-all solution for figuring out bot types so even this solution would require quite a bit of coding.

As far as flanking goes, you can check the size of the arena, the speed of both players, their current headings, and use the turn and max turn speeds from the bindings of the AI bot. The map size is rarely correct in custom arenas but you can use a self.RayTest as a corrective measure. If the hazards were properly labeled, you can also tell it to avoid them (preferably before attempting the flanking maneuver).

Thanks. That's exactly the information that I needed. Now the fun part begins.

Finally, a few replies:

It wouldn't be if you and others like you didn't shoot down everything that would.

Wedge war is sooo last year man. Nobody really cares about outwedging people anymore now that the top builders are becoming equal to each other.

What i mean is... well wedge efficiency is still needed but nobody knows what is the ultimate wedge recipe (implying there is one to start with), and considering that most people have the same wedge recipes, wedge efficiency cannot be qualified by builder.

So wedge efficiency is now essentially random, therefore ruining the wedge arms race.

Then why not work towards a new goal? Isn't it GLORIOUS and MANLY to find new methods of competition in a sport or game?

You couldnt have two bots with the proposed AI fight each other. They would both flawlessly circle eachother trying to flank but failing every time because both are programed not to show their sides and to get to the sides of the other one.

That's assuming that both robots are exactly the same, eg. have the same weight, drive motors, weaponry, chassis layout, weight distribution, wheelbase, etc. That usually doesn't happen unless you put two of the same robot against each other, and even then there's the chance that they'll attempt to attack the other robot from intersecting angles.
  :SFTW