Intelligent and Optimal Systems