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.9960800.00039
20.999970.497630.00039
3(1 I)10.748190.12465
410.873790.27982
510.936440.4267
6(2 I)10.968310.55337
710.983990.65781
810.991740.73826
9(3 I)10.995930.80236
1010.997960.85168
1110.999020.88864
12(4 I)10.999480.91615
1310.999810.93789
1410.999890.95339
15(5 I)10.999970.96454
1610.999990.97363
17110.98037
18(6 I)110.98542
19110.98921
20110.99218
21(7 I)110.99422
22110.99573
23110.99702
24(8 I)110.99791
25110.99858
26110.99908
27(9 I)110.99933
28110.99963
29110.99982
30(10 I)111



And again, with +1/256 to each chance.
TurnLv 1Lv 2Lv 3
1100.00045
210.505320.00045
3(1 I)10.752960.12879
410.875970.28803
510.937610.43736
6(2 I)10.969530.56281
710.985030.66607
810.992630.74724
9(3 I)10.996690.8081
1010.998310.85579
1110.999320.89214
12(4 I)10.999650.9191
1310.999780.93946
1410.999890.95508
15(5 I)10.999910.96676
1610.999920.97501
1710.999960.98152
18(6 I)10.999970.98619
1910.999990.9897
2010.999990.99244
21(7 I)110.99448
22110.9959
23110.99696
24(8 I)110.99767
25110.99839
26110.99899
27(9 I)110.99942
28110.99964
29110.99983
30(10 I)111