Introduction to Algorithms and Machine Learning: Preamble

This book was written to support Eurisko, an advanced math and computer science elective course sequence within the Math Academy program at Pasadena High School. During its operation from 2020 to 2023, Eurisko was one of the most advanced high school math/CS sequences in the country.

Eurisko’s courses were presented at a level of intensity comparable to those offered at elite technical universities. This was possible because students had already learned a large amount of college-level math through Math Academy including multivariable calculus, linear algebra, and differential equations. Furthermore, students wrote all their code from scratch before they were allowed to import external libraries.

The first Eurisko course was inspired by MIT’s Introduction to Computer Science and went far beyond it. In addition to implementing canonical data structures and algorithms (sorting, searching, graph traversals), students wrote their own machine learning algorithms from scratch (polynomial and logistic regression, k-nearest neighbors, k-means clustering, parameter fitting via gradient descent).

In subsequent courses, students implemented more advanced machine learning algorithms such as decision trees and neural networks. They also reproduced academic research papers in artificial intelligence leading up to Blondie24, an AI computer program that taught itself to play checkers. At the same time, they worked together to implement Space Empires, an extremely complex board game that pushed their large-scale project skills (object-oriented design, version control, etc) to the limit.

This book would not have been written if the Eurisko program had not existed, and Eurisko would not have been possible without the collaboration of Jason Roberts, founder of Math Academy. In addition to getting Eurisko classes on the official school schedule and recruiting students to take them, Jason offered suggestions that expanded the breadth of the curriculum, such as reproducing Blondie24 and implementing Space Empires.

Eurisko was also fortunate to receive funding through a partnership with App Academy, another program at Pasadena High School.

Last but certainly not least, a sincere thank you to Sanjana Kulkarni for her thoughtful suggestions and diligent proofreading of this book.