| Author |
Comment/Response |
Jonathan Wooldridge
|
07/16/07 03:00am
Hi,
I have a pair of lists representing plays in a two player game. My score function counts the number of pair-ups where player has more than enemy:
player = {17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 64};
score[enemy_]:= Count[player-enemy, x_/;x>0];
Which I then map across a list of player strategies like so:
totalScore = Map[score, strategySet]//Sort//Tally
ListLinePlot[totalScore,Filling->Axis];
What I want to do next is score[player_,enemy_], but how do I Map that across the strategySet?
More technically, if x and y are integer lists (of same length) how can can I map f[x,y] across a list of values for y?
URL: http://home.comcast.net/hat.html, |
|