Gen 2 Improving Gen 2 Random Battles on PS!

Status
Not open for further replies.
As you probably know, I've been working on improving the movesets of Gen 1 Random Battles not very long ago, and the changes finally went through last week. Now it's time to move on to Gen 2, which is in an even worse state! Even though this tier is not in the ladder, tournaments are played in the RoA room relatively often. And it's really fun! The ultimate goal would be to make Gen 2 randbats good enough to make it to the ladder.

However, Gen 2 requires more work than Gen 1 given that movepools are wider and that there are more strategies. Simply throwing a bunch of viable moves into the fix and picking four an random doesn't work, and you'd have to go crazy if you want to cover everything with Pokemon-independent move restrictions. Instead, my approach is to cover everything within the Pokemon and its movesets.

Here's an example of my proposed structure:

Code:
    zapdos: {
        randomSet1: {
            chance: 8,
            item: ["leftovers"],
            baseMove1: "rest", baseMove2: "sleeptalk",
            fillerMoves1: ["thunderbolt", "thunderbolt", "thunder"],
            fillerMoves2: ["hiddenpowerice", "hiddenpowerice", "hiddenpowerice", "drillpeck", "drillpeck", "hiddenpowergrass", "hiddenpowerwater"],
        },
        randomSet2: {
            chance: 13,
            item: ["leftovers", "leftovers", "mintberry"],
            baseMove1: "thunderbolt", baseMove2: "rest",
            fillerMoves1: ["thunderwave", "thunderwave", "toxic", "drillpeck", "hiddenpowerice", "hiddenpowerice"],
            fillerMoves2: ["lightscreen", "reflect", "reflect", "whirlwind", "drillpeck", "hiddenpowerice", "hiddenpowerice"],
        },
        randomSet3: {
            chance: 16,
            item: ["leftovers", "leftovers", "miracleberry"],
            baseMove1: "thunderbolt", baseMove2: "drillpeck",
            fillerMoves1: ["hiddenpowerice", "hiddenpowerice", "hiddenpowerwater", "hiddenpowerwater", "hiddenpowergrass"],
            fillerMoves2: ["thunderwave", "thunderwave", "thunderwave", "toxic", "lightscreen", "reflect", "thunder", "rest"],
        },   
        eventPokemon: [
            {"generation": 2, "level": 50, "shiny": true, "moves":["thunderwave", "agility", "detect", "drillpeck"]},
        ],
        tier: "OU",
    },

Or displayed in a format that you're probably more familiar with:

Code:
Zapdos @ Leftovers | 8/16 chance
- Rest
- Sleep Talk
- Thunderbolt / Thunderbolt / Thunder
- Hidden Power Ice / Hidden Power Ice / Hidden Power Ice / Drill Peck / Drill Peck / Hidden Power Grass / Hidden Power Water

Zapdos @ Leftovers / Leftovers / Mint Berry | 5/16 chance
- Thunderbolt
- Rest
- Thunder Wave / Thunder Wave / Toxic / Drill Peck / Hidden Power Ice / Hidden Power Ice
- Light Screen / Reflect / Reflect / Whirlwind / Drill Peck / Hidden Power Ice / Hidden Power Ice

Zapdos @ Leftovers / Leftovers / Miracle Berry | 3/16 chance
- Thunderbolt
- Drill Peck
- Hidden Power Ice / Hidden Power Ice / Hidden Power Water / Hidden Power Water / Hidden Power Grass
- Thunder Wave / Thunder Wave / Thunder Wave / Toxic / Light Screen / Reflect / Thunder / Rest

The set is picked at random, according to its chance out of 16 (a maximum of 4 sets are supported). This is great to provide good variety and unpredictability on Pokemon that can successfully utilize different kind of sets, weighing each set according to its overall utility.

Each set is made of 1 item, 0 to 4 base moves (up to baseMove4), and 0 to 4 lists of filler moves (up to fillerMoves4), always making a total of 4 moves. Base moves always make the set while one move of each filler move list is picked at random. The odds of each filler move or item can be adjusted by adding it more than once to the list. The engine takes care of making sure that no move is repeated and that no more than one hidden power is picked.

Obviously, this is a lot of work and I'm not willing to do it all by myself. That's why I'm bringing it up in the community. If you are familiar with GSC and want to contribute, you can fork and send pull requests to my forked Pokemon Showdown repository. This is file that you'd be modifying. All Pokemon (except Zapdos) have been given default data for now, that is there only to be replaced. Right now, Gen 2 Random Battles only includes fully evolved Pokemon, so we can focus on those first.

If you'd like to contribute but are not comfortable working on Github, feel free to suggest another way of contributing (e.g. Pastebin). I'd appreciate if you could submit the sets in the definitive format, or at least in the usual "export team" format shown below, so that all the sets are in the same format and can be converted all at once. In any case, don't worry too much about typos since I can take care of them eventually.

If you want to work on some specific Pokemon, make sure to reserve them in this thread so that someone else doesn't do the same work.

Keep in mind that this is not your typical OU metagame. Here, all Pokemon have similar chances to show up, and their levels are adjusted to tier they belong to or to their strength. For example, moves like Roar or Rapid Spin are not as useful or necessary, well-rounded defensive cores won't be a thing, Rest may not be as reliable, and coverage options that are usually considered inferior may be more useful here.
 
Last edited:
Why is the JSON designed so that the moves have to be repeatedly added in manually to adjust their probabilities? I would imagine it would be easier to create a double array paired with the filler moves where the probability for the first item in the double array matches with the first item in the filler moves, etc. You can make sure the probability for the double array always sums to 1 to ensure the entered in probabilities are valid.

This way you only have to enter in two entries (a number and string) for every move, as opposed to having to enter multiple long strings like "thunder wave" three or more times like in fillerMoves2 field for zapdos. It also allows you to manage the probabilities for each move more precisely. With the current design, I can see how it is annoying when adding new moves to have to constantly compare the amount of newly entered elements to the new length of the array for understanding the new probability for each move.
 
I never really considered that, but that's because I've been confortable with this design, I guess. I actually like it this way visually, and with autocomplete it's not a big deal. Also, even if it's not significant, it's more trivial to get a random move from a single array. If the devs want I can change the design in the end but for now I'm comfortable working with the current one to be honest. Also, most movesets are probably not going to be as complex as Zapdos and the majority of filler moves will only show up once in their corresponding arrays.
 
The set is picked at random, according to its chance out of 16 (a maximum of 4 sets are supported). This is great to provide good variety and unpredictability on Pokemon that can successfully utilize different kind of sets, weighing each set according to its overall utility.

Is 4 sets actually the limit? Looking through the code there are some pokemon with 5 sets (Venusaur, Pidgeot), is that a mistake? There are sets with the same index as well (Raticate has RandomSet3 twice, though each set3 is different)

Also, what happens if someone introduces an invalid set? (ie let's say someone introduces Pidgeot with Earthquake) I would assume the engine takes care of not showing invalid moves on the actual battle, but does it reroll the move picked (in case it's a filler move) or does it just leave the moveslot empty?
 
I set the limit myself. I don't think I'll ever need more than five sets though.

The Raticate thing was a typo and there were others too. I really should come up with something temporary to catch them rather than reviewing the data over and over.

Right now it doesn't. It will only leave the moveslot empty if the move doesn't exist or is empty. I'm confident I'll be careful enough to only add compatible moves so further checks won't be necessary.
 
Working on movesets around 2-4 per day, but in the meantime I'd like to share some overall team restrictions/filters that I've implemented or I plan to. Keep in mind that only fully-evolved Pokemon are in. A random Pokemon is pulled out of the 140-pokemon poll and goes through the following filters to encourage variety and ensure a well-rounded team:

#Pokemon filters
- 1 Uber at most
- Not more than 2 Pokemon of the same tier (OU/BL/UU/NU)
- The same type not more than twice
- 1/3 chance to discard single-type Pokemon if that type already exists in the team
- 2/3 chance to discard double-type Pokemon if both types already exist in the team
- Not more than 2 Pokemon weak to the same type

# Move filters
- The following moves not more than once: Reflect, Light Screen, Rapid Spin, Spikes, Belly Drum, Haze, Heal Bell, phazing move (Roar/Whirlwind)
- The following moves not more than twice: Sleep Talk, sleeping move
- All the above moves except Belly Drum and Haze are slightly encouraged (compared to their overall presence in the movesets) to exist at least once in the team

# Moveset filters (these are not done yet but would be intended to speed up the pace of the tier and prevent unnecessary grindfests)
- At least one physical-based attacker
- At least one special-based attacker
- At least three attackers in total
* A physical-based attacker has at least two physical damaging moves and either a third damaging move or a setup move
* A special-based attacker has at least two special damaging moves and either a third damaging move or a setup move
* Anything else with at least three damaging and/or setup moves qualifies as an attacker

In any case a full team of six Pokemon is guaranteed in case there are no more Pokemon left to keep discarding. This should be unnecessary with 140 Pokemon in though (and if I notice that this failsafe is forced to tick, I can just cut down some of the filters).

Feel free to let me know what you think.
 
The restriction on no more than 2 pokemon weak to the same type seems excessively limiting (i.e. no lax+ttar+magneton teams), would recommend changing to 3
I may consider that, by adding another requirement that in order to allow a third Pokemon weak to the same type there must be at least one (or two?) Pokemon resistant or immune to that type. It can get quite bad otherwise. Keep in mind that the kind of core you have in mind (fat normal + rock + steel) is already extremely rare given all the Pokemon around (there arearound 10 fully evolved rocks and 5 fully evolved steels out of 140 Pokemon). I don't think familiar OU cores should be encouraged just because we're used to them, and instead give all Pokemon pretty much the same chances of showing up (tier-based level balance should take care of making sure that the least useful pokemon are balanced).
 
The core I provided was just an example. Your heuristic also prevents teams from running things like Scizor+Articuno+Vileplume because they share a fire weakness despite that weakness not likely being excessively damaging to the user.

Or Raichu / Tentacruel / Magmar

Or Donphan / Pidgeot / Meganium

etcetera
 
As you probably know, I've been working on improving the movesets of Gen 1 Random Battles not very long ago, and the changes finally went through last week. Now it's time to move on to Gen 2, which is in an even worse state! Even though this tier is not in the ladder, tournaments are played in the RoA room relatively often. And it's really fun! The ultimate goal would be to make Gen 2 randbats good enough to make it to the ladder.

However, Gen 2 requires more work than Gen 1 given that movepools are wider and that there are more strategies. Simply throwing a bunch of viable moves into the fix and picking four an random doesn't work, and you'd have to go crazy if you want to cover everything with Pokemon-independent move restrictions. Instead, my approach is to cover everything within the Pokemon and its movesets.

Here's an example of my proposed structure:

Code:
    zapdos: {
        randomSet1: {
            chance: 8,
            item: ["leftovers"],
            baseMove1: "rest", baseMove2: "sleeptalk",
            fillerMoves1: ["thunderbolt", "thunderbolt", "thunder"],
            fillerMoves2: ["hiddenpowerice", "hiddenpowerice", "hiddenpowerice", "drillpeck", "drillpeck", "hiddenpowergrass", "hiddenpowerwater"],
        },
        randomSet2: {
            chance: 13,
            item: ["leftovers", "leftovers", "mintberry"],
            baseMove1: "thunderbolt", baseMove2: "rest",
            fillerMoves1: ["thunderwave", "thunderwave", "toxic", "drillpeck", "hiddenpowerice", "hiddenpowerice"],
            fillerMoves2: ["lightscreen", "reflect", "reflect", "whirlwind", "drillpeck", "hiddenpowerice", "hiddenpowerice"],
        },
        randomSet3: {
            chance: 16,
            item: ["leftovers", "leftovers", "miracleberry"],
            baseMove1: "thunderbolt", baseMove2: "drillpeck",
            fillerMoves1: ["hiddenpowerice", "hiddenpowerice", "hiddenpowerwater", "hiddenpowerwater", "hiddenpowergrass"],
            fillerMoves2: ["thunderwave", "thunderwave", "thunderwave", "toxic", "lightscreen", "reflect", "thunder", "rest"],
        },  
        eventPokemon: [
            {"generation": 2, "level": 50, "shiny": true, "moves":["thunderwave", "agility", "detect", "drillpeck"]},
        ],
        tier: "OU",
    },

Or displayed in a format that you're probably more familiar with:

Code:
Zapdos @ Leftovers | 8/16 chance
- Rest
- Sleep Talk
- Thunderbolt / Thunderbolt / Thunder
- Hidden Power Ice / Hidden Power Ice / Hidden Power Ice / Drill Peck / Drill Peck / Hidden Power Grass / Hidden Power Water

Zapdos @ Leftovers / Leftovers / Mint Berry | 5/16 chance
- Thunderbolt
- Rest
- Thunder Wave / Thunder Wave / Toxic / Drill Peck / Hidden Power Ice / Hidden Power Ice
- Light Screen / Reflect / Reflect / Whirlwind / Drill Peck / Hidden Power Ice / Hidden Power Ice

Zapdos @ Leftovers / Leftovers / Miracle Berry | 3/16 chance
- Thunderbolt
- Drill Peck
- Hidden Power Ice / Hidden Power Ice / Hidden Power Water / Hidden Power Water / Hidden Power Grass
- Thunder Wave / Thunder Wave / Thunder Wave / Toxic / Light Screen / Reflect / Thunder / Rest

The set is picked at random, according to its chance out of 16 (a maximum of 4 sets are supported). This is great to provide good variety and unpredictability on Pokemon that can successfully utilize different kind of sets, weighing each set according to its overall utility.

Each set is made of 1 item, 0 to 4 base moves (up to baseMove4), and 0 to 4 lists of filler moves (up to fillerMoves4), always making a total of 4 moves. Base moves always make the set while one move of each filler move list is picked at random. The odds of each filler move or item can be adjusted by adding it more than once to the list. The engine takes care of making sure that no move is repeated and that no more than one hidden power is picked.

Obviously, this is a lot of work and I'm not willing to do it all by myself. That's why I'm bringing it up in the community. If you are familiar with GSC and want to contribute, you can fork and send pull requests to my forked Pokemon Showdown repository. This is file that you'd be modifying. All Pokemon (except Zapdos) have been given default data for now, that is there only to be replaced. Right now, Gen 2 Random Battles only includes fully evolved Pokemon, so we can focus on those first.

If you'd like to contribute but are not comfortable working on Github, feel free to suggest another way of contributing (e.g. Pastebin). I'd appreciate if you could submit the sets in the definitive format, or at least in the usual "export team" format shown below, so that all the sets are in the same format and can be converted all at once. In any case, don't worry too much about typos since I can take care of them eventually.

If you want to work on some specific Pokemon, make sure to reserve them in this thread so that someone else doesn't do the same work.

Keep in mind that this is not your typical OU metagame. Here, all Pokemon have similar chances to show up, and their levels are adjusted to tier they belong to or to their strength. For example, moves like Roar or Rapid Spin are not as useful or necessary, well-rounded defensive cores won't be a thing, Rest may not be as reliable, and coverage options that are usually considered inferior may be more useful here.

Hey! I would love to help with this! (I dunno if Gen 1 are implemented by now, because a few movesets were felt a little bit weird for me)

Should I post my proposals in here for you to review them?
 
Hey! I would love to help with this! (I dunno if Gen 1 are implemented by now, because a few movesets were felt a little bit weird for me)

Should I post my proposals in here for you to review them?

I actually updated gen 1 randbats around a month ago, even if not as hardcore as I'm doing with gsc.

If you have a github account let me know so I can give you access to the repo, otherwise feel free to vm any movesets! Done up to gengar so far.
 
Whats the example of too nonrandom to avoid? Not trying to be a contentious asshole with a rhetorical question here, just poking for a little more directed feedback.
 
I added a new rule where rather that the weakness limit being 2, it's the weakness/resistance balance what is limited to 2 instead. You can get 3 pokemon weak to the same type provided you have another that resists or is immune to it. Still, never more than 3 pokemon weak to the same type.
I'm also working on the movesets little by little, and Rennyjesus is also helping me over.
 
I added a new rule where rather that the weakness limit being 2, it's the weakness/resistance balance what is limited to 2 instead. You can get 3 pokemon weak to the same type provided you have another that resists or is immune to it. Still, never more than 3 pokemon weak to the same type.
I'm also working on the movesets little by little, and Rennyjesus is also helping me over.

I totally agree with that, and while it might feel a little bit "random restricting" it also makes it a little bit more fair, cuz I really hate sometimes new gens random for giving me almost monotype teams against teams with two or three pokes to abuse those weaknesses...

By the way! I'm gonna make a, few more sets later! And thanks for let me help u! :3

P.D.: is someone going to offer him/herself for gen 3 randoms? I WOULD LOVE TO DO IT, but I would need a few lessons on PS coding...
 
Not sure if this is the place for ineffective sets, but I got a Jumpluff with no damaging attacks (Stun Spore, Sleep Powder, Synthesis, Reflect). I know Jumpluff is a utility mon, but that ended up costing me the match when I couldn't deal any more damage. Probably should guarantee that a move like Giga Drain or a Hidden Power is in the moveset
 
Not sure if this is the place for ineffective sets, but I got a Jumpluff with no damaging attacks (Stun Spore, Sleep Powder, Synthesis, Reflect). I know Jumpluff is a utility mon, but that ended up costing me the match when I couldn't deal any more damage. Probably should guarantee that a move like Giga Drain or a Hidden Power is in the moveset

I disagree with the fact that Jumpluff should always have damaing moves, since most of the times you'd barely do 10% through leftovers. That said, I could see how at least either Toxic or Leech Seed should be ensured, which would be a better source of damage than Giga/hpfly for Jumpluff most of the time.

On an unrelated note, I'm just noticing that I genuinely forgot to add Surf as the main 4th move in Guagsire's resttalk set. I'll hold that off in case something else pops up, but from the tests and games I've had so far I have not noticed anything else.
 
I've always been of the mind to always stick a damaging move on everything. I've deviated from that principle maybe once or twice before myself, but it sucks ass especially in GSC when you give your opponent an opening to, say, switch in their 5% Snorlax and get a Rest off. In later gens, it becomes more important so you have something to do through Taunt and to finish mons off after excessive but not lethal chip damage. Of course there you have more options for damaging support moves, like Knock Off or Snarl.

In the case of Jumpluff, well I dunno who the hell uses a Jumpluff set without Leech Seed anyway but I like keeping a Flying move on it to shoo away fellow Grassers who would come in to absorb LS, and Jumpluff is also a lot faster than a typical supportmon so it's not bad at revenge killing stuff at low HP either.
 
hoo lordy the sets may be better but the balancing still has a ways to go. Why are all the levels so low? All the stally OU pokes like Umbreon are tanking everything to hell and back with their levels at like 68 and "cruddy" things like Persian at a measly 78.
 
hoo lordy the sets may be better but the balancing still has a ways to go. Why are all the levels so low? All the stally OU pokes like Umbreon are tanking everything to hell and back with their levels at like 68 and "cruddy" things like Persian at a measly 78.

Levels are tier based. All OU's are at level 68 while all NU's are at level 78. Typical NU Pokemon don't peak at level 100 in order to fit the weaker Unown and possibly NFEs in the future, just like in RBY. Do you really think the gap between top and bottom tiers should be bigger? I don't think it would contribute towards making the tier faster since you have tanky and attacking Pokemon in all tiers. As far as I'm aware, the lower tier normals are some of the biggest threats but in the bigger picture the tier is probably just hugely impacted by the matchup. You could go and blatantly lower the levels of defensive mons but it's the kind of thing that would most likely be rejected for obvious reasons. What would make the tier somewhat faster paced would be introducing higher leveled NFEs but I'm not going to be doing that anytime soon.
 
I'd like to suggest increasing chances of having a roar/whirlwind user in the team (or maybe even guaranteeing it). Curse users are all over the place (most notably snorlax, kangaskhan, tauros, ursaring), quite a lot of baton passers with agility/swords dance, not to mention a perish song user will also appear once in a while...

Apart from standard mons who have it, mostly from OU (zapdos, skarmory, raikou, steelix, suicune) I think some of the more bulky flying types with lowish attack could have it. Namely pidgeot and noctowl.
 
Levels are tier based. All OU's are at level 68 while all NU's are at level 78. Typical NU Pokemon don't peak at level 100 in order to fit the weaker Unown and possibly NFEs in the future, just like in RBY. Do you really think the gap between top and bottom tiers should be bigger? I don't think it would contribute towards making the tier faster since you have tanky and attacking Pokemon in all tiers. As far as I'm aware, the lower tier normals are some of the biggest threats but in the bigger picture the tier is probably just hugely impacted by the matchup. You could go and blatantly lower the levels of defensive mons but it's the kind of thing that would most likely be rejected for obvious reasons. What would make the tier somewhat faster paced would be introducing higher leveled NFEs but I'm not going to be doing that anytime soon.

I was wondering what the reasons are keeping NFEs from being added to the tier any time soon. The current level balancing doesn't really make a lot of sense without them, as you point out yourself. In turn, I think they would add a lot to the game. In other generations of randbats that I've played, NFEs bring nothing but benefits. Not only are they absolutely adorable, but they tend to add a lot of fun high risk high reward plays and in general make the gameplay a little faster. For example, a Caterpie is never going to live very long, but with level balance it outspeeds a lot of stuff for low hp revenge kills or string shot. At the least, you can sack it to give somebody else on your team a free switch in. For this specific tier, it really would help a lot to have a bunch of non-tanky mons available.

The main disadvantage of NFEs is that they make team matchups more imbalanced, but I think that's somewhat desirable in randbats. Each team is basically a poker hand, and even if your hand loses 100% to the opponent's, you can still finesse a win with good bluffing. And while sometimes that means totally unwinnable battles, a good player can still win the vast majority of the time.

Basically, my point is that adding NFEs would add a lot here. I'm guessing the main issue might be one of resources? I'd be glad to help if you need any volunteers. I only play randbats, but I've played a ton of them.
 
I was wondering what the reasons are keeping NFEs from being added to the tier any time soon. The current level balancing doesn't really make a lot of sense without them, as you point out yourself. In turn, I think they would add a lot to the game. In other generations of randbats that I've played, NFEs bring nothing but benefits. Not only are they absolutely adorable, but they tend to add a lot of fun high risk high reward plays and in general make the gameplay a little faster. For example, a Caterpie is never going to live very long, but with level balance it outspeeds a lot of stuff for low hp revenge kills or string shot. At the least, you can sack it to give somebody else on your team a free switch in. For this specific tier, it really would help a lot to have a bunch of non-tanky mons available.

The main disadvantage of NFEs is that they make team matchups more imbalanced, but I think that's somewhat desirable in randbats. Each team is basically a poker hand, and even if your hand loses 100% to the opponent's, you can still finesse a win with good bluffing. And while sometimes that means totally unwinnable battles, a good player can still win the vast majority of the time.

Basically, my point is that adding NFEs would add a lot here. I'm guessing the main issue might be one of resources? I'd be glad to help if you need any volunteers. I only play randbats, but I've played a ton of them.

As you are suggesting, the main reason keeping NFEs from being added to GSC randbats is lack of people interested on working on it. I spent a lot of time polishing the movesets of FEs, and I just don't have the time or motivation to go through it for NFEs too. I do agree that the inclusion of NFEs will go well to improve the pace of the tier, but right now I don't think there's many people who care about playing GSC randbats let alone improving it. If you want, feel free to go for it and start working on those NFEs; it may not be worth it considering the playerbase though.

https://github.com/Zarel/Pokemon-Showdown/blob/master/mods/gen2/formats-data.js
 
Status
Not open for further replies.
Back
Top