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 crowd md env new, and multi-head policy #230

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

Conversation

nighood
Copy link
Collaborator

@nighood nighood commented Jun 7, 2024

  1. New Environment: CrowdSim

    • Description: The CrowdSim environment is a grid world simulation where robots navigate through an environment populated with humans. The primary task for the robots is to minimize the average age of information (AoI) of the humans by moving to their locations and collecting data. Key features of the environment include:
      • Dynamic Interaction: Humans generate data at a constant rate, and robots must manage their limited energy supply while moving to collect this data.
      • Modes:
        • Easy Mode: Robots can only collect data from humans within a certain range, and collecting data resets the AoI of a human to zero.
        • Hard Mode: Robots can collect data from humans even when not within range, and collecting data does not reset the total AoI.
      • Initialization: The environment starts with a dataset of human locations and timestamps. Robots aim to minimize the average AoI by efficiently collecting data.
      • Completion Criteria: The environment is considered solved when the average AoI is minimized to a certain threshold or the time limit is reached.
      • Additional Features: Methods for resetting, closing, and stepping through the environment, seeding for reproducibility, saving replay videos, and generating random actions. Detailed properties for accessing observation space, action space, and reward space.
  2. Multi-Head Policy Version for MuZero, EfficientZero, and Sampled EfficientZero

    • Modification: Introduced multi-head policy versions for the MuZero, EfficientZero, and Sampled EfficientZero algorithms.

@puyuan1996 puyuan1996 added environment New or improved environment config New or improved configuration labels Jun 7, 2024
if observation_array.ndim == 3:
# Flatten the last two dimensions
observation_array = observation_array.reshape(batch_size, -1)
else:
raise ValueError("For 'mlp' model_type, the observation must have 3 dimensions [B, S, O]")

elif model_type == 'rgcn':
if observation_array.ndim == 4:
# TODO(rjy): strage process
Copy link
Collaborator

Choose a reason for hiding this comment

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

strage process是什么意思?

Copy link
Collaborator

Choose a reason for hiding this comment

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

解释一下'rgcn'下面各种情况的含义吧

activation: Optional[nn.Module] = nn.ReLU(inplace=True),
last_linear_layer_init_zero: bool = True,
norm_type: Optional[str] = 'BN',
self,
Copy link
Collaborator

Choose a reason for hiding this comment

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

bash format.sh一下

output_support_size: int = 601,
last_linear_layer_init_zero: bool = True,
activation: Optional[nn.Module] = nn.ReLU(inplace=True),
norm_type: Optional[str] = 'BN',
Copy link
Collaborator

Choose a reason for hiding this comment

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

这些缩进还是换成原来的格式哈

"""
Overview:
Relational graph convolutional network layer.
"""
Copy link
Collaborator

Choose a reason for hiding this comment

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

给一下这里代码实现的参考链接

Copy link
Collaborator

Choose a reason for hiding this comment

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

gcn的实验我们有测试吗?还是只是测试了md的情况?gcn相对md的优点是?目前我们合到main里面的只放完整测试过的吧

@ENV_REGISTRY.register('crowdsim_lightzero')
class CrowdSimEnv(BaseEnv):

def __init__(self, cfg: dict = {}) -> None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

增加overview注释

@ENV_REGISTRY.register('crowdsim_lightzero')
class CrowdSimEnv(BaseEnv):

def __init__(self, cfg: dict = {}) -> None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

增加overview注释,将之前的文档中英文版本放在这里的envs/路径下面哈



@MODEL_REGISTRY.register('MuZeroModelMD')
class MuZeroModelMD(nn.Module):
Copy link
Collaborator

Choose a reason for hiding this comment

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

所有增加的文件都需要继承自已有的文件,以避免冗余代码哈,只重写修改过的method。例如这里需要继承自MuZeroModel。相应的注释也需要更新一下。

"nlon": 200,
"nlat": 120,
"human_num": 59,
"dataset_dir": 'crowd_sim/dataset/purdue/59 users.csv', # TODO
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里3种大学的 不同数量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.

这个环境的代码是在哪篇论文和code上修改的呢

"""
Overview:
Relational graph convolutional network layer.
"""
Copy link
Collaborator

Choose a reason for hiding this comment

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

gcn的实验我们有测试吗?还是只是测试了md的情况?gcn相对md的优点是?目前我们合到main里面的只放完整测试过的吧


@ENV_REGISTRY.register('crowdsim_lightzero')
class CrowdSimEnv(BaseEnv):

Copy link
Collaborator

Choose a reason for hiding this comment

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

这个和crowdsim_env的区别是?应该只保留一个就好吧

print(CL)


# Maximum Coupling Loss (110dB is recommended)
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个是什么含义?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config New or improved configuration environment New or improved environment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants