read "CommonPayoffNash.txt": #The user may choose any list L:=[m,n], and any natural number N that they may wish, #though excessively large values may take some time. The variable names should be #changed to reflect these choices. The default settings here are L:=[4,4] and N:=1000 #in order to demonstrate the suffix choices on the variable and file names. L:=[4,4]: N:=1000: sigfigs:=10: timeatzero:=time[real](): CommonPayoffDataL44N1000:=op(CommonDataGen(L,N)): timeatfinish:=time[real]()-timeatzero: writeto("CommonPayoffDataL44N1000.txt"): printf("This text file contains a small selection of information concerning the distribution of the number of Nash equilibria derivable from the Maple file 'CommonPayoffDataL44N1000.m'."): printf("\n"): printf("\n"): printf("\n"): printf("The script that generated this file ran an experiment on N:="): printf(%a,N): printf(" games determined by L:="): printf(%a,L): printf(", and took "): printf(%a,timeatfinish): printf(" seconds to complete."): printf("\n"): printf("\n"): printf("\n"): printf("Below, you will find a raw count of the number of times a given number of pure Nash equilibira appeared during the experiment:"): for i from 1 to min(L) do printf("\n"): printf("\n"): printf("Total number of Nash equilibria: "): printf(%a,i): printf("\n"): printf("Number of games: "): if evalb(whattype(CommonPayoffDataL44N1000[i])=indexed) then printf("0"): else printf(%a,CommonPayoffDataL44N1000[i]): fi: od: printf("\n"): printf("\n"): printf("\n"): printf("Normalizing these counts with respect to the total number of games gives us an approximation of the probability distribution in question."): for i from 1 to min(L) do printf("\n"): printf("\n"): printf("Total number of Nash equilibria: "): printf(%a,i): printf("\n"): printf("Approximate probability: "): if evalb(whattype(CommonPayoffDataL44N1000[i])=indexed) then printf("0"): else printf(%a,evalf[sigfigs](CommonPayoffDataL44N1000[i]/N)): fi: od: save CommonPayoffDataL44N1000, "CommonPayoffDataL44N1000.m":