Author Topic: How can you allow more than 16 bots to compete in a single-player tournament?  (Read 3195 times)

Offline Hard Bot

  • Were you looking for someone else?
  • Super Heavyweight
  • Posts: 908
  • Rep: 1
  • My RAM is full of .bot files
    • View Profile
    • Awards
Is that possible, but not all 16 bots compete and a few of them are "cropped-out" each single-player tournament league?

Offline MassimoV

  • I Move Weight
  • *
  • Posts: 8929
  • Rep: 24
  • I make rap for people of Serbia
    • MassimoVTV
  • Awards BOTM Winner
    • View Profile
    • Mourning Glory
    • Awards
  • See profile for gamer tags: Yes
  • Skype: myhandsarefood
Probably need the source code.

Offline HurricaneAndrew

  • Ultra Heavyweight
  • Posts: 4235
  • Rep: -13
  • Admon is not pleased with your shenanigans.
    • HurricaneAndrew92
    • HurricaneAndrewGTM
    • View Profile
    • Awards
  • Skype: hurricaneandrew92
Probably need the source code.

This.

Now for the real question... Where the holy potato has your brother been? We all have this theory that he's dead.
« Last Edit: July 30, 2013, 09:34:35 PM by Trovaner »

#BlackNamesMatter  |  #HurricaneAndrewDidNothingWrong  |  #DemodNaryar  |  #OldfagAlliance

Offline playzooki

  • A title is a prefix or suffix added to someone's name in certain contexts. It may signify either veneration, an official position or a professional or academic qualification. In some languages, titles may be inserted before a last name (for example,
  • Posts: 2122
  • Rep: -34
    • View Profile
    • click to download more ram
    • Awards
  • Skype: dont stalk me
coughofftopiccough

Offline HurricaneAndrew

  • Ultra Heavyweight
  • Posts: 4235
  • Rep: -13
  • Admon is not pleased with your shenanigans.
    • HurricaneAndrew92
    • HurricaneAndrewGTM
    • View Profile
    • Awards
  • Skype: hurricaneandrew92
coughofftopiccough

Because that post is any better...

#BlackNamesMatter  |  #HurricaneAndrewDidNothingWrong  |  #DemodNaryar  |  #OldfagAlliance

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
It's an honest question though. Most of us miss Enigma.

Offline madman3

  • Giga Heavyweight
  • Posts: 5944
  • Rep: 8
    • https://www.youtube.com/c
    • View Profile
    • Awards
It's an honest question though. Most of us miss Enigma.
Yeah I need someone with pro-er taste in black metal than me for once XD

Massi is probably right, it's likely something non-adjustable without the source code.

Offline Merrick

  • *
  • Posts: 2530
  • Rep: 3
  • Half-decent IRL designs and terrible antweights.
  • Awards BOTM Winner
    • View Profile
    • Awards
Wasn't even aware it was possible.

Off-topic: holy s***, -26 rep???

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
IIRC Phil made a batch file or something that would rotate the teams or robots between events, I'll see if I can find it.
Edit: Damn, all the files where uploaded to megaupload and that is dead.

Offline Hard Bot

  • Were you looking for someone else?
  • Super Heavyweight
  • Posts: 908
  • Rep: 1
  • My RAM is full of .bot files
    • View Profile
    • Awards
How can I write a batch file? Is it just a text file called "ShiftTeams.bat"?

Offline helloface

  • Posts: 3884
  • Rep: -11
  • 090901's cumslave
    • https://www.youtube.com/c
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
  • Skype: helloface199
  • Discord: Helloface#2112
Yeah, you just name a txt ShiftTeams.bat.
 :facepalm:
Oh I'll be doing some banging.......

Offline Hard Bot

  • Were you looking for someone else?
  • Super Heavyweight
  • Posts: 908
  • Rep: 1
  • My RAM is full of .bot files
    • View Profile
    • Awards
Yeah, you just name a txt ShiftTeams.bat.
 :facepalm:
What info would I put in there to make it work?

Offline helloface

  • Posts: 3884
  • Rep: -11
  • 090901's cumslave
    • https://www.youtube.com/c
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
  • Skype: helloface199
  • Discord: Helloface#2112
No clue. We would need someone who is familiar with either the RA2 executable and/or batch files. It would also probably take a while to do, and nobody on GTM would have the attention span do do it properly. It would also probably not make it more than 16 teams.
Oh I'll be doing some banging.......

Offline playzooki

  • A title is a prefix or suffix added to someone's name in certain contexts. It may signify either veneration, an official position or a professional or academic qualification. In some languages, titles may be inserted before a last name (for example,
  • Posts: 2122
  • Rep: -34
    • View Profile
    • click to download more ram
    • Awards
  • Skype: dont stalk me
Yeah, its definately batch. I am familiar with it, but im not good enough.

Offline Trovaner

  • *
  • Posts: 1222
  • Rep: 32
    • View Profile
    • Awards
The Events.txt is responsible for specifying the number of rounds per event, the number of bots per round, the game type, etc. The problem is that RA2 crashes if the data doesn't match up with what it expects. As such, you can either have a 2-round event with 4 bots each round or a 4-round event with 2 bots each round. RA2 just doesn't know what to do when you try to make a bigger any bigger (or smaller). The code is hard-coded to behave in one of these two ways. I doubt that we could hack the EXE into supporting it without the source code.

While we are on the subject, the league events that RA2 provides are not very good. It may build and manage a bracket but there isn't much else.
  • It is a coin flip when it comes to which bot wins in the AI vs AI fights. RA2 doesn't perform any special calculations to determine a winner.
  • The opponents are based on your weight class but not in the way many of you think. If you are using a LW than the EXE will grab the bots in slot 1 (Bot0.bot); if you are using a MW than the EXE will grab the bots in slot 2 (Bot1.bot); if you are using a HW than the EXE will grab the bots in slot 3 (Bot2.bot).
  • After reading #2, some of you may be thinking about using a bot from the none class because the # in Bot#.bot is the same as the weight class identifiers in the BOT files. Unfortunately, RA2 has code to handle when people try to do this and as a result the game interprets the them as LWs.
  • The league points that RA2 keeps track of are based purely on the points scored during battles. Because RA2 is doing #1, a majority of these points are being randomly generated and fall between a min and max value. This means that someone could purposely score more points than the max value to always be in the lead. This also means that even if you won all of the tournaments with every battle lasting less than 10 seconds, you could still lose by points.
  • The skull count is easily hack-able so it doesn't mean much.

As far as rotators go, Phil and Mad both made some and I'm pretty sure that I could find at least one of them.... I'll upload them if I find them. IIRC, Mad made a team rotator like Phil but also a bot rotator (the first three slots swap with last three slots). I made a batch file for myself a few years ago that would rotated the AI bots with the Teams (makes tweaking AI bots much easier). I also have a few python files that perform similar tasks.

Rotators are actually very simple to make in almost any language. This is the basic idea behind them:
1. Rename file A to a temporary name
2. Rename file B to file A's original name
3. Rename file A to file B's original name

An untested and over-simplified version of the above when rotating teams folders in DOS batch is:
Code: (MS-DOS Batch) [Select]
ren Team0 temp
ren Team15 Team0
ren temp Team15

Offline helloface

  • Posts: 3884
  • Rep: -11
  • 090901's cumslave
    • https://www.youtube.com/c
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
  • Skype: helloface199
  • Discord: Helloface#2112
@#4 I find Team HQ too easy. Is there a way to increase the max value?
Oh I'll be doing some banging.......

Offline Hard Bot

  • Were you looking for someone else?
  • Super Heavyweight
  • Posts: 908
  • Rep: 1
  • My RAM is full of .bot files
    • View Profile
    • Awards
The Events.txt is responsible for specifying the number of rounds per event, the number of bots per round, the game type, etc. The problem is that RA2 crashes if the data doesn't match up with what it expects. As such, you can either have a 2-round event with 4 bots each round or a 4-round event with 2 bots each round. RA2 just doesn't know what to do when you try to make a bigger any bigger (or smaller). The code is hard-coded to behave in one of these two ways. I doubt that we could hack the EXE into supporting it without the source code.

While we are on the subject, the league events that RA2 provides are not very good. It may build and manage a bracket but there isn't much else.
  • It is a coin flip when it comes to which bot wins in the AI vs AI fights. RA2 doesn't perform any special calculations to determine a winner.
  • The opponents are based on your weight class but not in the way many of you think. If you are using a LW than the EXE will grab the bots in slot 1 (Bot0.bot); if you are using a MW than the EXE will grab the bots in slot 2 (Bot1.bot); if you are using a HW than the EXE will grab the bots in slot 3 (Bot2.bot).
  • After reading #2, some of you may be thinking about using a bot from the none class because the # in Bot#.bot is the same as the weight class identifiers in the BOT files. Unfortunately, RA2 has code to handle when people try to do this and as a result the game interprets the them as LWs.
  • The league points that RA2 keeps track of are based purely on the points scored during battles. Because RA2 is doing #1, a majority of these points are being randomly generated and fall between a min and max value. This also means that someone could purposely score more points than the max value to always be in the lead. This also means that even if you won all of the tournaments with every battle lasting less than 10 seconds, you could still lose by points.
  • The skull count is easily hack-able so it doesn't mean much.

As far as rotators go, Phil and Mad both made some and I'm pretty sure that I could find at least one of them.... I'll upload them if I find them. IIRC, Mad made a team rotator like Phil but also a bot rotator (the first three slots swap with last three slots). I made a batch file for myself a few years ago that would rotated the AI bots with the Teams (makes tweaking AI bots much easier). I also have a few python files that perform similar tasks.

Rotators are actually very simple to make in almost any language. This is the basic idea behind them:
1. Rename file A to a temporary name
2. Rename file B to file A's original name
3. Rename file A to file B's original name

An untested and over-simplified version of the above when rotating teams folders in DOS batch is:
Code: (MS-DOS Batch) [Select]
ren Team0 temp
ren Team15 Team0
ren temp Team15

How do the teams "rotate"? Season-after-season or something else? I put 4 more teams in the AI folder, a total of 19 teams. (ending with "team18") Would I have to modify the "Team15" to "Team 18" in the batch file?

Offline Jonzu95

  • Giga Heavyweight
  • Posts: 12636
  • Rep: -27
    • View Profile
    • Awards
IIRC Phil made a batch file or something that would rotate the teams or robots between events, I'll see if I can find it.
Edit: Damn, all the files where uploaded to megaupload and that is dead.
I didn't know you could mod it like that... :o

Offline Trovaner

  • *
  • Posts: 1222
  • Rep: 32
    • View Profile
    • Awards
@#4 I find Team HQ too easy. Is there a way to increase the max value?
There isn't an easy way of doing it but if you found the exact value than it would be a good candidate for being modified by the sergepatcher.

How do the teams "rotate"? Season-after-season or something else? I put 4 more teams in the AI folder, a total of 19 teams. (ending with "team18") Would I have to modify the "Team15" to "Team 18" in the batch file?
The answer to your questions is that it depends on how complicated you want it to be. I only gave the code for swapping a single team with another. Regardless of what route or language you choose, you will almost always have to perform the given steps multiple times.

The simplest in terms of logic would look like this for you:
Code: (MS-DOS Batch) [Select]
@echo off

ren Team0 temp
ren Team16 Team0
ren temp Team16

ren Team1 temp
ren Team17 Team1
ren temp Team17

ren Team2 temp
ren Team18 Team2
ren temp Team18
Anything bigger should probably be made into a 'for' loop of some kind.

Batch files are good for automating a bunch of little tasks involving the file system but usually they are started up manually. There is a way of calling it through the command line via python but I would advise against it for various reasons. Personally, I wouldn't do anything too complicated in batch files since the language itself isn't very clean and it would be much easier to do the same and more in Python.

Offline Trovaner

  • *
  • Posts: 1222
  • Rep: 32
    • View Profile
    • Awards
Double post.

The batch files that Madiaba made have been uploaded to the download section. I don't think he ever officially released these though so take proper precautions before trying to add them to your game. Making backups is always important especially when dealing with programs that manipulate the file system or files that haven't been fully tested (both are the case for these).