The Supreme Court has dismissed an American engineer’s appeal to have artificial intelligence named as the inventor on a patent application.