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

Add EESM to dq_to_abc_action_processor.py #231

Closed
bhk11 opened this issue Apr 19, 2024 · 0 comments
Closed

Add EESM to dq_to_abc_action_processor.py #231

bhk11 opened this issue Apr 19, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@bhk11
Copy link
Member

bhk11 commented Apr 19, 2024

The machine is currently missing in the action processor and, thus, raise an error.

Code which is missing:

# dq_to_abc_action_processor for EESM
@DqToAbcActionProcessor.register_transformation(['EESM'])
class _EESMDqToAbcActionProcessor(DqToAbcActionProcessor):
    @property
    def action_space(self):
        return gymnasium.spaces.Box(-1, 1, shape=(3,))

    def __init__(self, physical_system=None):
        super().__init__('epsilon', physical_system=physical_system)

    def simulate(self, action):
        # Docstring of superclass
        advanced_angle = self._advance_angle(self._state)
        abc_action = self._transformation(action[:-1], advanced_angle)
        abc_action = np.append(abc_action, action[-1])
        normalized_state = self._physical_system.simulate(abc_action)
        self._state = normalized_state * self._physical_system.limits
        return normalized_state
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

2 participants