Concise algorithms written in Julia and formatted with Carbon.
Algorithms for machine learning, optimization, reinforcement learning, online planning, decision making under uncertainty, and sorting. All implementations are working and self-contained; refer to the test cases.
Note, these are primarily for academic purposes and are not designed for real-world usage. There are many other Julia packages that implement more sound versions of these algorithms.
] add http://github.com/mossr/BeautifulAlgorithms.jl
- Gradient descent
- Stochastic gradient descent
- Two-layer neural network
- Multi-layer neural network
- Loss functions
- Distance functions
- Nearest neighbor
- K-nearest neighbors
- K-means clustering
- The EM algorithm
- Linear regression
- Ridge regression
- Basis regression
- Radial basis regression
- Logistic regression
- Cross-entropy method
- Finite difference methods
- Simulated annealing
- Twiddle
- Newton's method
- Gaussian process
- Thompson sampling
- Particle filter
- Value iteration
- Branch and bound
- Monte Carlo tree search
- Huffman coding
- Hailstone sequence (Collatz conjecture)
- Bubble sort
- Merge sort
- Insertion sort
- Bogo sort
- Quine
Note: Algorithms are modified from their original sources.
Percy Liang and Dorsa Sadigh, Artificial Intelligence: Principles and Techniques, Stanford University, 2019.
Percy Liang and Dorsa Sadigh, Artificial Intelligence: Principles and Techniques, Stanford University, 2019.
Percy Liang and Dorsa Sadigh, Artificial Intelligence: Principles and Techniques, Stanford University, 2019.
Andrew Ng, Mixtures of Gaussians and the EM algorithm, Stanford University, 2020.1
Mykel J. Kochenderfer and Tim A. Wheeler, Algorithms for Optimization, MIT Press, 2019. (Credit @HenriDeh for use of ones
)
Mykel J. Kochenderfer and Tim A. Wheeler, Algorithms for Optimization, MIT Press, 2019.
Mykel J. Kochenderfer and Tim A. Wheeler, Algorithms for Optimization, MIT Press, 2019.
Mykel J. Kochenderfer and Tim A. Wheeler, Algorithms for Optimization, MIT Press, 2019.
Mykel J. Kochenderfer and Tim A. Wheeler, Algorithms for Optimization, MIT Press, 2019.
Mykel J. Kochenderfer and Tim A. Wheeler, Algorithms for Optimization, MIT Press, 2019.
Sebatian Thrun, Artificial Intelligence for Robotics, Udacity, 2012.
John Wallis, A Treatise of Algebra both Historical and Practical, 1685.
Mykel J. Kochenderfer and Tim A. Wheeler, Algorithms for Optimization, MIT Press, 2019.
Daniel J. Russo, Benjamin Van Roy, Abbas Kazerouni, Ian Osband, and Zheng Wen, A Tutorial on Thompson Sampling, arXiv:1707.02038, 2020.
Mykel J. Kochenderfer, Tim A. Wheeler, and Kyle H. Wray, Algorithms for Decision Making, Preprint.
Mykel J. Kochenderfer, Tim A. Wheeler, and Kyle H. Wray, Algorithms for Decision Making, Preprint.
Mykel J. Kochenderfer, Tim A. Wheeler, and Kyle H. Wray, Algorithms for Decision Making, Preprint.
Mykel J. Kochenderfer, Tim A. Wheeler, and Kyle H. Wray, Algorithms for Decision Making, Preprint.
David A. Huffman, A Method for the Construction of Minimum-Redundancy Codes, IEEE, 1952.
Karey Shi, Design and Analysis of Algorithms, Stanford University, 2020.
Karey Shi, Design and Analysis of Algorithms, Stanford University, 2020.
Karey Shi, Design and Analysis of Algorithms, Stanford University, 2020.
Nathan Daly, Julia Discord, 2019.2
Written by Robert Moss.