In order to test methods, you have to supply problems for which you know the
correct answers.
|
|
Best strategy for Max: [0.708, 0.291]
Best strategy for Min: [0.624, 0.375] |
|
|
Best strategy for Max: [0.5, 0.5]
Best strategy for Min: [0.5, 0.5] |
|
|
Best strategy for Max: [0.583, 0.417]
Best strategy for Min: [0.583, 0.417] |
|
|
Best strategy for Max: [0.75, 0.25]
Best strategy for Min: [0.5, 0.5] |
|
|
Best strategy for Max: [0.75, 0.25]
Best strategy for Min: [0.375, 0.625] |
|
|
Best strategy for Max: [0.333, 0.333, 0.332]
Best strategy for Min: [0.333, 0.333, 0.333] |
|
-9
|
12
|
-6
|
|
7
|
14
|
5
|
10
|
-8
|
3
|
|
6
|
17
|
-10
|
|
This array has a saddle point at row 1, column 2 |
|
|
Best strategy for Max: [0.5, 0.5]
Best strategy for Min: [0.5, 0.0, 0.5]
|
|
|
Best strategy for Max: [0.5, 0.0, 0.5]
Best strategy for Min: [0.5, 0.5] |
|
|
Best strategy for Max: [0.25, 0.125, 0.625]
Best strategy for Min: [0.333, 0.333, 0.333] |
|
-2
|
-1
|
0
|
0
|
1
|
2
|
|
1
|
2
|
-3
|
-3
|
2
|
1
|
|
-1
|
2
|
0
|
0
|
-2
|
-1
|
|
0
|
3
|
2
|
2
|
1
|
-2
|
|
Best strategy for Max: [0.221, 0.333, 0.0, 0.444]
Best strategy for Min: [0.389, 0.0, 0.277, 0.0, 0.0, 0.333]
This is not a good array to use for JUnit testing, because columns 2
and 3 are identical. You don't care which column the program chooses,
so you shouldn't test which one it chooses.
On the other hand, you could make a useful test out of this game by eliminating
one of those columns.
|