gametechmods

Robot Arena => Tutorials and Tips => Other Tutorials => Topic started by: ianh05 on April 28, 2013, 11:09:29 AM

Title: How to AI: For newbies (with pics!)
Post by: ianh05 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:

(https://gametechmods.com/uploads/images/21245AI Wiring.jpg)
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:

(https://gametechmods.com/uploads/images/11685Step 2.jpg)
First go to your "Robot Designs" folder and find the robot you just exported then right-click on it and click on copy.

(https://gametechmods.com/uploads/images/9971Step 3.jpg)
(https://gametechmods.com/uploads/images/32113Step 4.jpg)
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:

(https://gametechmods.com/uploads/images/75171Step 5.jpg)
Finally head back into the main AI folder with all the pictures and find a file named "Bindings.py" and open it with notepad.

(https://gametechmods.com/uploads/images/91690Step 6.jpg)
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:

(https://gametechmods.com/uploads/images/35337Smart Zones 1.jpg)
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 (https://gametechmods.com/Robot_Arena2/Components/MDBsmart-zones_v3.rar)

Step 2:

(https://gametechmods.com/uploads/images/4347Smart Zones 2.jpg)
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:

(https://gametechmods.com/uploads/images/17505Smart Zones 3.jpg)
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.
Title: Re: How to AI: For newbies (with pics!)
Post by: Mecha on April 28, 2013, 11:21:21 AM
This is great, after forgetting about RA2 i forgot how to AI.
Title: Re: How to AI: For newbies (with pics!)
Post by: ianh05 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.
Title: Re: How to AI: For newbies (with pics!)
Post by: 090901 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.
Title: Re: How to AI: For newbies (with pics!)
Post by: ianh05 on April 29, 2013, 06:09:10 AM
Update OP with instructions on how to AI smart zone bots.
Title: Re: How to AI: For newbies (with pics!)
Post by: Naryar on April 29, 2013, 08:17:33 AM
add something about bindings also.
Title: Re: How to AI: For newbies (with pics!)
Post by: Mecha on April 29, 2013, 03:36:55 PM
Doesn't it already?
Title: Re: How to AI: For newbies (with pics!)
Post by: ianh05 on April 29, 2013, 06:03:32 PM
It contains what they need to know in order to get their bots to work.
Title: Re: How to AI: For newbies (with pics!)
Post by: Kossokei 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.
Title: Re: How to AI: For newbies (with pics!)
Post by: 090901 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
Title: Re: How to AI: For newbies (with pics!)
Post by: Avalanche 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?
Title: Re: How to AI: For newbies (with pics!)
Post by: Badnik96 on January 03, 2014, 01:08:27 PM
You don't need them,  but it's recommended.
Title: Re: How to AI: For newbies (with pics!)
Post by: Yeastisbeast 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.
Title: Re: How to AI: For newbies (with pics!)
Post by: cephalopod 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 (https://gametechmods.com/uploads/files/8459AI-Chart-2.3.rar)
Title: Re: How to AI: For newbies (with pics!)
Post by: CrustyRaisins on December 30, 2018, 04:20:12 PM
What's the difference between the new and old SmartZones?
Title: Re: How to AI: For newbies (with pics!)
Post by: kix 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.
Title: Re: How to AI: For newbies (with pics!)
Post by: Dreamcast 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.
Title: Re: How to AI: For newbies (with pics!)
Post by: 09090901 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
Title: Re: How to AI: For newbies (with pics!)
Post by: Reier 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
Title: Re: How to AI: For newbies (with pics!)
Post by: Redalert 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.