Most of my games I get a male because I choose male, but once I got a female Samurott. but as for rivals I think it's just your rivals gender. Gen 1+2 rival male, 3 female, and four and five both female and male. (not counting remakes, they were the same as the original(discluding w2 and b2.))