<filename>benchmark/toyctf_benchmark_print.py
import pickle
from typing import *
import matplotlib.pyplot as plt
plt.rcParams["font.sans-serif"]=["SimHei"] #设置字体
plt.rcParams["axes.unicode_minus"]=False #该语句解决图像中的“-”负号的乱码问题

from cyberbattle.agents.baseline.learner import TrainedLearner

all_runs:List[TrainedLearner]
with open("./toyctf_KG_test_P.pickle","rb") as f:
    all_runs = \
        pickle.load(f)

# "all_episodes_rewards"
# "all_episodes_availability"
# "learner"
# "trained_on"
# "title"

# titles = ["随机策略","凭证优先","Q-learning","Q-learning（完成训练）","DDQN","DDQN（完成训练）"]
titles = ["DDQN","DDQN（完成训练）","DDQN+知识图谱","DDQN+知识图谱（完成训练）"]
# for idx in range(len(all_runs)):
#     all_runs[idx]["title"] = titles[idx]

import cyberbattle.agents.baseline.plotting as p
p.plot_averaged_cummulative_rewards(all_runs=all_runs,title="大场景下的累计奖励")
