Skip to content

Core_Inputs

inXS212 edited this page Mar 26, 2018 · 2 revisions

Related files: Feature Creator Input Formatter

In order to improve performance, we do not only use all the values the game_tick_packet gives us, but we also generate some other inputs which can give the bot an advantage. Below is at first the all the info of the game_tick_packet with their corresponding index in the array, and beneath that there are the extra features we added.

Game values: (self refers to the bot, sorted by index in array, can also be found at input_formatter.py)

  1. game_tick_packet.gameInfo.bBallHasBeenHit
  2. game_tick_packet.gamecars[self.index].Score.Score
  3. game_tick_packet.gamecars[self.index].Score.Goals
  4. game_tick_packet.gamecars[self.index].Score.OwnGoals
  5. game_tick_packet.gamecars[self.index].Score.Assists
  6. game_tick_packet.gamecars[self.index].Score.Saves
  7. game_tick_packet.gamecars[self.index].Score.Shots
  8. game_tick_packet.gamecars[self.index].Score.Demolitions
  9. FrameScoreDifference: the change in score from the last frame to current one. -1 if enemy scores, 1 if your team scores, 0 otherwise
  10. game_tick_packet.gamecars[self.index].Location.X
  11. game_tick_packet.gamecars[self.index].Location.Y
  12. game_tick_packet.gamecars[self.index].Location.Z
  13. float(game_tick_packet.gamecars[self.index].Rotation.Pitch)
  14. float(game_tick_packet.gamecars[self.index].Rotation.Yaw)
  15. float(game_tick_packet.gamecars[self.index].Rotation.Roll)
  16. game_tick_packet.gamecars[self.index].Velocity.X
  17. game_tick_packet.gamecars[self.index].Velocity.Y
  18. game_tick_packet.gamecars[self.index].Velocity.Z
  19. game_tick_packet.gamecars[self.index].AngularVelocity.X
  20. game_tick_packet.gamecars[self.index].AngularVelocity.Y
  21. game_tick_packet.gamecars[self.index].AngularVelocity.Z
  22. game_tick_packet.gamecars[self.index].bOnGround
  23. game_tick_packet.gamecars[self.index].bSuperSOnic
  24. game_tick_packet.gamecars[self.index].bDemolished
  25. game_tick_packet.gamecars[self.index].bJumped
  26. game_tick_packet.gamecars[self.index].bDoubleJumped
  27. game_tick_packet.gamecars[self.index].Team
  28. game_tick_packet.gamecars[self.index].Boost
  29. a 1 or a 0 if this car last touched the ball
  30. game_tick_packet.gameball.Location.X
  31. game_tick_packet.gameball.Location.Y
  32. game_tick_packet.gameball.Location.Z
  33. float(game_tick_packet.gameball.Rotation.Pitch)
  34. float(game_tick_packet.gameball.Rotation.Yaw)
  35. float(game_tick_packet.gameball.Rotation.Roll)
  36. game_tick_packet.gameball.Velocity.X
  37. game_tick_packet.gameball.Velocity.Y
  38. game_tick_packet.gameball.Velocity.Z
  39. game_tick_packet.gameball.AngularVelocity.X
  40. game_tick_packet.gameball.AngularVelocity.Y
  41. game_tick_packet.gameball.AngularVelocity.Z
  42. game_tick_packet.gameball.Acceleration.X
  43. game_tick_packet.gameball.Acceleration.Y
  44. game_tick_packet.gameball.Acceleration.Z
  45. game_tick_packet.gameball.LatestTouch.sHitLocation.X
  46. game_tick_packet.gameball.LatestTouch.sHitLocation.Y
  47. game_tick_packet.gameball.LatestTouch.sHitLocation.Z
  48. game_tick_packet.gameball.LatestTouch.sHitNormal.X
  49. game_tick_packet.gameball.LatestTouch.sHitNormal.Y
  50. game_tick_packet.gameball.LatestTouch.sHitNormal.Z

There are now 5 times 17 values, only writing them out once. You got 2 times teammates (lowest indexed first) and then 3 opponents (again from low to high index). If it is a 1v1 or 2v2 match, all values for that car get a value of 0

  1. game_tick_packet.gamecars[index].Location.X
  2. game_tick_packet.gamecars[index].Location.Y
  3. game_tick_packet.gamecars[index].Location.Z
  4. float(game_tick_packet.gamecars[index].Rotation.Pitch)
  5. float(game_tick_packet.gamecars[index].Rotation.Yaw)
  6. float(game_tick_packet.gamecars[index].Rotation.Roll)
  7. game_tick_packet.gamecars[index].Velocity.X
  8. game_tick_packet.gamecars[index].Velocity.Y
  9. game_tick_packet.gamecars[index].Velocity.Z
  10. game_tick_packet.gamecars[index].AngularVelocity.X
  11. game_tick_packet.gamecars[index].AngularVelocity.Y
  12. game_tick_packet.gamecars[index].AngularVelocity.Z
  13. game_tick_packet.gamecars[index].bDemolished
  14. game_tick_packet.gamecars[index].bJumped
  15. game_tick_packet.gamecars[index].bDoubleJumped
  16. game_tick_packet.gamecars[index].Team
  17. game_tick_packet.gamecars[index].Boost
  18. a 1 or a 0 if this car last touched the ball ...

From here the list is filled with information about the boost pads (bActive and Timer), only writing it out once

  1. game_tick_packet.gameBoosts[i].bActive
  2. game_tick_packet.gameBoosts[i].Timer

From here is a list of features that are not stored in replays but are instead calculated on the fly in the model they are appended to the end of the list but are returned as a separate array so indexes are restarting

  1. The difference in radians along the horizontal plane between the direction the car is facing and the ball. This number should be between -π and π
  2. The distance from the player car to the ball W.I.P. Still got to add the extra values.

If you are looking at replays it has one array with the above in it Then a second array with the output in it These 2 together make a single frame The output array has the controls given in the exact same format as they are outputted by get_bot_output

Clone this wiki locally