Author Topic: How to AI: For newbies (with pics!)  (Read 12738 times)

Offline ianh05

  • *
  • Posts: 2788
  • Reputation: 4
  • Stock AW Builder and Tourney Host!
    • View Profile
How to AI: For newbies (with pics!)
« on: April 28, 2013, 11:09:29 AM »
Since my last guide on AI'ing has been lost for ages now I think it's time to redo my basic guide to help newbies get into AI'ing. This is only a basic guide and does not cover everything there is to know, just what you NEED to know to AI basic bots the easiest way possible.

Step 1 - The Wiring and exporting:


You need to rename your controls to match that in the pic, VERY IMPORTANT!! all letters are case sensitive so LeftRight needs to contain a capital L and a capital R. After you are done renaming your controls head back to the Team HW and export your robot.

Step 2 - Moving and renaming your bot:


First go to your "Robot Designs" folder and find the robot you just exported then right-click on it and click on copy.



Now head into the AI folder and select the team you want the robot to join, it is easiest to start at the very beginning so just go ahead and put it into the "Team0" folder. Once you have moved your robot delete the bot you are going to replace and rename your bot so it matches the file name of the bot you just deleted (Bot0 in this case), VERY IMPORTANT!! you must use a capital B in the file name.

Step 3 - Bindings:


Finally head back into the main AI folder with all the pictures and find a file named "Bindings.py" and open it with notepad.


Now replace the first bot name with your bots name, VERY IMPORTANT!! all letters are case sensitive. Now if your robot has any kind of spinning weapon the next word after your bots name should be Omni, if it's a rammer it should be Rammer.

Now go test your robot! if your robot is facing the wrong way either add or remove 'nose':math.pi, and if that doesn't work rename it to 'nose':math.pi/2, and if your robot is invertible make sure your bindings include 'invertible':True,.



Update: How to AI popups, hammers and other weapon systems that use smart zones. Follow the same steps as previously instructed but do the following before you export your robot.

Step 1:


Download Mad's smart zones and install them into your game, you can download the smart zones here: https://gametechmods.com/Robot_Arena2/Components/MDBsmart-zones_v3.rar

Step 2:


Place the smart zone where you want to fire the weapons once an opponents bot touches the smart zone. Once placed name the smart zone "weapon" (No capital w).

Step 3:


Name your burst motor/piston control "Fire" and if you want it to fire when your robot gets flipped you can name it "Srimech", both these control names need capital letters. Now export your bot and follow the steps previously given, make sure the word after your bots name in the bindings.py file is Omni.
« Last Edit: July 12, 2014, 11:08:15 PM by ianh05 »
Check out my UI Improvements topic for stuff like longer team/bot import lists:
https://gametechmods.com/forums/index.php?topic=13324.0
How to make awesome splashes with paint:
https://gametechmods.com/forums/index.php?topic=13310.0
My showcase filled with antweights:
https://gametechmods.com/forums/index.php?topic=1595.0
How to AI: For newbies (with pics!):
https://gametechmods.com/forums/index.php?topic=13814.0
Best tournament results:
Tag Team Challenge and CombatAnts 3: runner-up
Around the World: 3rd place.

Offline Mechadino

  • Ultra Heavyweight
  • Posts: 2114
  • Reputation: 7
    • View Profile
Re: How to AI: For newbies (with pics!)
« Reply #1 on: April 28, 2013, 11:21:21 AM »
This is great, after forgetting about RA2 i forgot how to AI.

Offline ianh05

  • *
  • Posts: 2788
  • Reputation: 4
  • Stock AW Builder and Tourney Host!
    • View Profile
Re: How to AI: For newbies (with pics!)
« Reply #2 on: April 28, 2013, 01:31:13 PM »
Definitely a good start, but something on burst motors should probably be included, mainly to introduce smartzones.
Indeed, I plan to add that sometime soon.
Check out my UI Improvements topic for stuff like longer team/bot import lists:
https://gametechmods.com/forums/index.php?topic=13324.0
How to make awesome splashes with paint:
https://gametechmods.com/forums/index.php?topic=13310.0
My showcase filled with antweights:
https://gametechmods.com/forums/index.php?topic=1595.0
How to AI: For newbies (with pics!):
https://gametechmods.com/forums/index.php?topic=13814.0
Best tournament results:
Tag Team Challenge and CombatAnts 3: runner-up
Around the World: 3rd place.

Offline 090901

  • Forum Anti Anti Anti Bully Ranger!
  • *
  • Posts: 6893
  • Reputation: 25
  • :mrgreen:
    • View Profile
Re: How to AI: For newbies (with pics!)
« Reply #3 on: April 28, 2013, 01:53:02 PM »
For the nose math part, you should add this from the AI Chart.
Code: [Select]

'nose':math.pi*0.25 " will rotate the bot 45 degrees Counter-Clockwise
'nose':-math.pi*0.25 " will rotate the bot 45 degrees Clockwise
 'nose':math.pi*0.5 " will rotate the bot 90 degrees Counter-Clockwise
 'nose':-math.pi*0.5 " will rotate the bot 90 degrees Clockwise
 'nose':math.pi*0.75 " will rotate the bot 135 degrees Counter-Clockwise
 'nose':-math.pi*0.75 " will rotate the bot 135 degrees Clockwise
 'nose': -math.pi " and math.pi rotate the bot 180 degrees.
« Last Edit: April 28, 2013, 09:47:39 PM by 090901 »

Offline ianh05

  • *
  • Posts: 2788
  • Reputation: 4
  • Stock AW Builder and Tourney Host!
    • View Profile
Re: How to AI: For newbies (with pics!)
« Reply #4 on: April 29, 2013, 06:09:10 AM »
Update OP with instructions on how to AI smart zone bots.
Check out my UI Improvements topic for stuff like longer team/bot import lists:
https://gametechmods.com/forums/index.php?topic=13324.0
How to make awesome splashes with paint:
https://gametechmods.com/forums/index.php?topic=13310.0
My showcase filled with antweights:
https://gametechmods.com/forums/index.php?topic=1595.0
How to AI: For newbies (with pics!):
https://gametechmods.com/forums/index.php?topic=13814.0
Best tournament results:
Tag Team Challenge and CombatAnts 3: runner-up
Around the World: 3rd place.

Offline Naryar

  • *
  • Posts: 21983
  • Reputation: 19
  • You are already defeated.
    • http://www.youtube.com/us
    • View Profile
  • Skype: TheMightyNaryar
Re: How to AI: For newbies (with pics!)
« Reply #5 on: April 29, 2013, 08:17:33 AM »
add something about bindings also.

Offline Mechadino

  • Ultra Heavyweight
  • Posts: 2114
  • Reputation: 7
    • View Profile
Re: How to AI: For newbies (with pics!)
« Reply #6 on: April 29, 2013, 03:36:55 PM »
Doesn't it already?

Offline ianh05

  • *
  • Posts: 2788
  • Reputation: 4
  • Stock AW Builder and Tourney Host!
    • View Profile
Re: How to AI: For newbies (with pics!)
« Reply #7 on: April 29, 2013, 06:03:32 PM »
It contains what they need to know in order to get their bots to work.
Check out my UI Improvements topic for stuff like longer team/bot import lists:
https://gametechmods.com/forums/index.php?topic=13324.0
How to make awesome splashes with paint:
https://gametechmods.com/forums/index.php?topic=13310.0
My showcase filled with antweights:
https://gametechmods.com/forums/index.php?topic=1595.0
How to AI: For newbies (with pics!):
https://gametechmods.com/forums/index.php?topic=13814.0
Best tournament results:
Tag Team Challenge and CombatAnts 3: runner-up
Around the World: 3rd place.

Offline Kossokei

  • Mr. Kurtsokei
  • Ultra Heavyweight
  • Posts: 1608
  • Reputation: 0
  • You better believe it.
    • View Profile
  • See profile for gamer tags: 1
  • Skype: A cornered fox...
  • Ventrilo: ...is more dangerous...
  • Xfire: ...than a jackal!
Re: How to AI: For newbies (with pics!)
« Reply #8 on: April 29, 2013, 06:21:34 PM »
you should add a note about if (example newbie) is using DSL, they don't need to download Mad's smartzones.

Offline 090901

  • Forum Anti Anti Anti Bully Ranger!
  • *
  • Posts: 6893
  • Reputation: 25
  • :mrgreen:
    • View Profile
Re: How to AI: For newbies (with pics!)
« Reply #9 on: April 29, 2013, 06:48:00 PM »
you should add a note about if (example newbie) is using DSL, they don't need to download Mad's smartzones.
The ones in DSL 2.1 are older versions than the newest released ones

Offline Avalanche

  • Current DSL HW Champion.
  • Ultra Heavyweight
  • Posts: 3085
  • Reputation: -35
  • Better than the mods
    • View Profile
Re: How to AI: For newbies (with pics!)
« Reply #10 on: January 03, 2014, 07:27:47 AM »
My apologies for this bump, but do you really need the latest versions of Mad's smartzones?
Reigning DSL HW Champion, with 2 victories so far: One over Ty4er and one over DSC.
Runner-Up in The Cybernetic Colosseum HW division.
Semi-finalist in RNP: Sword of Glory.

You don't have to like me. You don't have to respect me fully. But you do have to acknowledge what I've achieved.

I, for one, welcome our new Apanx overlord.

Offline Badnik96

  • tired of your shit
  • *
  • Posts: 16666
  • Reputation: 12
    • Badnik96GTM
    • View Profile
    • BattleBots Wiki
  • See profile for gamer tags: 1
  • Skype: Badnik96
Re: How to AI: For newbies (with pics!)
« Reply #11 on: January 03, 2014, 01:08:27 PM »
You don't need them,  but it's recommended.

Offline Yeastisbeast

  • Beetleweight
  • Posts: 154
  • Reputation: 0
  • I'm back, but no-one noticed I was gone
    • View Profile
Re: How to AI: For newbies (with pics!)
« Reply #12 on: April 20, 2014, 12:38:15 PM »
Could you add a description of each AI type(flipper, omni). I think it would be REALLY useful for people.
Huzzah! This post is bad now!

Offline cephalopod

  • professional blooper
  • *
  • Posts: 7305
  • Reputation: 42
  • president of the peerless zhuge fan club
    • View Profile
Re: How to AI: For newbies (with pics!)
« Reply #13 on: April 20, 2014, 01:38:37 PM »
That stuff is covered in Philetbabe's really useful AI guide, which may not cover some of the new stuff, but all the basic stuff you'd need for most bots.
https://gametechmods.com/uploads/files/8459AI-Chart-2.3.rar