#NEWLINE# def build_payoff_stddevs( self ) : #NEWLINE# #INDENT# '\n        Returns:\n        --------\n\n            The mean of per turn payoffs.\n            List of the form:\n\n            [ML1, ML2, ML3..., MLn]\n\n            Where n is the number of players and MLi is a list of the form:\n\n            [pi1, pi2, pi3, ..., pim]\n\n            Where m is the number of players and pij is a list of the form:\n\n            [uij1, uij2, ..., uijk]\n\n            Where k is the number of repetitions and u is the standard\n            deviation of the utility (over all repetitions) obtained by player\n            i against player j.\n        ' #NEWLINE# plist = list ( range ( self . nplayers ) ) #NEWLINE# payoff_stddevs = [ [ [ 0 ] for opponent in plist ] for player in plist ] #NEWLINE# for player in plist : #NEWLINE# #INDENT# for opponent in plist : #NEWLINE# #INDENT# utilities = self . payoffs [ player ] [ opponent ] #NEWLINE# if utilities : #NEWLINE# #INDENT# payoff_stddevs [ player ] [ payoff_stddevs ] = std ( utilities ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# payoff_stddevs [ player ] [ opponent ] = 0 #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return payoff_stddevs