When I said "random stuff" I meant random stuff it can actually do. So it just does whatever it can with no actual strategy behind it's actions.
Code:
Function: build stuff
If enemy=no then build_warship=no
If scoutable_territory>scouts then build_scout=yes
If colonizable_planets>colony_ships then build_colony_ship=yes
(If there are buildings in your game I guess you'd add something for them here)
(note: this would consider how many it has under construction when deciding to build more. Also I'd make scoutable_territory scale based on number of unexplored systems just to prevent the AI from trying to build one scout for each reachable unexplored star system.)(for the first version I'd make it not consider crappy planets(like tiny barren and toxic planets from MoO2) when deciding whether to build ships)
Code:
Function: move ships
If ship=warship then move_to=enemy_territory
If ship=scout then move_to=unexplored
If ship=colony_ship then move_to=colonizable
Note: for a later version you'd make it decide based on planet value and distance which to colonize/attack first, but for a start we'll just make it colonize/attack whatever it can that's in range. For attacking I'd make it consider whether it can win, at least in a later version. For Colonization I'd make it(in the later version) assign planets points based on their value(this might get modified by your tech) and subtract points based on their distance. Whichever planet has the highest value gets colonized.(note I'd add a tag to prevent it from choosing the same planet multiple times) Scouts would just move to the closest unexplored system.(again with the anti-redundancy check)
that should be enough for at least a half-baked AI.