This file will simulate the chances of your party getting hit with a tier three knowledge bomb after a certain number of turns. You start at tier zero, and the chances of leveling up each round are as follows:
0 => 1: 255/256
1 => 2: 50%
2 => 3: 25%

Basically, the AI learns what monsters are immune to after you hit level 3 and they will stop casting spells that have no chance of working.

TurnLv 1Lv 2Lv 3
10.9962100.00055
210.49660.00055
3(1 I)10.747730.12434
410.874380.2796
510.937360.43006
6(2 I)10.968460.55626
710.98470.65958
810.992030.74054
9(3 I)10.996150.80338
1010.998250.85072
1110.999290.88822
12(4 I)10.999650.91672
1310.999790.93703
1410.999890.95241
15(5 I)10.999930.96435
1610.999960.97337
1710.999970.9802
18(6 I)10.999970.98506
1910.999990.9888
2010.999990.99165
21(7 I)110.99384
22110.99549
23110.99674
24(8 I)110.9977
25110.99837
26110.99891
27(9 I)110.99926
28110.99956
29110.99978
30(10 I)111



And again, with +1/256 to each chance.
TurnLv 1Lv 2Lv 3
1100.00041
210.504050.00041
3(1 I)10.755730.12846
410.878620.28822
510.939840.43764
6(2 I)10.970.56545
710.985420.6682
810.992780.74867
9(3 I)10.99620.81038
1010.998120.85779
1110.998990.89372
12(4 I)10.999470.92086
1310.999730.94074
1410.99990.95649
15(5 I)10.999950.9678
1610.999970.97608
17110.98256
18(6 I)110.98716
19110.99044
20110.99268
21(7 I)110.99459
22110.99612
23110.99712
24(8 I)110.99786
25110.99838
26110.99897
27(9 I)110.99937
28110.99971
29110.99988
30(10 I)111