Bill Gates has joined a growing push for federal legislation governing artificial intelligence, warning that unchecked AI could cause catastrophic harm and that industry self-regulation is not enough.