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.9959700.00049
20.999980.498730.00049
3(1 I)10.749170.12515
410.874470.28165
510.937320.43058
6(2 I)10.968970.55708
710.984620.66184
810.991930.74235
9(3 I)10.995850.80431
1010.997960.85308
1110.998970.88952
12(4 I)10.99950.91709
1310.999720.93822
1410.99980.95349
15(5 I)10.999870.96532
1610.999930.97414
1710.999960.98063
18(6 I)10.999980.98565
1910.999990.9895
20110.99205
21(7 I)110.99408
22110.99564
23110.99689
24(8 I)110.99777
25110.99835
26110.99893
27(9 I)110.99941
28110.99968
29110.99987
30(10 I)111



And again, with +1/256 to each chance.
TurnLv 1Lv 2Lv 3
1100.00045
210.503920.00045
3(1 I)10.755790.12724
410.878790.28803
510.939520.43909
6(2 I)10.970090.56559
710.985360.66741
810.992920.74809
9(3 I)10.996350.81041
1010.998110.85717
1110.999030.89228
12(4 I)10.999540.9196
1310.999770.93962
1410.999880.95444
15(5 I)10.999940.96578
1610.999970.97495
1710.999990.98127
18(6 I)10.999990.98594
1910.999990.98978
2010.999990.99249
21(7 I)110.99471
22110.99607
23110.99726
24(8 I)110.99802
25110.9987
26110.99923
27(9 I)110.99956
28110.99973
29110.9999
30(10 I)111