The laws of robotics are specifically designed for Artificial Intelligence, though.
If the robots are non-sentient, then they may be used for any purpose.
Simple in-game explanation - every Astronaut is outfitted with an RFID chip for identification purposes which may be tracked from any source within range. That RFID chip sends out a faction affiliation signal.
If an AI senses that signal, it immediately turns to face the source, checks if there\'s a path to the signal, and follows it - or, if the signal is unblocked by any form of obstacle, the AI immediately opens fire with whatever equipment it has. If the AI is set to fire upon friendlies, then it will only fire beneficial equipment. If the AI is set to fire upon enemies, then its actual weapon systems kick in.
The bots don\'t see humans, they see targets. They also don\'t see ships - again, they see targets.