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.9957800.00059
20.999980.496490.00059
3(1 I)10.74980.12485
410.874940.27975
510.93670.42831
6(2 I)10.968190.55643
710.984310.65975
810.991890.7397
9(3 I)10.995840.80223
1010.997790.84998
1110.998840.88727
12(4 I)10.999420.9157
1310.999750.93679
1410.99990.95191
15(5 I)10.999960.96449
1610.999970.97341
1710.999980.97976
18(6 I)10.999990.98497
19110.98834
20110.99107
21(7 I)110.99341
22110.99508
23110.9965
24(8 I)110.99769
25110.9985
26110.99893
27(9 I)110.99929
28110.99963
29110.99983
30(10 I)111



And again, with +1/256 to each chance.
TurnLv 1Lv 2Lv 3
1100.00046
210.50520.00046
3(1 I)10.754170.12813
410.877570.2864
510.938760.43675
6(2 I)10.969210.56378
710.984540.66667
810.992440.74595
9(3 I)10.996060.80894
1010.998230.8568
1110.999070.89361
12(4 I)10.99940.92089
1310.999730.94117
1410.999870.95621
15(5 I)10.999930.96717
1610.999960.97538
1710.999980.98123
18(6 I)10.999990.98611
19110.98957
20110.99249
21(7 I)110.99427
22110.99599
23110.99722
24(8 I)110.99799
25110.99856
26110.99903
27(9 I)110.99936
28110.99967
29110.99989
30(10 I)111