AI Foundations, Opportunities, and Risks