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.9958300.0005
20.999980.496640.0005
3(1 I)10.747860.12505
410.874820.28229
510.937720.43011
6(2 I)10.968590.55521
710.984030.65943
810.992350.74073
9(3 I)10.996010.80413
1010.998080.85287
1110.998930.88925
12(4 I)10.999510.91628
1310.999770.93748
1410.999860.95331
15(5 I)10.999930.96535
1610.999960.97467
1710.999990.98148
18(6 I)110.98608
19110.98951
20110.99221
21(7 I)110.99442
22110.99579
23110.99708
24(8 I)110.99802
25110.9987
26110.99912
27(9 I)110.99949
28110.99971
29110.99984
30(10 I)111



And again, with +1/256 to each chance.
TurnLv 1Lv 2Lv 3
1100.00044
210.50460.00044
3(1 I)10.755370.12949
410.878030.28857
510.939570.43892
6(2 I)10.970050.56628
710.985230.66956
810.99220.75066
9(3 I)10.996040.8123
1010.997960.85878
1110.998990.89477
12(4 I)10.999410.9211
1310.999690.94165
1410.999850.95636
15(5 I)10.999940.96733
1610.999970.97601
1710.999980.98222
18(6 I)10.999990.98672
19110.99042
20110.99295
21(7 I)110.99469
22110.99613
23110.99727
24(8 I)110.99803
25110.99867
26110.99923
27(9 I)110.99947
28110.99969
29110.9999
30(10 I)111