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.9960500.00047
20.999990.497960.00047
3(1 I)10.748050.12582
410.873570.28052
510.937430.42976
6(2 I)10.969150.55503
710.984370.65771
810.992190.74035
9(3 I)10.996190.80312
1010.998190.85125
1110.999010.88848
12(4 I)10.999530.91573
1310.999750.93668
1410.999860.95262
15(5 I)10.999930.96422
1610.999960.97351
1710.999980.97995
18(6 I)110.98506
19110.98923
20110.99205
21(7 I)110.99408
22110.99572
23110.99686
24(8 I)110.99789
25110.99851
26110.99897
27(9 I)110.99931
28110.99954
29110.99978
30(10 I)111



And again, with +1/256 to each chance.
TurnLv 1Lv 2Lv 3
1100.00034
210.50290.00034
3(1 I)10.753660.12808
410.878420.28954
510.939770.44083
6(2 I)10.969910.56847
710.984650.67079
810.992540.75071
9(3 I)10.996430.81292
1010.998130.86065
1110.9990.89591
12(4 I)10.999510.92206
1310.99980.94206
1410.999880.95671
15(5 I)10.999960.96749
1610.999980.97581
17110.98196
18(6 I)110.98661
19110.99044
20110.9931
21(7 I)110.99501
22110.99629
23110.99721
24(8 I)110.99809
25110.99869
26110.99917
27(9 I)110.99947
28110.9997
29110.9999
30(10 I)111