Well, that's a good question. As the creator of the game (and all programmer of all the existing AI types), I just go on my own memory of them, so I'm not the best to answer this in some senses. But what I can tell you is that, even with my deep knowledge of the internals of all the AIs, I'm not always 100% positive which one I'm facing until pretty far into the game sometimes.
Generally speaking, when I play against randoms (which I pretty much always do), I look for the following, in order of ease of identification:
1. Are there any particular ships or structures in unusual abundance?
2. Is there any markedly unusual behavior going on?
3. Does the AI seem more defensively or offensively oriented?
About half of the AIs are easy to identify simply from #1, above. You see counter spies or attrition emitters on a ton of planets, you know you're up against a counter spy or an attritioner. If you see active golems, you know it's a golemite. Tons of starships but little else, you know it's a starship captain. And so on.
If there's nothing obvious to that degree, then it's a matter of noticing slightly more subtle behavior. Do the ships all gang-rush you at once when you go to various AI planets? Then that's a tag teamer. Seeing tons of parasites, and tons of parasite waves in particular? Leech. Lots of bomber waves? Probably a mad bomber, unless it's just chance. Takes a while to be sure, with something like that. If you never see waves from one of the AIs, you know you've got some sort of turtle.
Same sort of thing: if you've got a single planet just getting pounded, then it might be a sledge hammer. Single player getting picked on a lot in multiplayer, it might be a bully or an assassin (those are about impossible to identify in solo).
Beyond that, if you still can't tell for some reason, then it's probably one of the maybe 20% that are more like riffs off the basics. It might be one of the raiders or the tank or the entrenched homeworlder, or something like the sledge or assassin/bully if you're playing solo. Those can be hard to tell apart from one another, because most of their characteristics are subtle in the macro scheme and involve tendencies and strategies they might use against you over time. Given the high degree of fuzziness to all AI decisions, with those sorts of types of AI it can be very hard to figure out which one is which simply by virtue of that fuzzy-factor obscuring those tendencies when you look at just activities over a relatively short period of time.
Past a certain point, you'll have a sense for the AI in general in your campaign, and that's the most important thing, moreso than figuring out specifically which AIs you have. At the end of the game, win or lose, it'll reveal what the AIs were in case you want to play again, and -- as with a game like Clue or similar -- you get to find out if your guesses based on the available clues were correct or not.