Democracy from the Perspective of AI