Cognition and Decision Making in Complex Adaptive Systems