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.9961300.00058
20.999980.496080.00058
3(1 I)10.747160.12431
410.874950.28138
510.937760.43023
6(2 I)10.968570.55855
710.984250.65879
810.992170.73967
9(3 I)10.996010.80118
1010.9980.8492
1110.998930.88696
12(4 I)10.999470.91534
1310.999720.93629
1410.999840.95227
15(5 I)10.99990.9645
1610.999950.9737
1710.999970.98043
18(6 I)10.999980.98546
1910.999990.98943
20110.99211
21(7 I)110.99411
22110.99571
23110.99693
24(8 I)110.99781
25110.99838
26110.99889
27(9 I)110.99933
28110.9996
29110.99988
30(10 I)111



And again, with +1/256 to each chance.
TurnLv 1Lv 2Lv 3
1100.00035
210.501730.00035
3(1 I)10.751710.12705
410.877610.28657
510.939410.43626
6(2 I)10.970180.56237
710.985080.66675
810.992770.74827
9(3 I)10.996260.81062
1010.998020.85716
1110.999010.89261
12(4 I)10.999550.91981
1310.999740.93995
1410.999820.95562
15(5 I)10.999860.96712
1610.999960.97581
1710.999980.98215
18(6 I)110.98703
19110.99032
20110.99264
21(7 I)110.99454
22110.99607
23110.99722
24(8 I)110.99812
25110.99868
26110.9992
27(9 I)110.99949
28110.99974
29110.99989
30(10 I)111