Artificial Intelligence Foundations: Principles and Practice