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

environement.step() reset action #39

Closed
luvf opened this issue May 6, 2019 · 4 comments
Closed

environement.step() reset action #39

luvf opened this issue May 6, 2019 · 4 comments

Comments

@luvf
Copy link

luvf commented May 6, 2019

from runner.log : lines 81-84

action = self.agent.act(observation)
observation, reward_aslist, done, info = self.environment.step(action, do_sum=False)

when action is object Action (and not array)
after environement.step(..)
the action is reset to the Do_Nothing action

Note that the action is applied.

but it is a bit inconsistent
and when,t action is an np.array this doesn't happen.

@MarvinLer
Copy link
Owner

MarvinLer commented May 6, 2019

What is the problem here? The reset of the Action into do-nothing ? Maybe the simulator changed the action because:

  • there are illegal activations of on-cooldown switches
  • there are more activated elements than tolerated, in that case the action is indeed converted into a do-nothing

As for the difference with np array, this is because you cannot change a np array by reference in python, but an object passed as reference can be modified within a function.

Do you mean in both case the action object of the agent should be replaced in-place or not replaced at all ?

@luvf
Copy link
Author

luvf commented May 6, 2019

as far as I know the action applied is legal : for (GreedySearch, and an expert agent)
happens at each timestep (even the first one (no cooldown))

I think the object shouldn't be modified.

@MarvinLer
Copy link
Owner

MarvinLer commented May 6, 2019 via email

@MarvinLer
Copy link
Owner

This should be fixed in 536100b, can you confirm ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants