gametechmods
Robot Arena => Tutorials and Tips => Other Tutorials => Topic started 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.
-
This is great, after forgetting about RA2 i forgot how to AI.
-
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.
-
For the nose math part, you should add this from the AI Chart.
'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.
-
Update OP with instructions on how to AI smart zone bots.
-
add something about bindings also.
-
Doesn't it already?
-
It contains what they need to know in order to get their bots to work.
-
you should add a note about if (example newbie) is using DSL, they don't need to download Mad's smartzones.
-
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
-
My apologies for this bump, but do you really need the latest versions of Mad's smartzones?
-
You don't need them, but it's recommended.
-
Could you add a description of each AI type(flipper, omni). I think it would be REALLY useful for people.
-
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)
-
What's the difference between the new and old SmartZones?
-
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.
-
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.
-
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
-
the stock ones also weight 2kg and the new ones 0.1kg
also who cares if someone bumps
-
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.