-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simulator RNG Seed produces inconsistent teams #10162
Comments
This is a side server replay. They could have made all sorts of modifications to the code that we haven't, so comparing it to the main codebase is impossible. |
Thanks, that explains it :) |
Sorry for closing and immediately re-opening this, but I might have spoken too soon. Using the seed of player p1, we can run: This still produces completely wrong teams, and importantly the installation method still appears to influence the outcome of the seeded PRNG (installing directly from GitHub vs installing over npm). Both results are wrong, deterministic and different from each other. Thanks for the swift response btw! |
This replay is from 2019. A lot of changes have been made to the sim and randbats code in that time, which could have affected the rng here. |
Thanks, that makes sense. I checked with a more recent game and it works, but only when installing from GitHub. Seems like the RNG when installing from npm is different. Might be a stretch, but do you have any idea where this difference is coming from? |
We haven't published to NPM in a while, nor do we consistently - it's several months old code at the least (if not years). |
Is there no supported way to reproduce a game state from a replay then? I'm trying to reproduce old games based on their inputlogs, but even for quite recent games (e.g. this one from 2 months ago) the seeds don't reproduce the correct teams. In some cases they appear to do, but I'm a bit stumped about what the deciding factor here is - I'm aware that there's a |
Hey everyone, while playing around with the simulator I noticed that something about the way the simulator uses seeds to generate teams appears to be broken. Specifically, using seeds from online replays does not reproduce the correct teams.
To reproduce, I installed pokemon-showdown in a fresh environment like
git clone https://github.com/smogon/pokemon-showdown.git
cd pokemon-showdown
./pokemon-showdown generate-team gen8randombattle 52760,56463,35283,9085
After installing the dependencies, generate-team spits out the following team:
This isn't consistent with the team generated from the same seed in
https://replay.pokemonshowdown.com/azure-gen8randombattle-363056
.We can tell from the inputlog that in this case p2's seed is [52760,56463,35283,9085] as specified above, but p2 has a completely different team.
The same issue can be replicated by installing pokemon-showdown from npm:
npm install pokemon-showdown
npx pokemon-showdown generate-team gen8randombattle 52760,56463,35283,9085
This gives a completely different, but still wrong team:
In both cases the result is deterministic but wrong, so I'm thinking this might be some version-dependent issue with the PRNG.
However, in both cases
package.json
shows version"version": "0.11.9"
.Does anybody have any idea what might be up? A quick search didn't yield any results.
Thanks!
The text was updated successfully, but these errors were encountered: