>>36061522It used to be based on its personality number, which was what gen 3 games used to generate all the random traits in a pokemon like nature, ability, gender and so forth.
Nowadays, pretty much everything has its own RNG, including Wurmple's evo, so the personality value pretty much doesn't do anything anymore.
In either case, it's a completely invisible number so Wurmple's evo is entirely random.