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

Smart GridWorldSim using actors and automated step processing #419

Open
rusu24edward opened this issue Aug 8, 2023 · 0 comments
Open

Smart GridWorldSim using actors and automated step processing #419

rusu24edward opened this issue Aug 8, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@rusu24edward
Copy link
Collaborator

rusu24edward commented Aug 8, 2023

In #72 we automated the observers, states, and dones, but we did not do actors because the step function cannot be easily consolidated into a simple format. After we do #337, we should have a better idea of how to streamline the action processing.

    # Note: This is the theoretical approach we could take in stepping the simulation.
    # The first 4 lines are boilerplate and good to have in this super class.
    # After that, the result is unique to the actor. The output may be different, and
    # what the simulation should do with that output is also different. This
    # could be streamlined after we do #337. For now, we leave it up to the subclass
    # to implement the actors and step function.
    # def step(self, action_dict, **kwargs):
    #     if not self._warning_issued:
    #         raise UserWarning("It is best practice to implement your own step function.")
    #     for actor in self._actors:
    #         for agent_id, action in action_dict.items():
    #             agent = self.agents[agent_id]
    #             if agent.active:
    #                 result = actor.process_action(agent, action, **kwargs)
    #                 if result: # Positive result
    #                     self.rewards[agent_id] += 1
    #                 else:
    #                     self.rewards[agent_id] -= 0.1

    #     for agent_id in action_dict:
    #         self.rewards[agent_id] -= 0.01

To be done after #337

@rusu24edward rusu24edward added the enhancement New feature or request label Aug 8, 2023
@rusu24edward rusu24edward added this to the Coming... eventually milestone Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant