-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature(rjy): add crowdsim env and related configs #208
base: main
Are you sure you want to change the base?
Conversation
""" | ||
from lzero.entry import train_muzero_with_gym_env as train_muzero | ||
|
||
train_muzero([main_config, create_config], seed=0, max_env_step=max_env_step) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
把train_muzero_with_gym_env相关的删除了吧
"nlon": 3600, | ||
"nlat": 2450, | ||
"human_num": 33, | ||
"dataset_dir": '/home/nighoodRen/CrowdSim/CrowdSim/envs/crowd_sim/dataset/NCSU/33 users.csv', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
删除个人信息,用相对路径代替
base_config = EasyDict({ | ||
"num_timestep": 120, # 120x15=1800s=30min | ||
"step_time": 15, # second per step | ||
"max_uav_energy": 359640, # 359640 J <-- 359.64 kJ (4500mah, 22.2v) 大疆经纬 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
优化注释,默认使用英文注释
|
||
|
||
class CrowdSim(gym.Env): | ||
metadata = {'render.modes': ['human']} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
增加overview注释,包括环境简介,环境特点,MDP定义,参考论文链接等相关信息
# ============================================================== | ||
|
||
CrowdSim_efficientzero_config = dict( | ||
exp_name= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code需要reformate一下
'step': self._env_info[env_id]['step'], | ||
'visit_entropy': visit_entropies_lst[env_id] / eps_steps_lst[env_id], | ||
} | ||
if timestep.info.get('performance_info') is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
注释说明这个分支是为了crowdsim环境写的
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2个分支简化一下,写成先固定的添加之前的info,然后判断如果有'performance_info',再扩充info dict
'visit_entropy': np.mean(visit_entropy), | ||
# 'each_reward': episode_reward, | ||
} | ||
if self._episode_info[0].get('mean_aoi') is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
类似上面的修改方法
self._policy.reset([env_id]) | ||
reward = t.info['eval_episode_return'] | ||
# 'performance_info' and 'episode_info' only choose one | ||
if 'performance_info' in t.info: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需要兼容之前的'episode_info'
'step': self._env_info[env_id]['step'], | ||
'visit_entropy': visit_entropies_lst[env_id] / eps_steps_lst[env_id], | ||
} | ||
if timestep.info.get('performance_info') is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description增加这个PR的功能介绍,以及实验的benchmark结果
No description provided.