A British man has become the first patient in the world to undergo brain surgery guided live by artificial intelligence, in an operation that saved his sight.