Quote Originally Posted by Dromikaites
Does anybody know how the computer decides which unit is "skirmish infantry" and which one is "missile infantry"?
Have you tried the 'class' line in export_descr_unit? I believe that there were no units identified as 'skirmish' in vanilla, but mods (such as EB) have used it successfully in their formations. Have a look at the EB or Darthmod edu and see if any of them list the class as skirmish.

Quote Originally Posted by Dromikaites
Also I'm curious to know how the AI decideds if a cavalry unit can skirmish or not. Is skirmishing associated only with weapons that are fired or thrown or is there something else?
It appears to be for all cavalry units which have any kind of ranged attack (unless they're on an elephant it seems). It's the same for all infantry units unless they have the prec attribute.