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.9961800.00044
20.999990.498480.00044
3(1 I)10.749430.12386
410.875590.28002
510.937670.43029
6(2 I)10.968310.55809
710.984310.66089
810.992110.74041
9(3 I)10.996260.80335
1010.998360.85179
1110.999170.88874
12(4 I)10.999610.91681
1310.999810.93796
1410.99990.95365
15(5 I)10.999970.96559
1610.999980.97451
1710.999990.98106
18(6 I)110.98589
19110.98913
20110.992
21(7 I)110.99405
22110.99562
23110.99685
24(8 I)110.99764
25110.99835
26110.99888
27(9 I)110.99927
28110.99958
29110.99981
30(10 I)111



And again, with +1/256 to each chance.
TurnLv 1Lv 2Lv 3
1100.00035
210.50310.00035
3(1 I)10.7530.12781
410.875740.28523
510.938780.43527
6(2 I)10.969760.56442
710.984960.66748
810.992770.74838
9(3 I)10.996440.80982
1010.998280.85779
1110.999310.89352
12(4 I)10.999570.92047
1310.999820.94136
1410.999940.9558
15(5 I)10.999970.96684
1610.999990.97565
1710.999990.98203
18(6 I)110.98669
19110.99057
20110.99294
21(7 I)110.99506
22110.99632
23110.99737
24(8 I)110.9981
25110.99864
26110.9991
27(9 I)110.99946
28110.99963
29110.99982
30(10 I)111