add more efficient (lazy) experience queue implementation based on tensor, adjusted marl algorithms

This commit is contained in:
Robert Müller
2022-02-03 13:14:48 +01:00
parent b09c461754
commit a9a4274370
8 changed files with 243 additions and 165 deletions

View File

@ -3,12 +3,12 @@ from pathlib import Path
import matplotlib.pyplot as plt
import seaborn as sns
dfs = []
for name in ['l2snac', 'iac', 'snac', 'seac']:
for name in ['mappo']:
for c in range(5):
try:
study_root = Path(__file__).parent / name / f'{name}#{c}'
print(study_root)
df = pd.read_csv(study_root / 'results.csv', index_col=False)
df.reward = df.reward.rolling(100).mean()
df['method'] = name.upper()
@ -17,6 +17,6 @@ for name in ['l2snac', 'iac', 'snac', 'seac']:
pass
df = pd.concat(dfs).reset_index()
sns.lineplot(data=df, x='episode', y='reward', hue='method', palette='husl', ci='sd', linewidth=1.5)
sns.lineplot(data=df, x='steps', y='reward', hue='method', palette='husl', ci='sd', linewidth=1.5, err_style='bars')
plt.savefig('study.png')
print('saved image')