This graph brought to you by the question of if Nintendo could do anything other than fire/grass/water starters. Answer: Yes. There is at least one other cycle in that graph: fighting beats dark beats psychic beats fighting. There are probably others, but I'd have to spend more time looking at it.
Also, yeah. When it came to writing the code for this, the hardest part was coding in the adjacency matrix for the graph. Otherwise, it was so easy that the code actually compiled worked right the first time! How often does that happen?! If I wanted to improve the duplicate avoidance, it'd probably be pretty tricky, but why bother? The code did what I needed it to!
@auravulpes Hmm. If you count flying as "beating" ground (it doesn't, but it's immune to it) then you could have flying > ground > electric > flying.
@auravulpes Also, poison > grass > ground > poison!
Or, I guess I could probably use code to do it for me. But that's a thing for later.