(*strategy_lists)
return merged_strategies
Utility function for merging. Does the merge operation on lists of strategies
Utility function for merging. Does the merge operation on lists of strategies
Utility function for merging . Does the merge operation on lists of strategies
def _merge_strategies(*strategy_lists):
        """
        Utility function for merging. Does the merge operation on lists of strategies
        """
        if len(set(len(sl) for sl in strategy_lists)) != 1:
            raise SimMergeError("unable to merge memories with amounts of strategies")

        merged_strategies = [ ]
        for strategies in zip(*strategy_lists):
            if len(set(s.__class__ for s in strategies)) != 1:
                raise SimMergeError("unable to merge memories with different types of strategies")

            unique = list(set(strategies))
            if len(unique) > 1:
                unique[0].merge(unique[1:])
            merged_strategies.append(unique[0])
        return merged_strategies
def _merge_strategies ( * strategy_lists ) : if len ( set ( len ( sl ) for sl in strategy_lists ) ) != 1 : raise SimMergeError ( "unable to merge memories with amounts of strategies" ) merged_strategies = [ ] for strategies in zip ( * strategy_lists ) : if len ( set ( s . __class__ for s in strategies ) ) != 1 : raise SimMergeError ( "unable to merge memories with different types of strategies" ) unique = list ( set ( strategies ) ) if len ( unique ) > 1 : unique [ 0 ] . merge ( unique [ 1 : ] ) merged_strategies . append ( unique [ 0 ] ) return merged_strategies