AI & ML Algorithm Calculator with Step-by-Step Math
Learn the theory, plug in your data, and watch the full manual calculation exactly how your exam expects it.
Built by a student, for students.
Alpha-Beta Pruning
Alpha-Beta Pruning speeds up Minimax by skipping irrelevant branches, finding the exact same optimal move much faster.
Minimax Algorithm
Minimax finds the optimal move in a two-player game by assuming both players always play perfectly.
A* Search Algorithm
A* finds the shortest path by combining actual travel cost with a heuristic estimate of remaining distance.
Uniform Cost Search (Dijkstra's Algorithm)
Uniform Cost Search guarantees the shortest path by always expanding the cheapest accumulated route first.
Greedy Best-First Search
Greedy Best-First Search races toward the goal using only a heuristic estimate, completely ignoring actual path cost. Fast but not optimal.
Evaluation Metrics (Confusion Matrix)
A confusion matrix reveals exactly how a classifier fails, breaking down true positives, false positives, and false negatives precisely.
K-Nearest Neighbors (KNN)
KNN classifies new data points by finding the K nearest examples and taking a majority vote among them.
Decision Tree (ID3)
Interrogate the data to find its most important features, then recursively carve out a human-readable flowchart of rules and predictions.
Random Forest Classifier
Cure single-tree overfitting by training an army of randomized trees, then use majority voting to cancel out noise and stabilize predictions.
K-Means Clustering
An unsupervised algorithm that groups unlabeled data into distinct clusters by iteratively updating each centroid's position.
Naive Bayes Classifier
Classify data using Bayes' Theorem by assuming every feature independently contributes to the outcome — a powerful, beautifully naive shortcut.
Apriori Algorithm
Apriori scans transactional data to discover hidden patterns and frequently purchased item combinations, revealing buying habits.
Genetic Algorithm (One-Max)
Evolve a population of candidate solutions through selection, crossover, and mutation, gradually breeding them toward the perfect target string.
Genetic Algorithm (Knapsack)
Evolve item combinations through selection, crossover, and mutation to find the most profitable mix without exceeding a strict weight limit.
K-Nearest Neighbors (KNN) Regression
KNN Regression predicts numerical values by finding the K nearest data points and averaging their target values.
Linear Regression
Linear Regression predicts continuous numerical values by fitting a straight line that best summarizes the relationship between variables.
Multiple Linear Regression
Upgrade from one input to many. Fit a multi-dimensional hyperplane and isolate every variable's exact impact on your prediction.
Breadth-First Search (BFS)
Breadth-First Search explores a graph level by level, guaranteeing the shortest path when all edges cost the same.
Depth-First Search (DFS)
DFS dives down one path completely before backtracking, making it memory-efficient but unable to guarantee the shortest path.