def rotate_sticky_actions(sticky_actions_state, config):
  """Rotate the sticky bits of directional actions.

  This is used to make a policy believe it is playing from left to right
  although it is actually playing from right to left.

  Args:
    sticky_actions_state: Array of bits corresponding to the active actions.
    config: config used by the environment

  Returns:
    Array of bits corresponding to the same active actions for a player
    who would play from the opposite side.
  """
  sticky_actions = football_action_set.get_sticky_actions(config)
  assert len(sticky_actions) == len(sticky_actions_state), len(sticky_actions)
  action_to_state = {}
  for i in range(len(sticky_actions)):
    action_to_state[sticky_actions[i]] = sticky_actions_state[i]
  rotated_sticky_actions = []
  for i in range(len(sticky_actions)):
    rotated_sticky_actions.append(action_to_state[flip_single_action(
        sticky_actions[i], config)])
  return rotated_sticky_actions
Rotate the sticky bits of directional actions.

  This is used to make a policy believe it is playing from left to right
  although it is actually playing from right to left.

  Args:
    sticky_actions_state: Array of bits corresponding to the active actions.
    config: config used by the environment

  Returns:
    Array of bits corresponding to the same active actions for a player
    who would play from the opposite side.
  
gfootball/env/observation_rotation.py