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.9961600.00051
20.999970.500720.00051
3(1 I)10.752440.12672
410.875570.28443
510.937350.43303
6(2 I)10.968150.55915
710.984480.66141
810.992450.7426
9(3 I)10.996320.8058
1010.998080.85334
1110.999050.88961
12(4 I)10.999550.91651
1310.999810.93741
1410.999930.95355
15(5 I)10.999980.96564
1610.999980.97439
17110.98086
18(6 I)110.98566
19110.98951
20110.99237
21(7 I)110.99441
22110.99588
23110.99697
24(8 I)110.9978
25110.99859
26110.99914
27(9 I)110.99946
28110.99963
29110.99982
30(10 I)111



And again, with +1/256 to each chance.
TurnLv 1Lv 2Lv 3
1100.00039
210.50630.00039
3(1 I)10.756330.12846
410.878530.28719
510.940540.43598
6(2 I)10.970860.56419
710.98560.6683
810.992570.74913
9(3 I)10.996480.81131
1010.998230.85955
1110.999140.89531
12(4 I)10.999570.92207
1310.999740.9421
1410.999850.95647
15(5 I)10.999970.96793
1610.999980.97669
1710.999980.98278
18(6 I)10.999990.98713
19110.99035
20110.99294
21(7 I)110.99487
22110.99629
23110.99723
24(8 I)110.99804
25110.99858
26110.99903
27(9 I)110.99935
28110.99964
29110.99988
30(10 I)111