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.9961500.0004
20.999970.49810.0004
3(1 I)10.75020.12493
410.874370.28007
510.937030.4294
6(2 I)10.968430.55695
710.984010.65907
810.992060.74099
9(3 I)10.995930.80358
1010.997990.85187
1110.998890.88856
12(4 I)10.999410.91625
1310.99970.93717
1410.999840.95298
15(5 I)10.999950.96478
1610.999990.97388
17110.98071
18(6 I)110.98593
19110.98959
20110.99232
21(7 I)110.99428
22110.99572
23110.99677
24(8 I)110.99766
25110.99834
26110.99876
27(9 I)110.99921
28110.99955
29110.99983
30(10 I)111



And again, with +1/256 to each chance.
TurnLv 1Lv 2Lv 3
1100.00045
210.504820.00045
3(1 I)10.753840.1281
410.87750.28699
510.938870.43777
6(2 I)10.969580.56353
710.984830.66635
810.992230.74858
9(3 I)10.996020.81107
1010.998150.85944
1110.999130.89523
12(4 I)10.999590.92206
1310.999790.94212
1410.999890.95679
15(5 I)10.999920.96776
1610.999960.97552
1710.999970.9817
18(6 I)10.999980.98635
19110.98977
20110.99259
21(7 I)110.99438
22110.99583
23110.99688
24(8 I)110.99785
25110.99846
26110.99888
27(9 I)110.99925
28110.99961
29110.99983
30(10 I)111