A Framework for Cognitive Economics