def _get_fitness_diff(payoffs, num_players, player_changing, new_strat, base_strat):
    """
    Simple function for returning the difference between the payoffs of 2 strategies. 
    There is a difference in the calculation for 1 or more populations.    

    Arguments:
        payoffs {list of numpy arrays} -- The payoff matrices
        num_players {int} -- The number of populations
        player_changing {int} -- The player who is changing their strategy, needed to decide what payoff matrix to use.
        new_strat {tuple of ints} -- The new strategy we are considering. The tuple of indices to use for indexing the payoff matrix.
        base_strat {tuple of ints} -- The base strategy we are considering.
    
    Returns:
        Difference in payoffs [float] -- The difference in payoffs between the base and new strategy, used to calculate the probability of transitioning from base to new_strat.
    """
    M = payoffs
    if num_players == 1:
        return M[0][new_strat, base_strat] - M[0][base_strat, new_strat]
    else:
        n = player_changing
        return M[n][new_strat] - M[n][base_strat]