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.99600.00043
20.999990.500480.00043
3(1 I)10.750630.12544
410.875920.28147
510.937510.4298
6(2 I)10.96810.55603
710.984340.65922
810.992330.74037
9(3 I)10.996210.80438
1010.99830.85268
1110.999110.88856
12(4 I)10.999560.91763
1310.999830.93801
1410.999950.95275
15(5 I)10.999980.96482
1610.999980.97326
1710.999980.98015
18(6 I)10.999990.98507
19110.98871
20110.99161
21(7 I)110.99355
22110.99515
23110.99639
24(8 I)110.99744
25110.99825
26110.99873
27(9 I)110.99921
28110.9996
29110.99981
30(10 I)111



And again, with +1/256 to each chance.
TurnLv 1Lv 2Lv 3
1100.00037
210.506190.00037
3(1 I)10.754430.12995
410.877980.28631
510.93910.4378
6(2 I)10.970210.56369
710.985410.66734
810.9930.74908
9(3 I)10.99660.81119
1010.998430.85736
1110.999230.89385
12(4 I)10.999570.92042
1310.999760.94093
1410.999910.95602
15(5 I)10.999940.96723
1610.999970.97552
1710.999990.98159
18(6 I)10.999990.98615
1910.999990.9897
20110.99246
21(7 I)110.99445
22110.99591
23110.99711
24(8 I)110.998
25110.9985
26110.99899
27(9 I)110.99934
28110.99962
29110.99978
30(10 I)111