In our daily life, we often adapt plans and behaviors according to dynamically changing world circumstances, selecting activities that make us feel more confident about the future. In this adaptation, the prefrontal cortex (PFC) is believed to have an important role, applying executive control on other cognitive processes to achieve context switching and confidence monitoring; however, many questions remain open regarding the nature of neural processes supporting executive control. The current work explores possible mechanisms of this high-order cognitive function, transferring executing control in the domain of artificial cognitive systems. In particular, we study the self-organization of artificial neural networks accomplishing a robotic rule-switching task analogous to the Wisconsin Card Sorting Test. The obtained results show that behavioral rules may be encoded in neuro-dynamic attractors, with their geometric arrangements in phase space affecting the shaping of confidence. Analysis of the emergent dynamical structures suggests possible explanations of the interactions of high-level and low-level processes in the real brain. (c) 2012 Elsevier Ltd. All rights reserved.