• Stars
    star
    1,294
  • Rank 34,928 (Top 0.8 %)
  • Language
    Julia
  • Created over 3 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Concise and beautiful algorithms written in Julia

BeautifulAlgorithms.jl

Build Status codecov

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

Note: Algorithms are modified from their original sources.

Gradient descent

Percy Liang and Dorsa Sadigh, Artificial Intelligence: Principles and Techniques, Stanford University, 2019.

Stochastic gradient descent

Percy Liang and Dorsa Sadigh, Artificial Intelligence: Principles and Techniques, Stanford University, 2019.

Two-layer neural network

Two-layer neural network (one-liner)

Multi-layer neural network

Loss functions

Distance functions

Nearest neighbor

K-nearest neighbors

K-means clustering

Percy Liang and Dorsa Sadigh, Artificial Intelligence: Principles and Techniques, Stanford University, 2019.

The EM algorithm

Andrew Ng, Mixtures of Gaussians and the EM algorithm, Stanford University, 2020.1

Linear regression

Mykel J. Kochenderfer and Tim A. Wheeler, Algorithms for Optimization, MIT Press, 2019. (Credit @HenriDeh for use of ones)

Linear regression (one-liner)

Ridge regression

Basis regression

Mykel J. Kochenderfer and Tim A. Wheeler, Algorithms for Optimization, MIT Press, 2019.

Radial basis regression

Mykel J. Kochenderfer and Tim A. Wheeler, Algorithms for Optimization, MIT Press, 2019.

Logistic regression

Cross-entropy method

Mykel J. Kochenderfer and Tim A. Wheeler, Algorithms for Optimization, MIT Press, 2019.

Finite difference methods

Mykel J. Kochenderfer and Tim A. Wheeler, Algorithms for Optimization, MIT Press, 2019.

Simulated annealing

Mykel J. Kochenderfer and Tim A. Wheeler, Algorithms for Optimization, MIT Press, 2019.

Twiddle

Sebatian Thrun, Artificial Intelligence for Robotics, Udacity, 2012.

Newton's method

John Wallis, A Treatise of Algebra both Historical and Practical, 1685.

Gaussian process

Mykel J. Kochenderfer and Tim A. Wheeler, Algorithms for Optimization, MIT Press, 2019.

Gaussian process kernels

Thompson sampling

Daniel J. Russo, Benjamin Van Roy, Abbas Kazerouni, Ian Osband, and Zheng Wen, A Tutorial on Thompson Sampling, arXiv:1707.02038, 2020.

Particle filter

Mykel J. Kochenderfer, Tim A. Wheeler, and Kyle H. Wray, Algorithms for Decision Making, Preprint.

Value iteration

Mykel J. Kochenderfer, Tim A. Wheeler, and Kyle H. Wray, Algorithms for Decision Making, Preprint.

Branch and bound

Mykel J. Kochenderfer, Tim A. Wheeler, and Kyle H. Wray, Algorithms for Decision Making, Preprint.

Monte Carlo tree search

Mykel J. Kochenderfer, Tim A. Wheeler, and Kyle H. Wray, Algorithms for Decision Making, Preprint.

Huffman coding

David A. Huffman, A Method for the Construction of Minimum-Redundancy Codes, IEEE, 1952.

Hailstone sequence (Collatz conjecture)

Bubble sort

Karey Shi, Design and Analysis of Algorithms, Stanford University, 2020.

Merge sort

Karey Shi, Design and Analysis of Algorithms, Stanford University, 2020.

Insertion sort

Karey Shi, Design and Analysis of Algorithms, Stanford University, 2020.

Bogo sort

Bogo sort (one-liner)

Quine

Nathan Daly, Julia Discord, 2019.2


Written by Robert Moss.

More Repositories

1

julia-tufte-beamer

Tufte-style beamer template with Julia integration
TeX
119
star
2

Tetris.jl

One-line Tetris in Julia
Julia
54
star
3

julia-mono-listings

LaTeX listings style for Julia and Unicode support for the JuliaMono font
TeX
49
star
4

machine_learning_book

Stanford's CS229 Machine Learning lecture notes compiled into a Tufte-style textbook
TeX
43
star
5

Donut.jl

Andy Sloane's rotating donut in Julia
Julia
31
star
6

PacMan.jl

PacMan in the Julia REPL
Julia
20
star
7

TeX.jl

@tex macro for generating LaTeX PDFs from Julia code with descriptions
TeX
15
star
8

REPLMaze.jl

A maze game in the Julia REPL
Julia
13
star
9

CrossEntropyVariants.jl

Cross-entropy method variants for optimization in Julia
Julia
12
star
10

TikzNeuralNetworks.jl

Visualize neural networks using TikZ in Julia
Julia
11
star
11

PlutoNotebooks

Random Pluto notebooks in Julia
HTML
6
star
12

Snake.jl

The game of snake in the Julia REPL
Julia
5
star
13

GoogleScholar.jl

A light-weight Julia package to read and plot Google Scholar citation information
Julia
4
star
14

mscs-stanford-thesis

(Stanford MSCS Thesis) Algorithms for efficient validation of black-box systems
TeX
4
star
15

PropositionalLogic.jl

Simple propositional logic in Julia
Julia
3
star
16

MBTA

Mapped MBTA in D3.js
JavaScript
1
star
17

TrashMDP.jl

Automated trash collection using Markov decision processes
Julia
1
star
18

AddPackage.jl

Julia macro to add missing packages when calling `using Package`
Julia
1
star
19

GaussianDiscriminantAnalysis.jl

Gaussian discriminant analysis in Julia
Julia
1
star
20

CARS-tutorial

Tutorial on decision making under uncertainty (MDPs and POMDPs)
HTML
1
star
21

TestingDeps.jl

Testing unregistered dependencies in Julia
Julia
1
star
22

Optionals.jl

Light-weight Optional{T} type in Julia
Julia
1
star
23

SI.jl

Julia SI unit types for validated unit conversions.
Julia
1
star