Demons versus heuristics in artificial intelligence, behavioral ecology, and economics