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.9960200.0005
20.999970.497960.0005
3(1 I)10.749330.1242
410.874810.2808
510.938320.42938
6(2 I)10.969430.55584
710.984840.65862
810.992670.74027
9(3 I)10.99650.80266
1010.998220.85251
1110.999040.88911
12(4 I)10.999550.91657
1310.999730.93774
1410.999830.95296
15(5 I)10.999910.96451
1610.999950.97285
1710.999960.9799
18(6 I)10.999980.98522
1910.999990.98907
2010.999990.99173
21(7 I)110.99413
22110.9958
23110.99689
24(8 I)110.99781
25110.99839
26110.99898
27(9 I)110.99932
28110.9996
29110.99984
30(10 I)111



And again, with +1/256 to each chance.
TurnLv 1Lv 2Lv 3
1100.00042
210.504580.00042
3(1 I)10.754210.12799
410.877510.28727
510.938870.44135
6(2 I)10.969720.56894
710.984880.67079
810.992510.75026
9(3 I)10.996290.81136
1010.998190.85819
1110.999150.89516
12(4 I)10.999590.92139
1310.999770.94139
1410.999880.95654
15(5 I)10.999940.96745
1610.999980.97562
1710.999990.98209
18(6 I)10.999990.98704
19110.99007
20110.99278
21(7 I)110.99475
22110.99621
23110.99722
24(8 I)110.99808
25110.99867
26110.99904
27(9 I)110.99935
28110.99971
29110.99986
30(10 I)111