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.9956300.00036
20.999990.494980.00036
3(1 I)10.747160.12222
410.871460.27861
510.935360.42625
6(2 I)10.968080.55361
710.983790.65825
810.991890.73976
9(3 I)10.9960.80305
1010.99810.85251
1110.999050.88815
12(4 I)10.999540.91597
1310.99980.93701
1410.999940.95279
15(5 I)10.999980.96456
1610.999990.97357
1710.999990.98048
18(6 I)110.98555
19110.9891
20110.99177
21(7 I)110.99403
22110.99582
23110.99709
24(8 I)110.998
25110.99862
26110.99901
27(9 I)110.99939
28110.99958
29110.99979
30(10 I)111



And again, with +1/256 to each chance.
TurnLv 1Lv 2Lv 3
1100.0005
210.504110.0005
3(1 I)10.753510.13007
410.878780.29019
510.939950.43767
6(2 I)10.970890.56526
710.985530.6688
810.992660.74981
9(3 I)10.996250.81109
1010.998070.85888
1110.999030.89339
12(4 I)10.999510.92009
1310.999790.94027
1410.999880.95532
15(5 I)10.999940.9671
1610.999960.97533
1710.999990.98188
18(6 I)10.999990.98648
1910.999990.98997
2010.999990.99288
21(7 I)110.99484
22110.99604
23110.99727
24(8 I)110.99809
25110.99861
26110.99901
27(9 I)110.99926
28110.9995
29110.99985
30(10 I)111