算法
-朝汐-
这个作者很懒,什么都没留下…
展开
-
The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games 阅读笔记
“The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games” 阅读笔记MAPPO算法是PPO算法专用于多智能体环境的变体。PPO作为on-policy算法,在多智能体环境下有着与其他off-policy的算法相比有着相同的采样效率,并在大多数场景下有着更好的表现。MAPPO算法可以同时作为CTDE(集中训练,分散执行, 有集中的价值函数)算法或分散学习算法(分散的价值函数)。PPO代码实现细节和决定PPO算法表现的关键超参原创 2022-02-14 15:35:17 · 4899 阅读 · 0 评论 -
spfa算法的python实现
SPFA算法是对Bellman-Ford算法的改进,使用了队列进行了优化,在时间复杂度上,一般情况下是优于Dijkstra算法的。在SPFA算法中每次仅对最短路径估计值发生改变了的顶点的所有出边执行松弛操作。并使用队列来维护这些发生了变化的点。每次选取队首顶点u的所有边进行松弛操作,假设有一条u到v的边,如果通过这条边使得源点到顶点v的最短路程变短,且顶点v不在当前队列中,就将顶点v放入队尾。算法过程queue<int> q;源点s入队;while(队列非空){ 取出队首元原创 2021-12-27 11:00:27 · 1435 阅读 · 1 评论 -
c++链表排序
参考//// Created by zhang on 2021/3/15.//#include <iostream>#include <string.h>using namespace std;//定义学生节点typedef struct studentNode{ string stuId;// string stuName;// string Id;// string Institute; string stuTyp原创 2021-03-17 10:45:47 · 1919 阅读 · 0 评论 -
c++中文数组
#include<bits/stdc++.h>using namespace std;int main() { char ss[100][20] = {"这", "是", "一", "个", "数", "组"}; char temp[20]; int i = 0; while(strcpy(temp, ss[i++])[0] != '\0') { printf("%s ", temp); .原创 2021-03-08 11:53:56 · 1490 阅读 · 3 评论 -
01背包回溯法非递归
#include<iostream>#define MAXN 20using namespace std;int maxv = 0;int x[MAXN] = {-1};void dfs(int w[],int v[],int n,int W){ int i=1; int tw=0; int tv=0; x[i] = -1; while(i>=1){...原创 2019-05-28 11:29:54 · 1235 阅读 · 1 评论