Essays in the economics of artificial intelligence