-
Notifications
You must be signed in to change notification settings - Fork 432
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
Finding the discrete to continuous action translation #589
Comments
Why isn't it
|
Yes, it is called in ALEState::applyActionPaddles. delta_a = static_cast<int>(PADDLE_DELTA * fabs(paddle_a_strength));
updatePaddlePositions(event, delta_a, delta_b); And in u: void ALEState::updatePaddlePositions(Event* event, int delta_left,
int delta_right) {
m_left_paddle += delta_left;
... Thus, I started printing (with I also looked into: void ALEState::setPaddles(Event* event, int left, int right) {
m_left_paddle = left;
m_right_paddle = right;
// Compute the "resistance" (this is for vestigal clarity)
int left_resistance = calcPaddleResistance(m_left_paddle);
int right_resistance = calcPaddleResistance(m_right_paddle);
// Update the events with the new resistances
event->set(Event::PaddleZeroResistance, left_resistance);
event->set(Event::PaddleOneResistance, right_resistance);
} But it seems that this resistance is then never used. As the delta I see applied are constant. |
Shouldn't you care about |
Hi, I am trying to understand how the inputted action changes the state in Pong and Breakout.
I know that these games were usually controlled using the knob controller (cf here on the right of the image).
Such a controller directly provides the position of the paddle. As ALE uses by default discrete actions, these are translated to continuous ones in this environment. Thus, a state of the Paddle is maintained somewhere. ALE takes in the action, modifies the speed or the acceleration of the Paddle, and thus update the position of the paddle, sent to the game.
I am looking for the function that match this Paddle_state + action to the paddle position.
I have been looking into src/ale/environment/ale_state.cpp, but could not find the matching function.
Do you know where it is executed ?
The text was updated successfully, but these errors were encountered: