LARG / HFO

Half Field Offense in Robocup 2D Soccer
MIT License
230 stars 93 forks source link

How to change the playable area in HFO? #76

Closed kxxwz closed 5 years ago

kxxwz commented 5 years ago

Hi @mhauskn ! As is written in your paper, HFO is built on RoboCup 2D simulator by Hidehisa Akiyama, and you restricted the playable area to half of the entire field. I want to solve the problem using just sparse rewards, and I think the current size of the playable area, i.e. the half field, is still too large for quickly prototyping algorithms. Thus I want to further restrict the playable area, say to the penalty area. I looked through the HFO code, but still don't know how to do it? Could you give me some clues? Thanks a lot.

mhauskn commented 5 years ago

Here's a pointer to the decision logic used to decide when the ball is out of bounds:

https://github.com/mhauskn/rcssserver/blob/master/src/referee.cpp#L3058

You could implement a command line argument similar to the "ball_x_min/ball_x_max/ball_y_min/ball_y_max" to define the playable area instead of the ball initialization region. For reference these hook into the code at the following point:

https://github.com/mhauskn/rcssserver/blob/master/src/referee.cpp#L3231

Hope this helps!

kxxwz commented 5 years ago

Great! Thanks a lot for your reply!

kxxwz commented 5 years ago

For those who want to do the same thing, here is my example. You only need to do the following:

mhauskn commented 5 years ago

Thank you for the informative writeup!