Unformatted text preview: wins2 = 0; ties = 0; % Check stats wins1 = wins1 + length(find(records == 1)); wins2 = wins2 + length(find(records == 2)); ties = ties + length(find(records == 0)); perc1 = wins1/iters*100; perc2 = wins2/iters*100; perc0 = ties/iters; % Display statistics disp (['Out of ' num2str(iters) ' games']) disp (['Robot 1 won: ' num2str(perc1) ' percent, with ' num2str(wins1) ' games.']) disp (['Robot 2 won: ' num2str(perc2) ' percent, with ' num2str(wins2) ' games.']) disp ([num2str(perc0) ' percent of the games tied, at ' num2str(ties) ' games.'])...
View Full Document
This note was uploaded on 11/16/2009 for the course ENGIN 7 taught by Professor Horowitz during the Spring '08 term at Berkeley.
- Spring '08