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.9962800.00048
20.999990.497920.00048
3(1 I)10.748620.12309
410.874810.28038
510.937540.42941
6(2 I)10.968640.55632
710.984410.65806
810.992280.73894
9(3 I)10.995940.80218
1010.997880.85047
1110.998970.88779
12(4 I)10.999420.91594
1310.99970.93763
1410.999850.95315
15(5 I)10.999890.96474
1610.999940.97338
17110.98004
18(6 I)110.9853
19110.98889
20110.99179
21(7 I)110.99402
22110.99573
23110.99701
24(8 I)110.99783
25110.99843
26110.99896
27(9 I)110.99929
28110.99962
29110.99985
30(10 I)111



And again, with +1/256 to each chance.
TurnLv 1Lv 2Lv 3
1100.00031
210.501940.00031
3(1 I)10.754420.12945
410.878180.28876
510.939790.44003
6(2 I)10.970220.56613
710.985180.66853
810.992660.75012
9(3 I)10.996390.81162
1010.99830.85889
1110.999240.89391
12(4 I)10.999590.91983
1310.999810.94038
1410.999940.95583
15(5 I)10.999970.9669
16110.97516
17110.98195
18(6 I)110.98662
19110.99028
20110.99294
21(7 I)110.99467
22110.99592
23110.99691
24(8 I)110.99771
25110.99849
26110.99896
27(9 I)110.99939
28110.9996
29110.99988
30(10 I)111