rcsoccersim / rcssserver

The RoboCup Soccer Simulator Server
GNU Lesser General Public License v3.0
137 stars 52 forks source link

Weird clearFromBall calls from referee #51

Closed bandreghetti closed 3 years ago

bandreghetti commented 3 years ago

I was doing some single agent reinforcement learning research and noticed something strange ocurring. Might be my lack of knowledge about a specific rule.

The referee calls clearFromBall every 100 cycles for some reason, which teleports my agent away from the ball while it (slowly but surely) approaches it.

Here is a recording of it. Also here is a .rcl where it happens along with its .rcg but not from the same game as the recording. Not sure if those will help but there they are.

Am I doing something wrong?

herodrigues commented 3 years ago

What's your environment for testing? What server flags are you using?

hidehisaakiyama commented 3 years ago

The automatic referee tries to detect a not-moving ball to avoid a stuck situation. This feature can be disabled by changing the server parameter server::ball_stuck_area. Its default value is 3.0. This means the automatic referee drops the ball if he detects the ball move distance is less than or equal to 3.0m for server::drop_ball_time(=100) cycles. So, you should shrink the detection area. In your case, you can just set server::ball_stuck_area to 0.

bandreghetti commented 3 years ago

Thank you! That was it 😄