:orphan: .. _examples: Examples ======== This section provides examples of how to build different learning-based MPC agents via :mod:`mpcrl`. .. raw:: html
.. thumbnail-parent-div-open .. thumbnail-parent-div-close .. raw:: html
Gradient-based off-policy learning agents ----------------------------------------- The following example showcases how to use gradient-based Reinforcement Learning techniques (in particular, Q-learning) to train a Model Predictive Controller (MPC) scheme for a simple task in an off-policy way. .. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /auto_examples/gradient-based-offpolicy/images/thumb/sphx_glr_q_learning_offpolicy_thumb.png :alt: :ref:`sphx_glr_auto_examples_gradient-based-offpolicy_q_learning_offpolicy.py` .. raw:: html
Off-policy Q-learning
.. thumbnail-parent-div-close .. raw:: html
Gradient-based on-policy learning agents ---------------------------------------- The following examples showcase how to use gradient-based Reinforcement Learning techniques (in particular, Q-learning and Deterministic Policy Gradient) to train a Model Predictive Controller (MPC) scheme for a simple task in an on-policy fashion. .. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /auto_examples/gradient-based-onpolicy/images/thumb/sphx_glr_q_learning_thumb.png :alt: :ref:`sphx_glr_auto_examples_gradient-based-onpolicy_q_learning.py` .. raw:: html
On-policy Q-learning
.. raw:: html
.. only:: html .. image:: /auto_examples/gradient-based-onpolicy/images/thumb/sphx_glr_dpg_thumb.png :alt: :ref:`sphx_glr_auto_examples_gradient-based-onpolicy_dpg.py` .. raw:: html
On-policy Deterministic Policy Gradient
.. thumbnail-parent-div-close .. raw:: html
Gradient-free learning agents ----------------------------- The example below demonstrates how to use gradient-free methodologies to find the optimal parametrization of an MPC controller. .. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /auto_examples/gradient-free/images/thumb/sphx_glr_bayesopt_thumb.png :alt: :ref:`sphx_glr_auto_examples_gradient-free_bayesopt.py` .. raw:: html
Bayesian Optimization for MPC Data-driven Tuning
.. thumbnail-parent-div-close .. raw:: html
Other examples -------------- Here we include other examples that are not (strictly) related to MPC and RL. .. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /auto_examples/others/images/thumb/sphx_glr_sampling_from_polytopes_thumb.png :alt: :ref:`sphx_glr_auto_examples_others_sampling_from_polytopes.py` .. raw:: html
Sampling from a convex polytopes
.. raw:: html
.. only:: html .. image:: /auto_examples/others/images/thumb/sphx_glr_acc_with_iccbf_thumb.png :alt: :ref:`sphx_glr_auto_examples_others_acc_with_iccbf.py` .. raw:: html
Adapative Cruise Control with Input Constrained Control Barrier Function
.. thumbnail-parent-div-close .. raw:: html
.. toctree:: :hidden: :includehidden: /auto_examples/gradient-based-offpolicy/index.rst /auto_examples/gradient-based-onpolicy/index.rst /auto_examples/gradient-free/index.rst /auto_examples/others/index.rst .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-gallery .. container:: sphx-glr-download sphx-glr-download-python :download:`Download all examples in Python source code: auto_examples_python.zip ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download all examples in Jupyter notebooks: auto_examples_jupyter.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_