#NEWLINE# def randomPolicy( Ts ) : #NEWLINE# #INDENT# ' Each action is equally likely. ' #NEWLINE# numA = len ( Ts ) #NEWLINE# dim = len ( Ts [ 0 ] ) #NEWLINE# return ( ( ones ( ( dim , numA ) ) / float ( numA ) ) , mean ( array ( Ts ) , axis = 0 ) )