Skip to content

Commit

Permalink
Final
Browse files Browse the repository at this point in the history
  • Loading branch information
yuwei97910 committed May 6, 2022
1 parent 6607aad commit 210c468
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 2 deletions.
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ Also, `GameBoard.generate_round_move` was called numerous times to generate all
### Compete between two random players for 1000 rounds:

Player 1 is the Smart Player and Player 2 is the Random Player:

```
Total Games: 1000
Total Time: 100.71785899999999
Expand All @@ -211,6 +210,25 @@ Draws: 0
From the result, we can see that the winning for Player 1 and Player 2 are both close to 50%.
There is no significant advantages for the player orders.

### Rnadom Players vs Smart Players:
Player 1: Smart Player, Player 2: Random Player
```
Total Games: 50
Total Time: 7744.0971930000005
Player 1 Total Wins: 33
Player 2 Total Looses: 17
Draws: 0
```

Player 1: Random Player, Player 2: Smart Player
```
Total Games: 50
Total Time: 8889.898646
Player 1 Total Wins: 19
Player 2 Total Wins: 30
Draws: 1
```

### Compete between two AI players for 50 rounds:

Both Player 1 and Player 2 are the Smart Player.
Expand Down
Binary file modified document_source/.DS_Store
Binary file not shown.
56 changes: 56 additions & 0 deletions document_source/performance_testing_p1r_p2s.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
test_round,winner,rounds,time_consumed
1,player_2,20,170.08276700000002
2,player_2,28,131.865244
3,player_1,37,282.178762
4,player_2,30,102.27488299999993
5,player_2,30,199.62330799999995
6,player_1,37,109.8438010000001
7,player_2,24,218.90581799999995
8,player_1,21,112.41920899999991
9,player_2,36,179.9366550000002
10,player_2,24,176.63649099999998
11,player_2,30,84.9849549999999
12,player_1,27,241.13063999999986
13,player_1,21,84.21903299999985
14,player_2,34,389.5937819999999
15,player_1,45,209.30429099999992
16,draw,25,237.27446099999997
17,player_2,44,234.71485900000016
18,player_2,30,127.3179140000002
19,player_1,29,114.07255099999975
20,player_2,22,81.56812200000013
21,player_1,43,134.89206300000023
22,player_2,30,192.81082700000024
23,player_2,22,270.2849040000001
24,player_2,18,194.26547300000038
25,player_2,30,169.12016500000027
26,player_2,36,106.90156699999989
27,player_1,17,108.76822000000084
28,player_1,29,87.57548399999996
29,player_2,40,260.70589500000006
30,player_2,24,257.19424999999956
31,player_1,35,202.44522299999971
32,player_2,32,199.16463300000032
33,player_1,19,407.36678199999915
34,player_1,19,106.11863799999992
35,player_2,22,204.8734860000004
36,player_2,24,113.02037100000052
37,player_2,24,139.3081030000003
38,player_1,31,86.12533100000019
39,player_1,15,169.17009000000053
40,player_1,39,142.9117980000001
41,player_2,24,139.65164399999958
42,player_2,32,217.59348300000056
43,player_1,29,173.50699499999973
44,player_1,27,242.18192500000077
45,player_2,28,279.8532839999998
46,player_2,36,264.75190699999985
47,player_2,22,98.13946700000088
48,player_2,14,134.45057200000156
49,player_1,35,128.74866099999963
50,player_2,34,170.04791999999907
Total Games: 50
Total Time: 8889.898646
Player 1 Total Wins: 19
Player 2 Total Wins: 30
Draws: 1
1 change: 0 additions & 1 deletion performance_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@

record.write((('Total Games: %s\n'% test_round)))
record.write((('Total Time: %s\n'% total_time)))
record.write((('Player 1: %s; Player 2: %s'% (ini_player_1.turn_player, ini_player_2.turn_player))))
record.write((('Player 1 Total Wins: %s\n'% p1_winning_cnt)))
record.write((('Player 2 Total Wins: %s\n'% p2_winning_cnt)))
record.write((('Draws: %s\n'% draw_cnt)))
Expand Down
Empty file removed performance_testing.txt
Empty file.

0 comments on commit 210c468

Please sign in to comment.