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.9965300.00049
20.999990.498610.00049
3(1 I)10.749670.12423
410.87470.28078
510.936780.42832
6(2 I)10.968620.55498
710.984380.65938
810.992250.74007
9(3 I)10.996420.80317
1010.998370.85069
1110.999120.88798
12(4 I)10.999470.91541
1310.999780.9367
1410.99990.95236
15(5 I)10.999950.96421
1610.999980.97333
1710.999990.98058
18(6 I)10.999990.9858
19110.98934
20110.99199
21(7 I)110.99419
22110.9959
23110.99703
24(8 I)110.99783
25110.99858
26110.99902
27(9 I)110.99942
28110.99964
29110.99986
30(10 I)111



And again, with +1/256 to each chance.
TurnLv 1Lv 2Lv 3
1100.00046
210.504310.00046
3(1 I)10.754420.12847
410.878350.28513
510.93910.43691
6(2 I)10.969530.5642
710.984570.6688
810.992230.74847
9(3 I)10.996260.81055
1010.998280.85798
1110.999080.89374
12(4 I)10.999520.92057
1310.999790.94039
1410.999910.95553
15(5 I)10.999950.9668
1610.999970.97488
1710.999990.98143
18(6 I)10.999990.98659
1910.999990.98973
2010.999990.99247
21(7 I)10.999990.99447
22110.99613
23110.99736
24(8 I)110.99798
25110.99865
26110.99921
27(9 I)110.99946
28110.99965
29110.99985
30(10 I)111