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.9957800.0005
20.999970.497710.0005
3(1 I)10.749120.12538
410.874780.2818
510.937910.42915
6(2 I)10.969530.55577
710.984770.65862
810.992730.74034
9(3 I)10.996690.80283
1010.998490.85114
1110.999160.88778
12(4 I)10.999570.9157
1310.999830.9378
1410.999920.95352
15(5 I)10.999960.96552
1610.999980.97463
1710.999990.98124
18(6 I)10.999990.98588
19110.98948
20110.9924
21(7 I)110.99442
22110.99585
23110.99685
24(8 I)110.99782
25110.99856
26110.99902
27(9 I)110.99931
28110.99961
29110.99981
30(10 I)111



And again, with +1/256 to each chance.
TurnLv 1Lv 2Lv 3
1100.00042
210.50230.00042
3(1 I)10.752150.12915
410.87620.28652
510.938910.43582
6(2 I)10.969810.56296
710.98530.6659
810.992720.74558
9(3 I)10.996420.80827
1010.99820.85514
1110.999080.89177
12(4 I)10.999530.91923
1310.999720.93964
1410.999880.95529
15(5 I)10.999970.96694
1610.999990.97505
17110.9814
18(6 I)110.98606
19110.98947
20110.9925
21(7 I)110.99458
22110.99612
23110.99721
24(8 I)110.99793
25110.99856
26110.99899
27(9 I)110.99939
28110.99966
29110.99986
30(10 I)111