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.99600.00064
210.498860.00064
3(1 I)10.749980.12516
410.874530.28184
510.938410.43046
6(2 I)10.968620.55661
710.984260.66008
810.992130.73985
9(3 I)10.995810.80259
1010.997960.8507
1110.998910.88827
12(4 I)10.999520.91628
1310.999770.93636
1410.999880.95256
15(5 I)10.999940.96402
1610.999980.97316
1710.999980.97948
18(6 I)10.999980.98475
1910.999980.98874
2010.999990.99161
21(7 I)110.99376
22110.99545
23110.99669
24(8 I)110.99751
25110.99826
26110.99884
27(9 I)110.99924
28110.99966
29110.99986
30(10 I)111



And again, with +1/256 to each chance.
TurnLv 1Lv 2Lv 3
1100.0005
210.504240.0005
3(1 I)10.753450.12778
410.876790.28789
510.938590.43638
6(2 I)10.969330.56239
710.985090.6652
810.992620.74697
9(3 I)10.996070.80893
1010.998180.85676
1110.999130.8935
12(4 I)10.999580.92108
1310.999810.94118
1410.999940.95602
15(5 I)10.999960.96744
16110.97589
17110.98181
18(6 I)110.98652
19110.98983
20110.99229
21(7 I)110.99426
22110.99586
23110.99701
24(8 I)110.99791
25110.99849
26110.99902
27(9 I)110.99937
28110.99967
29110.99982
30(10 I)111