How one scientist coped when AI beat him at his life’s work