google / evojax

Apache License 2.0
834 stars 85 forks source link

SlimeVolley initial ball velocity is incorrect #76

Open lowrollr opened 7 months ago

lowrollr commented 7 months ago

Small issue with game state initialization:

https://github.com/google/evojax/blob/67c90e1ad3655097ff7b56f4975d43ff30d8e49c/evojax/task/slimevolley.py#L794-L798

result[2] is out of bounds, which means it accesses the same value as result[1] -- and therefore ball_vx and ball_vy depend on the same value. This means the ball has higher y-vel when x-vel is positive, so the ball will be thrown higher to one player compared to the other.