Algorithms, Agents and Artificial Intelligence