Programming An Auto-Level Adjusting Random Battle Format

Introduction
I've posted about this format before, but was advised to post it here for visibility. I'm a long time Generation 1 Random Battle player, and I grew frustrated with the very rough pokemon level scaling given by the tiering system. In my ideal Random Battle format, the pokemon levels would be perfectly balanced. So, I coded up a mod to the format in which the pokemon levels adjust themselves over time based on pokemon performance. The more battles people play, the more balanced the levels become.

Where To Find It
While my ultimate desire is to have this format replace (or at least coexist with) the existing tier-based random battle formats on the main server, it is currently implemented in the RBY server, at rby.psim.us. It is called "[Gen 1] Random Battle (Auto Level Adjusted)". Any battle in this format will use the most current levels, and will contribute its result to the format's data to help improve the levels further.

How It Works
Whenever a team wins or loses a battle in the format, each pokemon in the winning team gets a win recorded, and each pokemon in the losing team gets a loss recorded. Then, if a participating pokemon's win rate is over 51%, it has a chance to lose one level, and if a participating pokemon's win rate is below 49%, it has a chance to gain one level. These probabilities of adjusting the level go down over time to prevent excessive see-sawing: we expect that as we have more data (win/loss records), we don't need or want to adjust the levels as quickly. The current levels and win/loss records can be viewed using the "/randombattleadjusted" command. Of course, since the amount of data is currently rather low (RBY is a fairly quiet server), the levels are not ideal, although they're also not complete nonsense.

Where The Code Is
You can find a description of the code for this format here. This format was originally implemented in the now-defunct Gold server, then later transferred to the RBY server. The code described in the linked pastebin is outdated since it's built on an old version of the Pokemon Showdown code, but the premise is simple and it can be easily implemented in the modern code as well. Since RBY's code is closer to Pokemon Showdown's master version than Gold was, RBY's implementation of this format is closer to what would be applicable to the main server.
 

Annika

is a Battle Simulator Administratoris a Community Leaderis a Programmer
PS Admin
This looks interesting, but I'm curious to know why you chose to automatically adjust level rather than having humans adjust the levels based on winrates?
 
This looks interesting, but I'm curious to know why you chose to automatically adjust level rather than having humans adjust the levels based on winrates?
I like the idea of having this be a set-it-and-forget-it system. Humans could just as easily adjust the winrates, but it would take repeated iteration and examination of the current win rates, thought about how much the level should be adjusted by, etc. Basically, overhead. With this system, the algorithm takes care of everything for you. You implement it once, let people play it, and things become balanced over time.

My real desire is to have perfectly balanced randbat pokemon levels. So, honestly, it's not that important to me whether it's done manually or automatically. This algorithm just saves human time and effort.
 

Users Who Are Viewing This Thread (Users: 1, Guests: 0)

Top