Overwhelmed...? Bored...? → Join discussions group or tell us what you like and dislike by taking a → 3-minute survey.
Define initial state s0, final states F and input word in declarations.
Hint: Combine rules on left side, right side or both:
→ More help for 'FSM'...
or 'from s0 reading nothing...' as: (s0, lambda, k) => (s1, abck);
Define initial state s0, final states F, stack symbol kSymb and input word(s) in declarations.
→ More help for 'PDA'...
Define initial state s0, final states F, blank tape symbol and input word(s) in declarations.
→ More help for 'Turing'...
Grammars can have two modes (grammar tree or parse tree).
Note that the empty word is called epsilon, not lambda, in grammars.
→ More help for 'Grammar'...
Example: (((((a+b).b)*.c).d)+O)which is equivalent to: ((a+b)b)*cd
The output is automatically simplified in some basic ways. To simplify the script, click simplify (a little) .
→ More help for 'RegularExpression'...
→ More help for 'Tree234'...
→ More help for 'RedBlackTree'...
Start with linalg:. Define matrices as A = [1 2; 3 4] and column vectors as v = (1, 2), one statement per line. Use w = A * v, A^T and A^-1 for operations. Optionally mark an operator: C = A * @product B. Select operation=product; step=0; in declarations to show its initially empty result. Each step adds one scalar product to the running sum (m*n*k steps); unfilled cells remain distinct from zeros. Use step=-1 for the final result or the Animate multiplication conversion for a click-through SVG. Marker names must be unique; quote names with spaces, e.g. @"my product", and URL-encode them in declarations (operation=my+product;). For MLP training animations, define input x, target, weights and biases, then declare mlpLayers=#W1,b1,tanh;W2,b2,sigmoid#; mlpStep=0;. MLP targets accept a scalar (target=0.8) or row/column vector (e.g. target=[0.3,0.7]); they are normalized to columns internally. Animate MLP training shows a network diagram and the current calculation's matrices, one neuron per step, through forward propagation, backpropagation, one SGD update and another forward pass comparing old and new activations. Each frame explains its calculation; the loss frame compares prediction and target and explains mean squared error or cross-entropy. For a transformer self-attention animation, define token rows X and weights Wq, Wk, Wv (optionally Wo), then declare attention=#X,Wq,Wk,Wv#; attnTokens=#the,cat,sat#; attnStep=0; (attnCausal=true; masks later tokens). Animate attention steps through queries, keys, values, scaled scores, row-wise softmax weights and the weighted sum of values, with a token graph whose line thickness shows the attention weights. Conversion buttons are shown only when applicable: MLP controls need MLP declarations, multiplication controls need a marked matrix product, and Next is hidden at the final step. Use svgHeight=800; in declarations to start with a taller web output box (pixels; 0 keeps the default). This works for all diagram types; manual resizing remains available. The buttons above the drawing zoom out/in, fit it to the width, or fit the whole drawing into the box. Standalone calls such as det(A), rank(A), span(A), eigenvalues(A) and eigenvectors(A) return reusable results. DesignMatrix(x, degree) builds the polynomial-regression matrix $(1,x_i,\ldots,x_i^{degree})$ (degree 0 through 12); use showPlot=true to plot each power feature curve with the sample points. DesignMatrix(x, degree, y) also fits the least-squares polynomial to the responses y and plots it (blue) with the data points (red) and residuals. svd(A) and evd(A) display their decompositions in place. Use mean(data), variance(data) and std(data) for statistics; capitalize them for worked steps. Classification and probability use precision(tp, fp), recall(tp, fn) and bayes(prior, likelihood, evidence). binomial(n, p, k) and poisson(lambda, k) return P(X=k). Neural networks use dense(W, X, b), relu(Z), sigmoid(Z), tanh(Z), softmax(Z) and explicit backward functions. Capitalized calls teach the concepts step by step; showPlot=true also draws activation/slope curves and softmax class shares. Set showPlot=true in the declarations to draw 2D/3D objects and empirical histograms with mean and standard-deviation markers.
linalg:
A = [1 2; 3 4]
v = (1, 2)
w = A * v
A^T
A^-1
C = A * @product B
operation=product; step=0;
step=-1
@"my product"
operation=my+product;
x
target
mlpLayers=#W1,b1,tanh;W2,b2,sigmoid#; mlpStep=0;
target=0.8
target=[0.3,0.7]
X
Wq
Wk
Wv
Wo
attention=#X,Wq,Wk,Wv#; attnTokens=#the,cat,sat#; attnStep=0;
attnCausal=true;
svgHeight=800;
det(A)
rank(A)
span(A)
eigenvalues(A)
eigenvectors(A)
DesignMatrix(x, degree)
showPlot=true
DesignMatrix(x, degree, y)
y
svd(A)
evd(A)
mean(data)
variance(data)
std(data)
precision(tp, fp)
recall(tp, fn)
bayes(prior, likelihood, evidence)
binomial(n, p, k)
poisson(lambda, k)
dense(W, X, b)
relu(Z)
sigmoid(Z)
tanh(Z)
softmax(Z)
→ More help for 'LinAlg'...
Give the variable names in the beginning as a,b,c,...
→ More help for 'BDD'...
→ More help for 'Huffman'...
→ More help for 'LogicCircuit'...
→ More help for 'Numbers'...
If formulaMode=true is set in the declarations, assume being in Latex math mode, and avoid all the stuff around it.
Latex code can be generated from all Latex-based scripts by clicking the plain generator code button.
Note that, so far, only the 'dot' processor can be used.