[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-UM-ARM-Lab--pytorch_mppi":3,"tool-UM-ARM-Lab--pytorch_mppi":64},[4,17,27,35,43,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",138956,2,"2026-04-05T11:33:21",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":76,"owner_avatar_url":77,"owner_bio":78,"owner_company":79,"owner_location":79,"owner_email":79,"owner_twitter":79,"owner_website":80,"owner_url":81,"languages":82,"stars":87,"forks":88,"last_commit_at":89,"license":90,"difficulty_score":91,"env_os":92,"env_gpu":93,"env_ram":94,"env_deps":95,"category_tags":99,"github_topics":100,"view_count":23,"oss_zip_url":79,"oss_zip_packed_at":79,"status":16,"created_at":106,"updated_at":107,"faqs":108,"releases":109},3025,"UM-ARM-Lab\u002Fpytorch_mppi","pytorch_mppi","Model Predictive Path Integral (MPPI) with approximate dynamics implemented in pytorch","pytorch_mppi 是一个基于 PyTorch 实现的高效控制算法库，核心功能是执行模型预测路径积分（MPPI）。它主要解决了传统轨迹优化方法在复杂动态系统中计算成本高、难以实时应用的问题。通过引入重要性采样技术，该工具允许使用近似动力学模型（如神经网络）替代真实的物理环境进行采样，从而大幅降低对精确物理模型的依赖，使其能灵活应用于各类仿真或现实场景。\n\n这款工具非常适合机器人学研究人员、强化学习开发者以及需要解决非线性控制问题的工程师使用。其独特的技术亮点在于充分利用 PyTorch 的并行计算能力，支持在 GPU 上加速大规模轨迹采样；同时提供了多种平滑控制信号的进阶变体（如 SMPPI 和独有的 KMPPI），能在保证控制最优性的前提下显著提升动作流畅度。此外，它还内置了超参数自动调优功能，并支持处理随机动态模型与控制边界约束，帮助用户更轻松地构建高性能控制器。无论是用于学术实验还是实际部署，pytorch_mppi 都提供了一个灵活且强大的基础框架。","# PyTorch MPPI Implementation\nThis repository implements Model Predictive Path Integral (MPPI) \nwith approximate dynamics in pytorch. MPPI typically requires actual\ntrajectory samples, but [this paper](https:\u002F\u002Fieeexplore.ieee.org\u002Fdocument\u002F7989202\u002F)\nshowed that it could be done with approximate dynamics (such as with a neural network)\nusing importance sampling.\n\nThus it can be used in place of other trajectory optimization methods\nsuch as the Cross Entropy Method (CEM), or random shooting.\n\n---\nNew since Aug 2024 smoothing methods, including our own KMPPI, see the [section](#smoothing) below on smoothing\n\n# Installation\n```shell\npip install pytorch-mppi\n```\nfor autotuning hyperparameters, install with\n```shell\npip install pytorch-mppi[tune]\n```\n\nfor running tests, install with\n```shell\npip install pytorch-mppi[test]\n```\nfor development, clone the repository then install in editable mode\n```shell\npip install -e .\n```\n\n# Usage\nSee `tests\u002Fpendulum_approximate.py` for usage with a neural network approximating\nthe pendulum dynamics. See the `not_batch` branch for an easier to read\nalgorithm. Basic use case is shown below\n\n```python\nfrom pytorch_mppi import MPPI\n\n# create controller with chosen parameters\nctrl = MPPI(dynamics, running_cost, nx, noise_sigma, num_samples=N_SAMPLES, horizon=TIMESTEPS,\n            lambda_=lambda_, device=d,\n            u_min=torch.tensor(ACTION_LOW, dtype=torch.double, device=d),\n            u_max=torch.tensor(ACTION_HIGH, dtype=torch.double, device=d))\n\n# assuming you have a gym-like env\nobs = env.reset()\nfor i in range(100):\n    action = ctrl.command(obs)\n    obs, reward, done, _ = env.step(action.cpu().numpy())\n```\n\n# Requirements\n- pytorch (>= 1.0)\n- `next state \u003C- dynamics(state, action)` function (doesn't have to be true dynamics)\n    - `state` is `K x nx`, `action` is `K x nu`\n- `cost \u003C- running_cost(state, action)` function\n    - `cost` is `K x 1`, state is `K x nx`, `action` is `K x nu`\n\n# Features\n- Approximate dynamics MPPI with importance sampling\n- Parallel\u002Fbatch pytorch implementation for accelerated sampling\n- Control bounds via sampling control noise from rectified gaussian \n- Handle stochastic dynamic models (assuming each call is a sample) by sampling multiple state trajectories for the same\naction trajectory with `rollout_samples`\n- \n# Parameter tuning and hints\n`terminal_state_cost` - function(state (K x T x nx)) -> cost (K x 1) by default there is no terminal\ncost, but if you experience your trajectory getting close to but never quite reaching the goal, then\nhaving a terminal cost can help. The function should scale with the horizon (T) to keep up with the\nscaling of the running cost.\n\n`lambda_` - higher values increases the cost of control noise, so you end up with more\nsamples around the mean; generally lower values work better (try `1e-2`)\n\n`num_samples` - number of trajectories to sample; generally the more the better.\nRuntime performance scales much better with `num_samples` than `horizon`, especially\nif you're using a GPU device (remember to pass that in!)\n\n`noise_mu` - the default is 0 for all control dimensions, which may work out\nreally poorly if you have control bounds and the allowed range is not 0-centered.\nRemember to change this to an appropriate value for non-symmetric control dimensions.\n\n## Smoothing\nFrom version 0.8.0 onwards, you can use MPPI variants that smooth the control signal. We've implemented\n[SMPPI](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2112.09988) as well our own kernel interpolation MPPI (KMPPI). In the base algorithm,\nyou can achieve somewhat smoother trajectories by increasing `lambda_`; however, that comes at the cost of\noptimality. Explicit smoothing algorithms can achieve smoothness without sacrificing optimality.\n\nWe used it and described it in our recent paper ([arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F2408.10450)) and you can cite it \nuntil we release a work dedicated to KMPPI. Below we show the difference between MPPI, SMPPI, and KMPPI on a toy\n2D navigation problem where the control is a constrained delta position. You can check it out in `tests\u002Fsmooth_mppi.py`.\n\nThe API is mostly the same, with some additional constructor options:\n```python\nimport pytorch_mppi as mppi\nctrl = mppi.KMPPI(args, \n                 kernel=mppi.RBFKernel(sigma=2), # kernel in trajectory time space (1 dimensional)\n                 num_support_pts=5,              # number of control points to sample, \u003C= horizon\n                 **kwargs)\n```\nThe kernel can be any subclass of `mppi.TimeKernel`. It is a kernel in the trajectory time space (1 dimensional).\nNote that B-spline smoothing can be achieved by using a B-spline kernel. The number of support points is the number\nof control points to sample. Any trajectory points in between are interpolated using the kernel. For example if a\ntrajectory horizon is 20 and `num_support_pts` is 5, then 5 control points evenly spaced throughout the horizon\n(with the first and last corresponding to the actual start and end of the trajectory) are sampled. The rest of the\ntrajectory is interpolated using the kernel. The kernel is applied to the control signal, not the state signal.\n\nMPPI without smoothing\n\n![MPPI](https:\u002F\u002Fimgur.com\u002F9wEcT2s.gif) \n\n[SMPPI](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2112.09988) smoothing by sampling noise in the action derivative space doesn't work well on this problem\n\n![SMPPI](https:\u002F\u002Fimgur.com\u002FxwYy3aj.gif)\n\nKMPPI smoothing with RBF kernel works well\n\n![KMPPI](https:\u002F\u002Fimgur.com\u002FIG1Zrtd.gif)\n\n\n## Autotune\nfrom version 0.5.0 onwards, you can automatically tune the hyperparameters.\nA convenient tuner compatible with the popular [ray tune](https:\u002F\u002Fdocs.ray.io\u002Fen\u002Flatest\u002Ftune\u002Findex.html) library\nis implemented. You can select from a variety of cutting edge black-box optimizers such as \n[CMA-ES](https:\u002F\u002Fgithub.com\u002FCMA-ES\u002Fpycma), [HyperOpt](http:\u002F\u002Fhyperopt.github.io\u002Fhyperopt\u002F),\n[fmfn\u002FBayesianOptimization](https:\u002F\u002Fgithub.com\u002Ffmfn\u002FBayesianOptimization), and so on.\nSee `tests\u002Fauto_tune_parameters.py` for an example. A tutorial based on it follows.\n\nThe tuner can be used for other controllers as well, but you will need to define the appropriate\n`TunableParameter` subclasses.\n\nFirst we create a toy 2D environment to do controls on and create the controller with some\ndefault parameters.\n```python\nimport torch\nfrom pytorch_mppi import MPPI\n\ndevice = \"cpu\"\ndtype = torch.double\n\n# create toy environment to do on control on (default start and goal)\nenv = Toy2DEnvironment(visualize=True, terminal_scale=10)\n\n# create MPPI with some initial parameters\nmppi = MPPI(env.dynamics, env.running_cost, 2,\n            terminal_state_cost=env.terminal_cost,\n            noise_sigma=torch.diag(torch.tensor([5., 5.], dtype=dtype, device=device)),\n            num_samples=500,\n            horizon=20, device=device,\n            u_max=torch.tensor([2., 2.], dtype=dtype, device=device),\n            lambda_=1)\n```\n\nWe then need to create an evaluation function for the tuner to tune on. \nIt should take no arguments and output a `EvaluationResult` populated at least by costs.\nIf you don't need rollouts for the cost evaluation, then you can set it to None in the return.\nTips for creating the evaluation function are described in comments below:\n\n```python\nfrom pytorch_mppi import autotune\n# use the same nominal trajectory to start with for all the evaluations for fairness\nnominal_trajectory = mppi.U.clone()\n# parameters for our sample evaluation function - lots of choices for the evaluation function\nevaluate_running_cost = True\nnum_refinement_steps = 10\nnum_trajectories = 5\n\ndef evaluate():\n    costs = []\n    rollouts = []\n    # we sample multiple trajectories for the same start to goal problem, but in your case you should consider\n    # evaluating over a diverse dataset of trajectories\n    for j in range(num_trajectories):\n        mppi.U = nominal_trajectory.clone()\n        # the nominal trajectory at the start will be different if the horizon's changed\n        mppi.change_horizon(mppi.T)\n        # usually MPPI will have its nominal trajectory warm-started from the previous iteration\n        # for a fair test of tuning we will reset its nominal trajectory to the same random one each time\n        # we manually warm it by refining it for some steps\n        for k in range(num_refinement_steps):\n            mppi.command(env.start, shift_nominal_trajectory=False)\n\n        rollout = mppi.get_rollouts(env.start)\n\n        this_cost = 0\n        rollout = rollout[0]\n        # here we evaluate on the rollout MPPI cost of the resulting trajectories\n        # alternative costs for tuning the parameters are possible, such as just considering terminal cost\n        if evaluate_running_cost:\n            for t in range(len(rollout) - 1):\n                this_cost = this_cost + env.running_cost(rollout[t], mppi.U[t])\n        this_cost = this_cost + env.terminal_cost(rollout, mppi.U)\n\n        rollouts.append(rollout)\n        costs.append(this_cost)\n    # can return None for rollouts if they do not need to be calculated\n    return autotune.EvaluationResult(torch.stack(costs), torch.stack(rollouts))\n```\n\nWith this we have enough to start tuning. For example, we can tune iteratively with the CMA-ES optimizer\n\n```python\n# these are subclass of TunableParameter (specifically MPPIParameter) that we want to tune\nparams_to_tune = [autotune.SigmaParameter(mppi), autotune.HorizonParameter(mppi), autotune.LambdaParameter(mppi)]\n# create a tuner with a CMA-ES optimizer\ntuner = autotune.Autotune(params_to_tune, evaluate_fn=evaluate, optimizer=autotune.CMAESOpt(sigma=1.0))\n# tune parameters for a number of iterations\niterations = 30\nfor i in range(iterations):\n  # results of this optimization step are returned\n  res = tuner.optimize_step()\n  # we can render the rollouts in the environment\n  env.draw_rollouts(res.rollouts)\n# get best results and apply it to the controller\n# (by default the controller will take on the latest tuned parameter, which may not be best)\nres = tuner.get_best_result()\ntuner.apply_parameters(res.param_values)\n```\nThis is a local search method that optimizes starting from the initially defined parameters.\nFor global searching, we use ray tune compatible searching algorithms. Note that you can modify the\nsearch space of each parameter, but default reasonable ones are provided.\n\n```python\n# can also use a Ray Tune optimizer, see\n# https:\u002F\u002Fdocs.ray.io\u002Fen\u002Flatest\u002Ftune\u002Fapi_docs\u002Fsuggestion.html#search-algorithms-tune-search\n# rather than adapting the current parameters, these optimizers allow you to define a search space for each\n# and will search on that space\nfrom pytorch_mppi import autotune_global\nfrom ray.tune.search.hyperopt import HyperOptSearch\nfrom ray.tune.search.bayesopt import BayesOptSearch\n\n# the global version of the parameters define a reasonable search space for each parameter\nparams_to_tune = [autotune_global.SigmaGlobalParameter(mppi),\n                  autotune_global.HorizonGlobalParameter(mppi),\n                  autotune_global.LambdaGlobalParameter(mppi)]\n\n# be sure to close any figures before ray tune optimization or they will be duplicated\nenv.visualize = False\nplt.close('all')\ntuner = autotune_global.AutotuneGlobal(params_to_tune, evaluate_fn=evaluate,\n                                       optimizer=autotune_global.RayOptimizer(HyperOptSearch))\n# ray tuners cannot be tuned iteratively, but you can specify how many iterations to tune for\nres = tuner.optimize_all(100)\nres = tuner.get_best_result()\ntuner.apply_parameters(res.params)\n```\n\nFor example tuning hyperparameters (with CMA-ES) only on the toy problem (the nominal trajectory is reset each time so they are sampling from noise):\n\n![toy tuning](https:\u002F\u002Fi.imgur.com\u002F2qtYMwu.gif)\n\nIf you want more than just the best solution found, such as if you want diversity\nacross hyperparameter values, or if your evaluation function has large uncertainty,\nthen you can directly query past results by\n```python\nfor res in tuner.optim.all_res:\n    # the cost\n    print(res.metrics['cost'])\n    # extract the parameters\n    params = tuner.config_to_params(res.config)\n    print(params)\n    # apply the parameters to the controller\n    tuner.apply_parameters(params)\n```\n\nAlternatively you can try Quality Diversity optimization using the \n[CMA-ME optimizer](https:\u002F\u002Fgithub.com\u002Ficaros-usc\u002Fpyribs). This optimizer will\ntry to optimize for high quality parameters while ensuring there is diversity across\nthem. However, it is very slow and you might be better using a `RayOptimizer` and selecting\nfor top results while checking for diversity.\nTo use it, you need to install\n```python\npip install ribs\n```\n\nYou then use it as\n\n```python\nimport pytorch_mppi.autotune_qd\n\noptim = pytorch_mppi.autotune_qd.CMAMEOpt()\ntuner = autotune_global.AutotuneGlobal(params_to_tune, evaluate_fn=evaluate,\n                                       optimizer=optim)\n\niterations = 10\nfor i in range(iterations):\n  # results of this optimization step are returned\n  res = tuner.optimize_step()\n  # we can render the rollouts in the environment\n  best_params = optim.get_diverse_top_parameters(5)\n  for res in best_params:\n    print(res)\n```\n\n# Tests\nUnder `tests` you can find the `MPPI` method applied to known pendulum dynamics\nand approximate pendulum dynamics (with a 2 layer feedforward net \nestimating the state residual). Using a continuous angle representation\n(feeding `cos(\\theta), sin(\\theta)` instead of `\\theta` directly) makes\na huge difference. Although both works, the continuous representation\nis much more robust to controller parameters and random seed. In addition,\nthe problem of continuing to spin after over-swinging does not appear.\n\nSample result on approximate dynamics with 100 steps of random policy data\nto initialize the dynamics:\n\n![pendulum results](https:\u002F\u002Fi.imgur.com\u002FeuYQJ25.gif)\n\n# Related projects\n- [pytorch CEM](https:\u002F\u002Fgithub.com\u002FLemonPi\u002Fpytorch_cem) - an alternative MPC shooting method with similar API as this\nproject\n- [pytorch iCEM](https:\u002F\u002Fgithub.com\u002FUM-ARM-Lab\u002Fpytorch_icem) - alternative sampling based MPC\n","# PyTorch MPPI 实现\n本仓库实现了基于近似动力学的模型预测路径积分（MPPI），使用 PyTorch 框架。通常，MPPI 需要真实的轨迹样本，但[这篇论文](https:\u002F\u002Fieeexplore.ieee.org\u002Fdocument\u002F7989202\u002F)表明，通过重要性采样，即使使用近似动力学模型（例如神经网络），也可以实现 MPPI。\n\n因此，它可以替代其他轨迹优化方法，如交叉熵法（CEM）或随机射击法。\n\n---\n自 2024 年 8 月起新增平滑方法，包括我们自己的 KMPPI，请参阅下方的[平滑部分]。\n\n# 安装\n```shell\npip install pytorch-mppi\n```\n若需自动调优超参数，请使用以下命令安装：\n```shell\npip install pytorch-mppi[tune]\n```\n\n若需运行测试，请使用以下命令安装：\n```shell\npip install pytorch-mppi[test]\n```\n\n若需进行开发，请克隆仓库并以可编辑模式安装：\n```shell\npip install -e .\n```\n\n# 使用\n请参阅 `tests\u002Fpendulum_approximate.py`，其中展示了如何使用神经网络近似摆的动力学模型。此外，`not_batch` 分支提供了更易读的算法实现。基本用法如下：\n\n```python\nfrom pytorch_mppi import MPPI\n\n# 创建控制器并设置相关参数\nctrl = MPPI(dynamics, running_cost, nx, noise_sigma, num_samples=N_SAMPLES, horizon=TIMESTEPS,\n            lambda_=lambda_, device=d,\n            u_min=torch.tensor(ACTION_LOW, dtype=torch.double, device=d),\n            u_max=torch.tensor(ACTION_HIGH, dtype=torch.double, device=d))\n\n# 假设你有一个类似 Gym 的环境\nobs = env.reset()\nfor i in range(100):\n    action = ctrl.command(obs)\n    obs, reward, done, _ = env.step(action.cpu().numpy())\n```\n\n# 要求\n- PyTorch (>= 1.0)\n- 动力学函数：`next state \u003C- dynamics(state, action)`（不一定是真实动力学）\n    - `state` 是 `K x nx`，`action` 是 `K x nu`\n- 运行代价函数：`cost \u003C- running_cost(state, action)`\n    - `cost` 是 `K x 1`，`state` 是 `K x nx`，`action` 是 `K x nu`\n\n# 特性\n- 基于重要性采样的近似动力学 MPPI\n- 并行\u002F批处理的 PyTorch 实现，加速采样\n- 通过从修正高斯分布中采样控制噪声来施加控制约束\n- 支持随机动力学模型（假设每次调用都是一个样本），可通过为同一动作轨迹采样多条状态轨迹来处理，使用 `rollout_samples` 参数\n- \n# 参数调优与提示\n`terminal_state_cost` - 函数(state (K x T x nx)) -> cost (K x 1)。默认情况下没有终端代价，但如果发现轨迹接近目标却始终无法到达，可以加入终端代价来帮助收敛。该函数应与时间步长（T）成比例，以匹配运行代价的缩放。\n\n`lambda_` - 较高的值会增加控制噪声的成本，从而使更多样本集中在均值附近；通常较低的值效果更好（可尝试 `1e-2`）。\n\n`num_samples` - 采样轨迹的数量；一般来说，数量越多越好。\n运行性能对 `num_samples` 的依赖远大于对 `horizon` 的依赖，尤其是在使用 GPU 设备时（记得将其传递进去！）。\n\n`noise_mu` - 默认值为 0，适用于所有控制维度。然而，如果存在控制约束且允许范围并非以 0 为中心，则可能效果不佳。对于非对称控制维度，务必将其调整为合适的值。\n\n## 平滑\n从版本 0.8.0 开始，可以使用对控制信号进行平滑处理的 MPPI 变体。我们实现了 [SMPPI](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2112.09988) 以及我们自己的核插值 MPPI（KMPPI）。在基础算法中，可以通过增大 `lambda_` 来获得较为平滑的轨迹，但这会牺牲一定的最优性。而显式的平滑算法则可以在不损失最优性的前提下实现平滑效果。\n\n我们在最近的一篇论文中使用并描述了这些方法（[arXiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F2408.10450)），在我们发布专门针对 KMPPI 的工作之前，您可以引用该论文。下面展示了 MPPI、SMPPI 和 KMPPI 在一个二维导航问题上的差异，其中控制是受约束的位置增量。您可以在 `tests\u002Fsmooth_mppi.py` 中查看详细内容。\n\nAPI 大致相同，仅增加了部分构造函数选项：\n```python\nimport pytorch_mppi as mppi\nctrl = mppi.KMPPI(args, \n                 kernel=mppi.RBFKernel(sigma=2), # 轨迹时间空间中的核（一维）\n                 num_support_pts=5,              # 采样控制点的数量，不超过时间步长\n                 **kwargs)\n```\n核可以是 `mppi.TimeKernel` 的任何子类。它作用于轨迹的时间维度（一维空间）。需要注意的是，使用 B 样条核可以实现 B 样条平滑。支持点的数量即为采样的控制点数，其余轨迹点将通过核进行插值。例如，如果轨迹时间步长为 20，而 `num_support_pts` 为 5，则会在整个时间步长上均匀选取 5 个控制点（首尾分别对应轨迹的起点和终点），其余部分则由核插值生成。核作用于控制信号，而非状态信号。\n\n未平滑的 MPPI\n\n![MPPI](https:\u002F\u002Fimgur.com\u002F9wEcT2s.gif)\n\n[SMPPI](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2112.09988)，通过在动作导数空间中采样噪声进行平滑，在此问题中效果不佳。\n\n![SMPPI](https:\u002F\u002Fimgur.com\u002FxwYy3aj.gif)\n\n采用 RBF 核的 KMPPI 平滑效果良好。\n\n![KMPPI](https:\u002F\u002Fimgur.com\u002FIG1Zrtd.gif)\n\n\n## 自动调优\n从版本 0.5.0 开始，可以自动调优超参数。我们实现了一个兼容流行库 [ray tune](https:\u002F\u002Fdocs.ray.io\u002Fen\u002Flatest\u002Ftune\u002Findex.html) 的便捷调优器。用户可以选择多种前沿的黑盒优化算法，如 [CMA-ES](https:\u002F\u002Fgithub.com\u002FCMA-ES\u002Fpycma)、[HyperOpt](http:\u002F\u002Fhyperopt.github.io\u002Fhyperopt\u002F)、[fmfn\u002FBayesianOptimization](https:\u002F\u002Fgithub.com\u002Ffmfn\u002FBayesianOptimization) 等。示例请参阅 `tests\u002Fauto_tune_parameters.py`，后续将提供基于该示例的教程。\n\n该调优器也可用于其他控制器，但需要定义相应的 `TunableParameter` 子类。\n\n首先，我们创建一个用于控制的二维玩具环境，并使用一些默认参数创建控制器。\n```python\nimport torch\nfrom pytorch_mppi import MPPI\n\ndevice = \"cpu\"\ndtype = torch.double\n\n# 创建用于控制的玩具环境（默认起点和终点）\nenv = Toy2DEnvironment(visualize=True, terminal_scale=10)\n\n# 使用一些初始参数创建 MPPI\nmppi = MPPI(env.dynamics, env.running_cost, 2,\n            terminal_state_cost=env.terminal_cost,\n            noise_sigma=torch.diag(torch.tensor([5., 5.], dtype=dtype, device=device)),\n            num_samples=500,\n            horizon=20, device=device,\n            u_max=torch.tensor([2., 2.], dtype=dtype, device=device),\n            lambda_=1)\n```\n\n然后我们需要创建一个评估函数，供调优器进行调优。该函数不应接受任何参数，并应返回一个至少包含成本的 `EvaluationResult` 对象。如果在评估成本时不需要进行轨迹回放，可以在返回值中将其设置为 None。以下注释中介绍了如何创建评估函数的提示：\n\n```python\nfrom pytorch_mppi import autotune\n# 为了公平起见，所有评估都使用相同的标称轨迹作为起点\nnominal_trajectory = mppi.U.clone()\n# 我们示例评估函数的参数 - 评估函数有很多选择\nevaluate_running_cost = True\nnum_refinement_steps = 10\nnum_trajectories = 5\n\ndef evaluate():\n    costs = []\n    rollouts = []\n    # 我们针对同一个起始到目标的问题采样多条轨迹，但在实际应用中，您应该考虑在多样化的轨迹数据集上进行评估\n    for j in range(num_trajectories):\n        mppi.U = nominal_trajectory.clone()\n        # 如果时间 horizon 发生变化，起始时的标称轨迹也会不同\n        mppi.change_horizon(mppi.T)\n        # 通常情况下，MPPI 的标称轨迹会从前一次迭代中热启动\n        # 为了公平地测试调优效果，我们将每次的标称轨迹重置为相同的随机轨迹\n        # 然后我们手动通过几次细化步骤来对其进行预热\n        for k in range(num_refinement_steps):\n            mppi.command(env.start, shift_nominal_trajectory=False)\n\n        rollout = mppi.get_rollouts(env.start)\n\n        this_cost = 0\n        rollout = rollout[0]\n        # 在这里我们评估 MPPI 生成的轨迹的总成本\n        \u002F\u002F 其他用于调参的成本函数也是可行的，比如仅考虑终端成本\n        if evaluate_running_cost:\n            for t in range(len(rollout) - 1):\n                this_cost += env.running_cost(rollout[t], mppi.U[t])\n        this_cost += env.terminal_cost(rollout, mppi.U)\n\n        rollouts.append(rollout)\n        costs.append(this_cost)\n    \u002F\u002F 如果不需要计算轨迹回放，可以返回 None\n    return autotune.EvaluationResult(torch.stack(costs), torch.stack(rollouts))\n```\n\n有了这些内容，我们就可以开始调优了。例如，我们可以使用 CMA-ES 优化器进行迭代调优。\n\n```python\n# 这些是我们想要调优的 TunableParameter 子类（具体来说是 MPPIParameter）\nparams_to_tune = [autotune.SigmaParameter(mppi), autotune.HorizonParameter(mppi), autotune.LambdaParameter(mppi)]\n\u002F\u002F 创建一个使用 CMA-ES 优化器的调优器\ntuner = autotune.Autotune(params_to_tune, evaluate_fn=evaluate, optimizer=autotune.CMAESOpt(sigma=1.0))\n\u002F\u002F 调优若干次\niterations = 30\nfor i in range(iterations):\n  \u002F\u002F 返回本次优化步骤的结果\n  res = tuner.optimize_step()\n  \u002F\u002F 我们可以在环境中绘制轨迹回放\n  env.draw_rollouts(res.rollouts)\n\u002F\u002F 获取最佳结果并将其应用到控制器上\n\u002F\u002F （默认情况下，控制器会采用最新调优的参数，但这可能不是最佳的）\nres = tuner.get_best_result()\ntuner.apply_parameters(res.param_values)\n```\n\n这是一种从初始定义的参数开始进行优化的局部搜索方法。对于全局搜索，我们可以使用与 Ray Tune 兼容的搜索算法。请注意，您可以修改每个参数的搜索空间，但系统已经提供了合理的默认值。\n\n```python\n\u002F\u002F 也可以使用 Ray Tune 优化器，详情请参阅：\n\u002F\u002F https:\u002F\u002Fdocs.ray.io\u002Fen\u002Flatest\u002Ftune\u002Fapi_docs\u002Fsuggestion.html#search-algorithms-tune-search\n\u002F\u002F 与调整现有参数不同，这些优化器允许您为每个参数定义搜索空间，并在此空间内进行搜索。\nfrom pytorch_mppi import autotune_global\nfrom ray.tune.search.hyperopt import HyperOptSearch\nfrom ray.tune.search.bayesopt import BayesOptSearch\n\n\u002F\u002F 全局版本的参数为每个参数定义了一个合理的搜索空间\nparams_to_tune = [autotune_global.SigmaGlobalParameter(mppi),\n                  autotune_global.HorizonGlobalParameter(mppi),\n                  autotune_global.LambdaGlobalParameter(mppi)]\n\n\u002F\u002F 在进行 Ray Tune 优化之前，请务必关闭所有图表，否则它们会被重复显示\nenv.visualize = False\nplt.close('all')\ntuner = autotune_global.AutotuneGlobal(params_to_tune, evaluate_fn=evaluate,\n                                       optimizer=autotune_global.RayOptimizer(HyperOptSearch))\n\u002F\u002F Ray 调优器不能进行迭代调优，但您可以指定要调优的次数\nres = tuner.optimize_all(100)\nres = tuner.get_best_result()\ntuner.apply_parameters(res.params)\n```\n\n例如，仅对玩具问题使用 CMA-ES 调整超参数（每次都会重置标称轨迹，因此是从噪声中采样）：\n\n![toy tuning](https:\u002F\u002Fi.imgur.com\u002F2qtYMwu.gif)\n\n如果您不仅想要找到最佳解决方案，还希望获得超参数值的多样性，或者您的评估函数存在较大的不确定性，那么可以直接查询历史结果：\n\n```python\nfor res in tuner.optim.all_res:\n    \u002F\u002F 成本\n    print(res.metrics['cost'])\n    \u002F\u002F 提取参数\n    params = tuner.config_to_params(res.config)\n    print(params)\n    \u002F\u002F 将参数应用到控制器\n    tuner.apply_parameters(params)\n```\n\n或者，您也可以尝试使用 [CMA-ME 优化器](https:\u002F\u002Fgithub.com\u002Ficaros-usc\u002Fpyribs) 进行质量多样性优化。该优化器会在确保参数多样性的同时，努力优化高质量的参数。不过，它的速度非常慢，您可能更适合使用 `RayOptimizer` 并在检查多样性的同时选择最佳结果。\n\n要使用它，您需要安装：\n\n```python\npip install ribs\n```\n\n然后您可以这样使用：\n\n```python\nimport pytorch_mppi.autotune_qd\n\noptim = pytorch_mppi.autotune_qd.CMAMEOpt()\ntuner = autotune_global.AutotuneGlobal(params_to_tune, evaluate_fn=evaluate,\n                                       optimizer=optim)\n\niterations = 10\nfor i in range(iterations):\n  \u002F\u002F 返回本次优化步骤的结果\n  res = tuner.optimize_step()\n  \u002F\u002F 我们可以在环境中绘制轨迹回放\n  best_params = optim.get_diverse_top_parameters(5)\n  for res in best_params:\n    print(res)\n```\n\n# 测试\n在 `tests` 目录下，你可以找到将 MPPI 方法应用于已知的摆系统动力学以及近似摆系统动力学（使用一个两层前馈神经网络来估计状态残差）的示例。采用连续角度表示法（即输入 `cos(θ), sin(θ)` 而不是直接输入 `θ`）会带来显著差异。尽管两种方法都能工作，但连续表示法对控制器参数和随机种子的鲁棒性要强得多。此外，过度摆动后持续旋转的问题也不会出现。\n\n使用 100 步随机策略数据初始化动力学模型，在近似动力学上的示例结果如下：\n\n![摆系统结果](https:\u002F\u002Fi.imgur.com\u002FeuYQJ25.gif)\n\n# 相关项目\n- [pytorch CEM](https:\u002F\u002Fgithub.com\u002FLemonPi\u002Fpytorch_cem) - 一种具有与此项目相似 API 的替代 MPC 射线法实现\n- [pytorch iCEM](https:\u002F\u002Fgithub.com\u002FUM-ARM-Lab\u002Fpytorch_icem) - 基于采样的另一种 MPC 实现","# PyTorch MPPI 快速上手指南\n\n本指南帮助中国开发者快速掌握 `pytorch_mppi`，一个基于 PyTorch 实现的模型预测路径积分（MPPI）控制库。该工具支持使用近似动力学模型（如神经网络）进行轨迹优化，适用于替代 CEM 或随机射击等方法。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**：Linux, macOS 或 Windows\n*   **Python 版本**：建议 Python 3.8+\n*   **核心依赖**：\n    *   `pytorch` (版本 >= 1.0)\n    *   可选依赖（用于自动调参）：`ray[tune]`, `cma`, `hyperopt` 等\n*   **硬件加速**：推荐使用 NVIDIA GPU 以利用其并行采样加速特性（需在代码中指定 `device`）\n\n## 安装步骤\n\n您可以直接通过 pip 安装稳定版。为了获得更好的下载速度，建议使用国内镜像源（如清华源或阿里源）。\n\n### 1. 基础安装\n仅安装核心功能：\n```shell\npip install pytorch-mppi -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n### 2. 安装自动调参功能\n如果您需要使用内置的超参数自动调优功能（基于 Ray Tune 等优化器）：\n```shell\npip install \"pytorch-mppi[tune]\" -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n### 3. 开发模式安装\n如果您需要修改源码或运行测试：\n```shell\ngit clone https:\u002F\u002Fgithub.com\u002Fyour-repo\u002Fpytorch_mppi.git\ncd pytorch_mppi\npip install -e . -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n## 基本使用\n\n以下是使用 `pytorch_mppi` 进行控制的最简流程。您需要定义动力学模型和代价函数，然后实例化控制器并在循环中调用。\n\n### 1. 定义必要函数\nMPPI 需要两个核心函数，输入需支持 Batch 维度（`K` 为样本数）：\n*   **动力学模型**：`next_state = dynamics(state, action)`\n    *   输入：`state` (K x nx), `action` (K x nu)\n    *   输出：`next_state`\n*   **运行代价**：`cost = running_cost(state, action)`\n    *   输入：同上\n    *   输出：`cost` (K x 1)\n\n### 2. 控制器初始化与运行\n```python\nimport torch\nfrom pytorch_mppi import MPPI\n\n# 假设已定义好 dynamics, running_cost, nx (状态维度), nu (动作维度)\n# 设置设备\ndevice = \"cuda\" if torch.cuda.is_available() else \"cpu\"\ndtype = torch.double\n\n# 创建控制器\nctrl = MPPI(\n    dynamics, \n    running_cost, \n    nx=nx, \n    noise_sigma=torch.ones(nu, dtype=dtype, device=device), # 噪声标准差\n    num_samples=500,          # 采样轨迹数量\n    horizon=20,               # 预测时域\n    lambda_=0.1,              # 温度参数，控制探索程度\n    device=device,\n    u_min=torch.tensor([-1.0], dtype=dtype, device=device), # 动作下限\n    u_max=torch.tensor([1.0], dtype=dtype, device=device)   # 动作上限\n)\n\n# 模拟控制循环 (假设有一个 gym 风格的环境 env)\nobs = env.reset()\n# 将观察值转换为 tensor 并添加到 batch 维度\ncurrent_state = torch.tensor(obs, dtype=dtype, device=device).unsqueeze(0)\n\nfor i in range(100):\n    # 获取最优动作 (返回值为 tensor)\n    action = ctrl.command(current_state)\n    \n    # 执行动作 (转换回 numpy 供环境使用)\n    next_obs, reward, done, _ = env.step(action.cpu().numpy())\n    \n    if done:\n        obs = env.reset()\n    \n    # 更新当前状态\n    current_state = torch.tensor(next_obs, dtype=dtype, device=device).unsqueeze(0)\n```\n\n### 关键参数提示\n*   **`num_samples`**：采样轨迹数。越多效果通常越好，且在 GPU 上扩展性极佳。\n*   **`lambda_`**：控制噪声成本。值越小探索性越强（通常尝试 `1e-2` 到 `0.1`），值越大动作越接近均值。\n*   **`noise_mu`**：如果动作空间不是以 0 为中心（例如 [0, 1]），请务必将此参数设置为范围中心，否则采样效率会极低。","某自动驾驶研发团队正在开发基于神经网络的车辆轨迹规划模块，需要在复杂动态环境中实时生成平滑且安全的行驶路径。\n\n### 没有 pytorch_mppi 时\n- **计算效率低下**：传统采样方法（如随机射击或交叉熵法）难以利用 GPU 并行加速，导致在高采样数下推理延迟过高，无法满足实时控制需求。\n- **模型依赖受限**：算法强依赖精确的物理动力学公式，难以直接融合团队训练的深度神经网络作为近似动力学模型，限制了在非线性场景中的适应性。\n- **控制信号抖动**：生成的轨迹往往存在高频震荡，为了平滑效果不得不牺牲最优性，导致车辆在变道或避障时动作生硬。\n- **参数调优困难**：缺乏针对噪声分布和控制边界的灵活配置机制，在处理非对称控制约束（如油门与刹车范围不同）时容易失效。\n\n### 使用 pytorch_mppi 后\n- **推理速度飞跃**：借助 PyTorch 的原生并行批处理能力，pytorch_mppi 能在 GPU 上瞬间完成数千条轨迹的采样与评估，显著降低规划延迟。\n- **无缝集成神经网络**：直接支持将训练好的神经网络作为近似动力学函数输入，利用重要性采样技术，使规划器能完美适配复杂的非线性车辆模型。\n- **平滑且最优的轨迹**：内置的 KMPPI 和 SMPPI 平滑算法，在不牺牲路径最优性的前提下，自动输出连续平滑的控制指令，大幅提升乘坐舒适性。\n- **灵活的约束处理**：通过修正高斯噪声采样轻松设定非对称控制边界，并支持自动超参数整定，让算法在各种工况下都能快速收敛到最佳状态。\n\npytorch_mppi 通过将神经网络近似动力学与高效并行采样相结合，为复杂动态系统提供了实时、平滑且高精度的轨迹优化解决方案。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FUM-ARM-Lab_pytorch_mppi_3e71b059.png","UM-ARM-Lab","The Autonomous Robotic Manipulation Lab","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FUM-ARM-Lab_03cebfda.png","The Autonomous Robotic Manipulation Lab studies motion planning, manipulation, and human-robot collaboration.",null,"arm.eecs.umich.edu","https:\u002F\u002Fgithub.com\u002FUM-ARM-Lab",[83],{"name":84,"color":85,"percentage":86},"Python","#3572A5",100,687,71,"2026-03-31T12:36:57","MIT",1,"","非必需，但推荐使用 GPU 以加速采样过程（特别是当 num_samples 较大时）；未指定具体型号、显存大小或 CUDA 版本","未说明",{"notes":96,"python":94,"dependencies":97},"该工具主要依赖 PyTorch (>=1.0)。若需自动调参功能，需安装额外可选依赖（如 ray, cma, hyperopt 等）。支持使用神经网络作为近似动力学模型。从 0.8.0 版本起支持平滑控制信号算法（SMPPI, KMPPI）。开发模式下需克隆仓库并以可编辑模式安装。",[98],"torch>=1.0",[13],[101,102,103,104,105],"approximate-dynamics","mppi","controls","model-predictive-control","pytorch","2026-03-27T02:49:30.150509","2026-04-06T05:35:46.256847",[],[110,115],{"id":111,"version":112,"summary_zh":113,"released_at":114},76417,"v0.9.0","## 性能优化（CUDA 加速 1.5–2 倍）\n- 在 rollout 循环中使用张量预分配，而非列表加 `torch.stack`\n- 直接进行 Cholesky 分解噪声采样，替代 `MultivariateNormal.rsample`\n- 检测对角协方差——在常见情况下使用逐元素运算代替矩阵乘法\n- M=1 快速路径——当 `rollout_samples=1`（默认值）时，跳过 `.repeat()` 和方差计算\n- 在无 `terminal_state_cost` 时延迟存储状态\u002F动作\n- 使用 `torch.einsum` 计算加权扰动和\n- 在热点路径中绕过 `handle_batch_input`\n- 在初始化时解析所有分支\n- 缓存 KMPPI 核心矩阵\n- 将 `functorch.vmap` 替换为 `torch.vmap`，将 `torch.inverse` 替换为 `torch.linalg.inv`\n\n## 新特性\n- `mppi.compile(**kwargs)` — 可选的 `torch.compile`，用于动力学\u002F代价函数（在 K 较大时效果显著）\n- `MPPI_Batched` — 单次动力学调用即可并行处理 N 个环境\n\n## 测试\n- 75 个单元测试 + 在 Python 3.9\u002F3.12 上的 CI\n- 解的质量回归测试\n- 性能基准测试","2026-03-12T03:57:01",{"id":116,"version":117,"summary_zh":118,"released_at":119},76418,"v0.7.3","兼容新的 gym 和 ray[tune] 版本","2023-12-14T21:54:24"]