We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
8161d7d#diff-b2657ab36b5d46d0f112f0c7d20e3026e4d50c8a0e260e5669002d229e5f027cR544
the newly added line 543 of box2d/car_racing.py always fails to run non-continuous action.
Replacing the type casting may be helpful:
#line 540 def step(self, action: Union[np.ndarray, int]): assert self.car is not None if action is not None: if self.continuous: action = action.astype(np.float64) self.car.steer(-action[0]) self.car.gas(action[1]) self.car.brake(action[2]) else: if not self.action_space.contains(action): raise InvalidAction( f"you passed the invalid action `{action}`. " f"The supported action_space is `{self.action_space}`" ) self.car.steer(-0.6 * (action == 1) + 0.6 * (action == 2)) self.car.gas(0.2 * (action == 3)) self.car.brake(0.8 * (action == 4))
No response
The text was updated successfully, but these errors were encountered:
Could you make a PR fixing this along with a test about it?
Sorry, something went wrong.
No branches or pull requests
Describe the bug
8161d7d#diff-b2657ab36b5d46d0f112f0c7d20e3026e4d50c8a0e260e5669002d229e5f027cR544
the newly added line 543 of box2d/car_racing.py always fails to run non-continuous action.
Code example
Replacing the type casting may be helpful:
System info
No response
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: