@staticmethod
def get_rewards(agents, game_type, step_count, max_steps):
    print('get_rewards called..', self.training_agent)

    def any_lst_equal(lst, values):
        'Checks if list are equal'
        return any([(lst == v) for v in values])
    alive_agents = [num for (num, agent) in enumerate(agents) if agent.is_alive]
    if (game_type == constants.GameType.FFA):
        if (len(alive_agents) == 1):
            return [((2 * int(agent.is_alive)) - 1) for agent in agents]
        elif (step_count >= max_steps):
            return ([(- 1)] * 4)
        else:
            return [(int(agent.is_alive) - 1) for agent in agents]
    elif any_lst_equal(alive_agents, [[0, 2], [0], [2]]):
        return [1, (- 1), 1, (- 1)]
    elif any_lst_equal(alive_agents, [[1, 3], [1], [3]]):
        return [(- 1), 1, (- 1), 1]
    elif (step_count >= max_steps):
        return ([(- 1)] * 4)
    elif (len(alive_agents) == 0):
        return ([(- 1)] * 4)
    else:
        return ([0] * 4)
@staticmethod
def get_rewards(agents, game_type, step_count, max_steps):
    print('get_rewards called..', self.training_agent)

    def any_lst_equal(lst, values):
        'Checks if list are equal'
        return any([(lst == v) for v in values])
    alive_agents = [num for (num, agent) in enumerate(agents) if agent.is_alive]
    if (game_type == constants.GameType.FFA):
        if (len(alive_agents) == 1):
            return [((2 * int(agent.is_alive)) - 1) for agent in agents]
        elif (step_count >= max_steps):
            return ([(- 1)] * 4)
        else:
            return [(int(agent.is_alive) - 1) for agent in agents]
    elif any_lst_equal(alive_agents, [[0, 2], [0], [2]]):
        return [1, (- 1), 1, (- 1)]
    elif any_lst_equal(alive_agents, [[1, 3], [1], [3]]):
        return [(- 1), 1, (- 1), 1]
    elif (step_count >= max_steps):
        return ([(- 1)] * 4)
    elif (len(alive_agents) == 0):
        return ([(- 1)] * 4)
    else:
        return ([0] * 4)