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.9957600.00045
20.999990.499870.00045
3(1 I)10.750720.12614
410.873680.28303
510.936930.43211
6(2 I)10.96860.5584
710.984250.662
810.992610.74209
9(3 I)10.996310.80578
1010.99810.85373
1110.999080.8909
12(4 I)10.999570.91797
1310.999790.9382
1410.999930.95392
15(5 I)10.999950.96518
1610.999980.97396
1710.999990.98035
18(6 I)110.98541
19110.98898
20110.99185
21(7 I)110.99385
22110.9955
23110.99674
24(8 I)110.99744
25110.99826
26110.99889
27(9 I)110.99939
28110.99971
29110.99987
30(10 I)111



And again, with +1/256 to each chance.
TurnLv 1Lv 2Lv 3
1100.00027
210.504140.00027
3(1 I)10.755970.12871
410.879720.28839
510.941230.43852
6(2 I)10.970740.56683
710.98530.67101
810.992730.74977
9(3 I)10.996150.81241
1010.998070.8598
1110.998970.89446
12(4 I)10.999460.92112
1310.999790.94068
1410.999920.95577
15(5 I)10.999980.96694
1610.999980.97518
1710.999980.9817
18(6 I)110.98659
19110.99021
20110.99279
21(7 I)110.99484
22110.9963
23110.99741
24(8 I)110.99813
25110.99865
26110.99916
27(9 I)110.99958
28110.99976
29110.99989
30(10 I)111