scoring.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:AI-Fight-the-Landlord 作者: YoungGer 项目源码 文件源码
def score_from_local(directory):
    """Calculate score from a local results directory"""
    results = gym.monitoring.load_results(directory)
    # No scores yet saved
    if results is None:
        return None

    episode_lengths = results['episode_lengths']
    episode_rewards = results['episode_rewards']
    episode_types = results['episode_types']
    timestamps = results['timestamps']
    initial_reset_timestamp = results['initial_reset_timestamp']
    spec = gym.spec(results['env_info']['env_id'])

    return score_from_merged(episode_lengths, episode_rewards, episode_types, timestamps, initial_reset_timestamp, spec.trials, spec.reward_threshold)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号