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.9966200.00034
20.999980.499740.00034
3(1 I)10.748870.12594
410.873770.28201
510.937150.43085
6(2 I)10.969440.55881
710.984430.65978
810.992210.74096
9(3 I)10.996160.80482
1010.998050.85416
1110.998990.89053
12(4 I)10.999550.91752
1310.999710.93803
1410.999860.95318
15(5 I)10.999890.96514
1610.999910.97398
1710.999990.98088
18(6 I)10.999990.98596
1910.999990.98954
2010.999990.9921
21(7 I)110.99413
22110.99557
23110.99665
24(8 I)110.99753
25110.99814
26110.99875
27(9 I)110.99927
28110.99962
29110.99979
30(10 I)111



And again, with +1/256 to each chance.
TurnLv 1Lv 2Lv 3
1100.00045
210.504760.00045
3(1 I)10.753370.12851
410.877320.28656
510.938850.43755
6(2 I)10.969730.56418
710.985120.66751
810.992820.7479
9(3 I)10.996310.81024
1010.998130.85661
1110.999080.89279
12(4 I)10.999540.91997
1310.999750.94034
1410.99990.95557
15(5 I)10.999970.96647
16110.97482
17110.98119
18(6 I)110.98631
19110.98995
20110.99282
21(7 I)110.99483
22110.99624
23110.99724
24(8 I)110.99821
25110.99867
26110.99918
27(9 I)110.99939
28110.99968
29110.99988
30(10 I)111