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

Offline ianh05

  • *
  • Posts: 2778
  • Rep: 4
  • Stock AW Builder and Tourney Host!
    • View Profile
    • Awards
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 Mecha

  • Ultra Heavyweight
  • Posts: 2140
  • Rep: 7
    • View Profile
    • Awards
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: 2778
  • Rep: 4
  • Stock AW Builder and Tourney Host!
    • View Profile
    • Awards
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

  • alcoholic in denial
  • *
  • Posts: 7005
  • Rep: 22
  • :mrgreen:
  • Awards Donated money for site hosting 2019 GTMCS2 Divison Winner GTMCS Division Winner
    • View Profile
    • Awards
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: 2778
  • Rep: 4
  • Stock AW Builder and Tourney Host!
    • View Profile
    • Awards
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: 23283
  • Rep: 21
  • hybrids oui oui
    • http://www.youtube.com/us
  • Awards BOTM Winner
    • View Profile
    • Awards
  • 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 Mecha

  • Ultra Heavyweight
  • Posts: 2140
  • Rep: 7
    • View Profile
    • Awards
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: 2778
  • Rep: 4
  • Stock AW Builder and Tourney Host!
    • View Profile
    • Awards
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: 1758
  • Rep: 0
  • You better believe it.
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
  • Skype: A cornered fox...
  • Discord: ...is more dangerous...
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

  • alcoholic in denial
  • *
  • Posts: 7005
  • Rep: 22
  • :mrgreen:
  • Awards Donated money for site hosting 2019 GTMCS2 Divison Winner GTMCS Division Winner
    • View Profile
    • Awards
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

  • Retired.
  • Ultra Heavyweight
  • Posts: 3109
  • Rep: -34
  • Yeah, I don't know why I'm still here either.
    • View Profile
    • Awards
  • Discord: ThePootisPower#8377
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?
Former DSL HW champion.
Runner-Up in The Cybernetic Colosseum HW division.
Semi-finalist in RNP: Sword of Glory.
Robogames 1 BW Runner-up.
Professional cunt.
Man of a thousand alt accounts.

Offline Badnik96

  • tired of your shit
  • *
  • Posts: 17537
  • Rep: 3
    • Badnik96GTM
  • Awards BOTM Winner
    • View Profile
    • BattleBots Wiki
    • Awards
  • See profile for gamer tags: Yes
  • 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: 160
  • Rep: 0
  • I'm back, but no-one noticed I was gone
    • View Profile
    • Awards
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

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
bristol bot builders / two headed death flamingo / snappy robots
//
kindest and friendliest '13, '15, '16, '17 / favourite staff member '14, '15

Offline CrustyRaisins

  • Antweight
  • Posts: 14
  • Rep: 0
  • Probably trash.
    • View Profile
    • Awards
Re: How to AI: For newbies (with pics!)
« Reply #14 on: December 30, 2018, 04:20:12 PM »
What's the difference between the new and old SmartZones?
Made you look!

Offline kix

  • RR2 dev
  • *
  • Posts: 3452
  • Rep: -3
  • H
    • View Profile
    • Awards
Re: How to AI: For newbies (with pics!)
« Reply #15 on: December 30, 2018, 05:02:26 PM »
ok, first welcome to GTM, now to the sad part.
You did an oopsie!
If there are red letters above the quick relpy part, that means that this hasnt been touched in ages, and that you shouldnt touch it. This what you have done is bumping.

Offline Dreamcast

  • Posts: 1431
  • Rep: 1
    • View Profile
    • Awards
Re: How to AI: For newbies (with pics!)
« Reply #16 on: December 30, 2018, 08:56:38 PM »
As for your question. it depends on the smartzone itself. The main difference is that the older smartzones have a kilo or more of weight to them, while newer ones (still pretty old) are only .1 kg.

Offline 09090901

  • competitive irl
  • *
  • Posts: 1742
  • Rep: 22
  • anti-boomer super soldier
    • View Profile
    • Awards
Re: How to AI: For newbies (with pics!)
« Reply #17 on: December 30, 2018, 08:59:30 PM »
ok, first welcome to GTM, now to the sad part.
You did an oopsie!
If there are red letters above the quick relpy part, that means that this hasnt been touched in ages, and that you shouldnt touch it. This what you have done is bumping.
You did an oopsie!

instead of bump whacking a new user, have you considered actually answering their question that's on topic?

also to add to what dreamiest said, custom smartzones are much easier to place than the default stock ones and are available in more shapes
DSL-IRL is the libtard’s meta. Go drink more soylent, retard! #BLUELIVESMATTER

Offline Reier

  • Rieir
  • *
  • Posts: 8579
  • Rep: 8
  • I GOT 3RD IN RAW1
    • https://www.youtube.com/c
  • Awards old BOTM Winner
    • View Profile
    • Awards
Re: How to AI: For newbies (with pics!)
« Reply #18 on: December 31, 2018, 12:42:56 AM »
the stock ones also weight 2kg and the new ones 0.1kg

also who cares if someone bumps
ALERT- Another WS coming up...
voted best bot builder two times and counting babayy. the best ra2 builder who has never won an actual tournament match
ReiAI pack for Ironforge
My drawings, and my webcomics
Why online PVP will save RA2
The problem with competitive IRL in RA2
I'm fine with hugging reier

Offline Redalert

  • The inventor of Wandering Spinners and invincirammers
  • Ultra Heavyweight
  • Posts: 1349
  • Rep: -48
  • Yes, I’m an outsider.
    • View Profile
    • RedStorm's RA2 website
    • Awards
  • Discord: RedStorm
Re: How to AI: For newbies (with pics!)
« Reply #19 on: December 31, 2018, 07:37:37 AM »
The brown SZs are older (I use these), and the green ones are newer. PYS also developed the Custom Zone- a smart zone that’s a solid blue cover. It’s way more sensitive than the original smart zones.