Skip to content
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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

nighood
Copy link
Collaborator

@nighood nighood commented Apr 8, 2024

No description provided.

@puyuan1996 puyuan1996 added the environment New or improved environment label Apr 8, 2024
"""
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)
Copy link
Collaborator

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相关的删除了吧

zoo/CrowdSim/envs/test_CrowdSim_env.py Show resolved Hide resolved
"nlon": 3600,
"nlat": 2450,
"human_num": 33,
"dataset_dir": '/home/nighoodRen/CrowdSim/CrowdSim/envs/crowd_sim/dataset/NCSU/33 users.csv',
Copy link
Collaborator

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) 大疆经纬
Copy link
Collaborator

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']}
Copy link
Collaborator

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=
Copy link
Collaborator

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:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注释说明这个分支是为了crowdsim环境写的

Copy link
Collaborator

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:
Copy link
Collaborator

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:
Copy link
Collaborator

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:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

description增加这个PR的功能介绍,以及实验的benchmark结果

@puyuan1996 puyuan1996 changed the title env(rjy): add crowdsim env feature(rjy): add crowdsim env and related configs Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
environment New or improved environment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants