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.9961100.0004
20.999990.498620.0004
3(1 I)10.749080.12446
410.875830.28066
510.938240.43016
6(2 I)10.968970.55654
710.984310.66052
810.992420.7405
9(3 I)10.996540.80288
1010.998390.84942
1110.999230.88699
12(4 I)10.999610.91556
1310.999830.93687
1410.99990.95286
15(5 I)10.999950.96469
1610.999980.97329
17110.98014
18(6 I)110.98558
19110.98903
20110.99162
21(7 I)110.99365
22110.99553
23110.99689
24(8 I)110.9978
25110.99843
26110.99898
27(9 I)110.99942
28110.99968
29110.99986
30(10 I)111



And again, with +1/256 to each chance.
TurnLv 1Lv 2Lv 3
1100.0005
210.504010.0005
3(1 I)10.754590.12906
410.879410.28684
510.940370.43687
6(2 I)10.970340.56647
710.985590.66717
810.992850.74697
9(3 I)10.996250.80979
1010.997890.8575
1110.998930.89389
12(4 I)10.999410.92115
1310.999740.94111
1410.999890.95621
15(5 I)10.999940.96768
1610.999960.97571
1710.999980.98232
18(6 I)110.98669
19110.99035
20110.99294
21(7 I)110.99491
22110.99642
23110.99748
24(8 I)110.99825
25110.9988
26110.99924
27(9 I)110.99957
28110.99975
29110.99987
30(10 I)111