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.9960300.00059
20.999970.500680.00059
3(1 I)10.750640.12556
410.874640.28069
510.937430.43036
6(2 I)10.969060.55848
710.984570.66022
810.992240.74298
9(3 I)10.996510.80539
1010.99840.85318
1110.99920.88964
12(4 I)10.999540.91677
1310.999740.93797
1410.999850.9546
15(5 I)10.999910.96632
1610.999960.9748
1710.999980.98124
18(6 I)10.999990.9861
19110.99016
20110.9926
21(7 I)110.99456
22110.99616
23110.99721
24(8 I)110.99788
25110.99853
26110.99904
27(9 I)110.99938
28110.99973
29110.9999
30(10 I)111



And again, with +1/256 to each chance.
TurnLv 1Lv 2Lv 3
1100.00043
210.503530.00043
3(1 I)10.754680.12747
410.878920.28662
510.939940.43593
6(2 I)10.970410.56341
710.985110.66583
810.992330.74718
9(3 I)10.996020.8096
1010.997950.857
1110.998930.8924
12(4 I)10.999430.92034
1310.999720.93975
1410.99990.95512
15(5 I)10.999930.96656
1610.999950.97576
1710.999960.98213
18(6 I)110.98703
19110.99057
20110.99296
21(7 I)110.99458
22110.99613
23110.9971
24(8 I)110.99808
25110.99861
26110.99902
27(9 I)110.99948
28110.99969
29110.99987
30(10 I)111