mirror of
https://github.com/illiumst/marl-factory-grid.git
synced 2025-06-21 11:21:35 +02:00
add more efficient (lazy) experience queue implementation based on tensor, adjusted marl algorithms
This commit is contained in:
@ -6,7 +6,7 @@ from algorithms.utils import load_yaml_file, add_env_props, instantiate_class, l
|
||||
|
||||
|
||||
for i in range(0, 5):
|
||||
for name in ['mappo']:#['seac', 'iac', 'snac']:
|
||||
for name in ['snac', 'mappo', 'iac', 'seac']:
|
||||
study_root = Path(__file__).parent / name
|
||||
cfg = load_yaml_file(study_root / f'{name}.yaml')
|
||||
add_env_props(cfg)
|
||||
|
@ -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')
|
Reference in New Issue
Block a user