RL vs DP Algorithms in C++: Differences with Examples
Dynamic programming needs a known model, while reinforcement learning learns from interaction. See both in modern C++ with value iteration and Q-learning.
Spread Your Knowledge. Questions with answers, tutorials and articles, newest first.
Dynamic programming needs a known model, while reinforcement learning learns from interaction. See both in modern C++ with value iteration and Q-learning.
Dynamic programming caches overlapping subproblems to avoid repeated work. See memoization and tabulation in modern C++ with coin change, knapsack and edit distance.
A reinforcement learning algorithm learns by rewards. This guide explains Q-learning and gives a complete C++20 agent you can compile and run.
Active learning lets a model pick the examples a human should label next. This guide explains uncertainty sampling and shows a complete C++20 implementation.
Semi-supervised learning combines a few labels with many unlabeled examples. This guide implements confidence-based self-training in modern C++ and compares alternatives.
Supervised learning predicts from labeled data, unsupervised learning finds structure in unlabeled data. Includes tested C++20 k-NN and k-means code.
Unsupervised learning finds patterns in unlabelled data. This guide implements k-means clustering in C++20 with a runnable class, expected output and tuning advice.
A supervised learning algorithm learns from labelled data. See how to implement logistic regression and k-NN in modern C++ with tested code.
Classic RL stores values in a table; deep RL approximates them with a neural network. See both approaches in C++ with working code and when to pick each.
Implement reinforcement learning in modern C++ with a Q-learning agent class, std::array, the random header and a complete, runnable corridor example.
Implement Q-learning in C++20 and see how a deep Q-network with replay and a target network is trained using LibTorch, with tested and annotated code.
An RNN is the model and backpropagation is how it learns. See how backpropagation through time works, with a complete C++20 example you can run.
Backpropagation trains neural networks by propagating the loss gradient backward. This guide explains it and gives a complete C++20 XOR implementation.
Build a compile-time sized RNN in C++20 that predicts a sine wave using std::array, truncated BPTT and gradient clipping.
A self-organizing map groups unlabeled data on a grid, while a feedforward network learns labeled mappings by backpropagation. Compared with modern C++ examples.
A feedforward neural network passes data one way through layers. Build one in modern C++ with a Layer class and backpropagation, and train it on XOR.
Learn how a self-organizing feature map works and implement it in C++20 with std::array, std::vector and std::mt19937, with tuning advice.
A Hopfield network is a recurrent associative memory, while a CPN combines Kohonen and Grossberg layers. See both as runnable C++20 classes.
A counterpropagation network pairs a Kohonen clustering layer with a Grossberg output layer. This guide explains the algorithm and implements it in C++20.
Implement a Hopfield neural network in C++20 as an associative memory that stores three letters and recalls a damaged T, with limits and pitfalls explained.