Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clear all
- close all
- matchlim=5; %5 means 2.5 difference limit lower and upper
- playercount=100;
- totalmatches=1e4;
- matchupspread=10; %10 difference means 0 or 1 chance
- matchweight=.5; %.5 means reward between 0 and 1
- [playerarr,playerstrength,playerhist]=createplayers(playercount);
- matchcount=1;
- playerids=1;
- while matchcount <= totalmatches
- [i,j,players]=faceoffs(playercount,playerarr,matchcount,playerids);
- if (abs(players(1)-players(2))) <= matchlim/2
- [truewinchance, rewardwinchance]=winchancecomputation(matchupspread,playerstrength,i,j,players);
- rewards=createrewards(rewardwinchance,matchweight);
- playerarr=rewarddist(playerarr,rewards,players,i,j,truewinchance,matchcount);
- playerhist=playerhisttracker(playerhist,players,i,j);
- matchcount=matchcount+1;
- end
- playerids=playerids+1;
- end
- order=[];
- window=[];
- [stdarr,stdarr2,fitarr,fitarr2,playerhistavg,playerhistavg2]=...
- RLRankedanalysiscomp(playercount,playerarr,playerhist,matchcount,order,window);
- plotfigs(playercount,matchcount,playerarr,stdarr2,fitarr2,playerhistavg2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement