Learning Algorithms for Intelligent Agents and Mechanisms