18-Dec-2022 21:35:37 locker_simulation_test() MATLAB/Octave version 4.2.2 Test several strategies for the locker puzzle. strategy1_test(): Each player simply opens lockers at random. They may even open some lockers several times. Number of lockers was 100 Number of players was 100 Number of lockers a player can check 50 Number of trials was 1000 Success rate = number of players who found wallet / number of players. Minimum = 0.23 Maximum = 0.55 Mean = 0.39542 Variance = 0.00245248 All players found their wallets 0 times out of 1000 strategy2_test(): Each player opens lockers based on a random list. However, this list has no duplicates. Number of lockers was 100 Number of players was 100 Number of lockers a player can check 50 Number of trials was 1000 Success rate = number of players who found wallet / number of players. Minimum = 0.34 Maximum = 0.65 Mean = 0.4987 Variance = 0.00249761 All players found their wallets 0 times out of 1000 strategy3_test(): Each player starts at their own locker. Next try the locker corresponding to the wallet they found. Number of lockers was 100 Number of players was 100 Number of lockers a player can check 50 Number of trials was 1000 Success rate = number of players who found wallet / number of players. Minimum = 0 Maximum = 1 Mean = 0.47553 Variance = 0.123094 All players found their wallets 281 times out of 1000 strategy4_test(): Each player starts at a random locker. Next try the locker corresponding to the wallet they found. Number of lockers was 100 Number of players was 100 Number of lockers a player can check 50 Number of trials was 1000 Success rate = number of players who found wallet / number of players. Minimum = 0.11 Maximum = 0.65 Mean = 0.37216 Variance = 0.00708802 All players found their wallets 0 times out of 1000 locker_simulation_test() Normal end of execution. 18-Dec-2022 21:43:44