Foundations of Modern AI