Money as a medium of exchange in an economy with artificially intelligent agents