Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - TheOrcCorp

Pages: 1 2 [3] 4 5 6 7 8 9 10 ... 42
41
Tournament Archives / Robotic Combat 2004 - Heat C
« on: September 04, 2020, 04:38:36 PM »
I don't think I've ever released an RA2 episode I've been so disappointed in than this one.

42
Tournament Archives / Robotic Combat 2004 - Heat B
« on: August 30, 2020, 03:37:55 PM »
The tournament continues!

43
Tournament Archives / Robotic Combat 2004 - Heat A
« on: August 29, 2020, 02:55:20 PM »
Finally, the tournament starts!

44
Tutorials and Tips / Orc's Simple(ish) Guide to AI'ing DSL Bots
« on: August 26, 2020, 05:49:11 PM »
Right, time for the AI'ing part of my tutorial series. Don't run away, I promise everything will be explained clearly as possible!
 
AI 2-1.png

AI is the code robots use in Robot Arena 2 to work as opposed to you manually driving your robot to test it or play in Parsec. Supplying your own AI code for your robot(s) to hosts for AI Tournaments makes for an easier time for us and we'll appreciate you a lot more! (If you think about it, if everyone AI'ed their bots then tournaments would happen A LOT quicker...) AI is not hard, just a bit fiddly and requires messing around with...besides it makes for better testing of your robots for things like OW or Deathmatch etc.

EXPORTING/SETTING UP A TEAM
So we've wired our robot(s) up from the last tutorial, time to get them AI'ed up! I'm going to use my bots from the previous tutorials as examples again for consistency! Select your robot, click Export and name your robot Bot0/Bot1/Bot2/Bot3/Bot4/Bot5 - these are the names the game's code recognises when loading in robots and represent the 6 slots in an AI team.
 
AI 2-2.png

When done, we're going to create a new team for our AI creations. Quit your game and go into your AI folder.
 
AI 2-3.png

We have a bunch of Team folders here, you can either replace an existing bot file by dragging your bot files into an existing team folder OR you right click and select New -> Folder. Name this folder to follow the last Team folder you currently have. For example, my current last folder is Team20, so I've named my new folder Team21. Copy your bot files you just exported into this folder.
 
AI 2-4.png

Now go back to the AI folder and open up the Teams file. I use Notepad to do this.
 
AI 2-5.png

You want to copy ALL of the text in this red square and paste it at the very bottom of the document. The following things are what you need to change:
index 0 (change 0 to your new Team folder number, in my case 21)
Red Zone (I'd suggest changing this so you know what you're looking for)
"That's where your bot will be after ten seconds with ours!" (You don't have to change this but...eh.)
AI\red_zone.bmp (Again, don't have to change this but...eh.)
Robots: 0 1 2 3 4 5 (If you have 6 robots then leave this as is, if NOT then remove the numbers to compensate. For example, I only have 4 robots so will remove 4 and 5.)
 
AI 2-6.png

Save your document when you have made your changes...now we move onto AI! Open the Bindings file in your AI folder.

AI:
 
AI 2-7.png

Good lord, that's a lot of text...HEY, DON'T RUN OFF! RA2 AI is compromised of smaller segments that tell a robot how to act. Here are the basic ones you need for your robots (with definitions taken from the AI-Chart)
nose - the front of the robot. Tends to be either math.pi or math.pi*2 but if you build your robot facing the side then it might be math.pi*0.5.
topspeed - speed in meters/second AI will attempt not to exceed (default 4.0).
throttle - maximum analog value AI will attempt not to exceed (default 100)
turnspeed - turning in radians/second AI will attempt not to exceed (default 2.5)
turn - maximum analog value AI will attempt not to exceed (default 60)
radius - bot radius to used to check distances to hazards, walls, and other bots. (default 1.0). With a high value, your bot will avoid hazards, with a null value, it will ignore them (but hazards will not ignore your bot!).  Low value may be useful for high speed bots like pusher or rammer that rely more on their speed than maneuver.
weapons – Id of the weapon. Once all the components with theses Id are broken, the strategy of the bot may change to pusher. You could put a number for each weapon you have. As example: ,'weapons':(1,2,3,4,5,6) You DO NOT need to exact component number.

SPINNERS also use:
range - This determines the distance for when a spinner will start spinning it's weapon.

A bonus but IMPORTANT segment is:
'invertible':True, - This allows a robot to run upside down. You may see some robots with 'invertible':False, but I tend to omit this from when I do AI as I feel it's pointless. Lets take a look at Highschool Ex II's AI line:
    list.append(("Highschool Ex II","Omni",{'nose':math.pi,'radius':0.2,'range':100,'topspeed':200,'throttle':200,'turn':60,'turnspeed':2.5,'weapons':(1,2,)}))
As you can see Highschool Ex uses the 8 basic AI parts with values that Sev has spent time on to adjust. You're gonna have to test your AI a lot to make sure your bot is running how you want it to! You can AI your bots by copying another bot's AI line and adjusting the values accordingly with trial and error! (including changing the name to your own robot otherwise you'll keep crashing your game) DSL 2.4 comes with a DSL Bindings Templates file for your convenience.

You may notice a lot of files called PY files in your AI folder...these are different commands for each robot and why you need to wire/name your buttons correctly. Let's look at some basic py types with our four example bots applied to them!
Omni.py - The jack of all trades, Omni can be used for almost anything, great for weapon combinations. Flippers with a seperate srimech, spinners with a srimech, axes, pistons etc. As you can see here, Necky doesn't have anything too fancy with this AI line, just the basics so it can fire it's weapon and self-right.
    list.append(("Necky III","Omni",{'nose':math.pi,'radius':1.4,'topspeed':100,'throttle':250,'turn':80,'turnspeed':2.5,'weapons':(16,17,18,)}))
Flipper.py - Your typical flipper AI, this is good for flippers that self-right using their flippers. VVC's nose is the opposite direction but he functions the same!
    list.append(("Vivacious C","Flipper",{'nose':math.pi*2,'range':99,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2,'weapons':(18,19)}))
Spinner.py - Typical spinner AI, not much to be said really. Deadgnaws here can somewhat drive upside down but relies on invertibility more to help the spinner turn it back over.
    list.append(("Deadgnaws III","Spinner",{'invertible':True,'nose':math.pi*2,'radius':0.1,'range':500,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2,'weapons':(29,30)}))
There are plenty of other binding types but these are the most used in my opinion. Now let's look at Judge.py.

JUDGE.PY
Judge.py is for robots that use Beta/Overkill motors and as such have some added commands. Before we get into these, you'll need Notepad++ (at least that's what I use) https://notepad-plus-plus.org/downloads/ - download this and then carry on reading below.
MotorID - This is the number that represents your Beta/Overkill Motor. Right click your bot file and select "Edit with Notepad++"
 
AI 2-8.png

Good lord, looks like a mess right? Don't worry, scroll down till you find these parts.
 
AI 2-9.png

You will have to count each component (tedious, I know) until you find your Beta/Overkill motor. As we can see here, Miles the Marauder's first component is the betaburst so his MotorID is 'MotorID':1, - adjust accordingly to whatever number your component is!
StartAngle - This is where your weapon starts, most of the time it's either math.pi*0.6 or -math.pi*0.6
Reload - This is a unit for how long your weapon takes between firing.
    list.append(("G-funk F","Judge",{'nose':math.pi,'MotorID':38,'StartAngle':-math.pi*0.6,'reload':10,'radius':0.1,'topspeed':1000,'throttle':100,'turn':50,'turnspeed':2,'weapons':(32,)}))
As we can see here, G-Funk's motor was component number 38 so it's MotorID is 38, aside from the two added segments needed for a judge.py bot, the rest is similar to other robots.

FINAL WORDS:
All you need to do to make an AI line work is:
- Make sure it's on a fresh line
- Make sure everything is spelt case sensitive and correctly
- If the game crashes, you've spelt something wrong or removed an important part such as a comma,apostrophe or bracket.
 
AI 2-10.png

I set it up like this simply for consistency...yes I keep the old AI too for reference. So I did some AI testing...
 
AI 2-11.png

Necky didn't self-right with it's head so I'm gonna wire up it's head to the Srimech button (sometimes you have to go back to the Bot Lab to make changes but that's just bot building!) and I'm going to increase it's speed too!
 
AI 2-12.png

Miles is facing the wrong way so I'm going to change his nose to 'nose':math.pi*2, ...
 
AI 2-13.png

He's facing the right way and he fires his weapon pretty quickly thanks to messing with his Reload. I'm gonna alter the AI lines a bit more but this is basically it! Anyone can AI, it's not hard, just fiddly and takes time. Bear in mind that more tournaments might enforce your own AI in the future...I'm looking at it for OW5. With these tutorials you should have no excuse now!

If you have any questions, please ask away and if you think anything needs changing/adding then let me know! Hope this helps!

45
Tutorials and Tips / Re: Orc's Simple(ish) Guide to Wiring Up DSL Bots
« on: August 17, 2020, 01:35:38 PM »
Alternatively this is also a good guide. It's what I used when starting out. https://gametechmods.com/forums/tutorials-and-tips/how-to-ai-for-newbies-(with-pics!)/
It's most likely very similar but figured if I titled this DSL then people would most likely be drawn to it.

46
Tutorials and Tips / Orc's Simple(ish) Guide to Wiring Up DSL Bots
« on: August 17, 2020, 01:15:24 PM »
Right, ol Orc has heard enough bitching about AI that he's decided to make a tutorial series so that NONE of you have an excuse. Grab a snack/drink and read thoroughly!

Wiring involves naming your controls and adding smartzones so that the AI knows what kind of robot it is as well as when to fire it's weapons. We need to check our controller and make sure everything is named/wired correctly. You MUST name your controls precisely or they will not work. Button and smartzone names are in bold.

DRIVE
Forward - This makes the robot drive forward and backwards. For drive on the left side of your robot, the positive axis is Counter-Clockwise while the negative axis is Clockwise. For drive on the right side of your robot, it's the opposite: the positive axis is Clockwise while the negative axis is Counter-Clockwise.
 
AI Tutorial 1.png

LeftRight - This makes the robot turn to the side. No matter what side of drive you're wiring up, positive axis is Clockwise and negative axis is Counter-Clockwise.
 
AI Tutorial 2.png

Apparently, if you attach a wheel with the attachment point on the other side then you'll need to reverse your Clockwise/Counter-Clockwise settings (so Clockwise becomes Counter-Clockwise and vice versa). That's the drive done! Now we'll look at a few different bot types and what buttons/extras they need. I'm going to use a few examples of my own robots here.
FLIPPERS
Vivacious C is a flipper (a terrible one but he'll do for this tutorial). He needs a button as well as a smartzone to function properly.
Flip - this enables the flipper to fire up AS WELL as function as a srimech. Wire this button up to your flipping motors and make sure they have "Fire" selected so that they work.
 
AI Tutorial 5.png

Smartzones are found at the end of the Power section in Bot Construction. If you hit F12, you'll be able to see your selected smartzone and place it. You want to pick a smartzone suitable for your flipper's size and place it down accordingly. You'll need to experiment to find the best spot for your smartzone and name it flip . This combined with the button will make the flipper work!
 
AI Tutorial 3.png

 
AI Tutorial 4.png

SPINNERS
It's my boi, Deadgnaws! Spinners are extremely easy, requiring no smartzones: just one button (YES BUTTON, NOT SWITCH) for the spinner to work.
Spin - This enables your spinning motor to work. You'll have to adjust what direction it spins (Counter-Clockwise or Clockwise) to suit your robot.
 
AI Tutorial 6.png

Do NOT wire your spinners to a switch as the AI constantly turns them on and off during the battle. Wire it to a button and you're good to go.
AXES/PISTONS/FLAMETHROWERS ETC
Axes/piston spikes/flamethrowers etc all use the same base controls. I'll use Necky as my example here.
Fire - This enables your weapon to attack when a robot is in your smartzone.
 
AI Tutorial 7.png

You'll need a smartzone for these bots called weapon , again placed appropriately which will take some experimenting. Flamethrowers can also be assigned to your Forward button so that they are on when your robot drives but the choice is up to you.
 
AI Tutorial 9.png

SRIMECHS
Srimechs are easy.
Srimech - This enables your srimech to function when the robot is upside down.
 
AI Tutorial 8.png

BETA/OVERKILL MOTORS
These can be tricky buggers but the base settings are:
Hammer - This enables the motor to swing down. You will have to possibly mess with the axis settings when it comes to AI'ing but we'll come to that in the AI tutorial.
 
AI Tutorial 10.png

You'll need a smartzone named weapon and placed where you want it like the other smartzones
 
AI Tutorial 11.png


Right, think that's everything. Feel free to poke me if I missed anything but as far as I'm aware this has all the most used basic AI wiring needed. I've never done anything like this before so I HOPE it's helpful. Stay tuned for the next part which will focus on AI'ing!

47
Off-Topic Discussion / Re: It must be stopped
« on: August 14, 2020, 06:32:14 PM »
Screw you, I'm making a blue flipper

48
Tournament Archives / Re: Robotic Combat 2004
« on: August 07, 2020, 03:45:51 PM »
Do we have the splash though?
No splash for this.

So I have my new computer now and will resume this tournament as soon as possible. I'm waiting on a person to fix a robot as well as trying to get one other robot AI'ed...might be one or two slots opening if the fixes don't arrive in a few days: stay tuned!

49
DSL TC Showcases / Re: TheRoboteer's Hit or Miss DSL Showcase
« on: August 01, 2020, 11:16:41 AM »
To get us back on topic: this is bloody lovely Robo, top work as per! :heart_smiley:

50
Tournament Archives / Robotic Combat 2004 - ENTRIES FULL/Heat Draw
« on: July 29, 2020, 06:43:27 PM »
Plerco and Captain Mantine take the last 2 spots! Time for the draw!

HEAT A:

HEAT B:

HEAT C:

HEAT D:

Make sure to vote for arena choice if you haven't yet: I'll be locking the arena choice when I get up in the morning!

51
Tournament Archives / Robotic Combat 2004 - 30/32 Entries!
« on: July 29, 2020, 05:34:58 PM »
Finally got my entry in alongside accepting NH, Double00 and Nightraven's second entries.

2 PLACES REMAIN.

52
Tournament Archives / Robotic Combat 2004 - 26/32 Entries!
« on: July 29, 2020, 10:12:45 AM »
Are there still open spaces for this tournament? I logged on for the first time in a while, found something that I actually want to enter and the entry quota is almost filled :(
They are indeed...speaking of which: we're up to 26 entries!

Jazz, Mattiator and NH accepted alongside Cringey, Neon, SM and botbuster's 2nd entries.

Plerco denied due to weaponised front of rammer, Tommy still denied as robot crashes my game and ForceOfWill's second entry I don't know the basis of.

6 spots remain!

53
Tournament Archives / Robotic Combat 2004 - 19/32 Entries!
« on: July 28, 2020, 04:19:51 PM »
RedAce and Nicky accepted as well as Superbomb and MrBK's seconds entries accepted.

Nabi denied due to very long loading times (but I respect the effort put in) and Botbuster 2nd entry denied (bar goes through the drive motors)

54
Tournament Archives / Re: Deathmatch 6 - SBV
« on: July 28, 2020, 03:39:07 PM »
The hype is real!

55
Tournament Archives / Robotic Combat 2004 - 2ND ENTRIES NOW OPEN!
« on: July 28, 2020, 10:28:15 AM »
Right we're up to 15 thanks to Hard Bot entering. With this, I'm now going to open 2nd entries!

I've also added a poll for arena choice so if you can pls vote in that, I'd appreciate it!

56
Tournament Archives / Robotic Combat 2004 - 14/32 Entries!
« on: July 26, 2020, 05:27:42 PM »
SM, IBD and Nightraven accepted!

Nabi denied.

Also to better suit the old series...any objections to the arena being changed to Robot Wars Series 7?

57
Tournament Archives / Robotic Combat 2004 - 11/32 Entries!
« on: July 25, 2020, 07:18:25 AM »
Superbomb, Double00Rhys, Primeval and Gulden all accepted!

SM denied due to Flatmotor usage (good looking bot)

I mean, we have ring spinners in RA2, but they kinda need to have intersecting components in order to work. My design for Mauler has the "ring" disc clip through the top of the wheels, whereas IRL they'd be surrounding them. Would that be ok?
Think you're just gonna have to build and showcase so we can see what you're on about tbh as I'm confused

58
Tournament Archives / Robotic Combat 2004 7/32
« on: July 24, 2020, 05:54:04 AM »
Botbuster/MrBK/ForceOfWill all accepted!

What's the standard for ring spinners? I want to make a sequel to Mauler 51-50 and I can easily see it being a ring spinner.
Define "standard", ring spinners were around back when in the classic era I'm pretty sure.

59
Tournament Archives / Robotic Combat 2004 - 4/32 Entries!
« on: July 23, 2020, 09:37:46 AM »
Plerco, MrMatthews, NeonCalypso and Cringey all accepted!

Botbuster and MrBK denied.

60
Tournament Archives / Re: Robotic Combat 2004
« on: July 22, 2020, 08:35:48 AM »
As a note: I will accept robots from Robot Wars/Battlebots/Robotica/Live Scene/RoboGames/King Of Bots/This Is Fighting Robots as long as they are built in a classic series style. Robots that failed to qualify and other weightclasses also permitted as long as what you enter is a HW. (for example, Typhoon was a MW and then they made a HW version).

Had a few entries already, will check later!

Pages: 1 2 [3] 4 5 6 7 8 9 10 ... 42