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.9962800.00044
20.999980.496610.00044
3(1 I)10.747040.12501
410.873190.27879
510.937320.42812
6(2 I)10.969350.55533
710.984470.65771
810.992590.739
9(3 I)10.996340.80281
1010.998120.852
1110.999190.88854
12(4 I)10.999570.91736
1310.999740.93769
1410.999930.95235
15(5 I)10.999970.96428
1610.999990.97309
17110.97993
18(6 I)110.9851
19110.9888
20110.99194
21(7 I)110.99396
22110.99559
23110.99684
24(8 I)110.99776
25110.99835
26110.9988
27(9 I)110.99921
28110.99946
29110.99973
30(10 I)111



And again, with +1/256 to each chance.
TurnLv 1Lv 2Lv 3
1100.00038
210.501350.00038
3(1 I)10.753820.12633
410.877620.28503
510.938560.43533
6(2 I)10.969690.56371
710.985280.66707
810.992490.74813
9(3 I)10.996370.81006
1010.998130.8587
1110.999030.89424
12(4 I)10.999540.92036
1310.999770.94034
1410.999850.95564
15(5 I)10.999940.96695
1610.999980.97545
1710.999990.98195
18(6 I)110.9869
19110.9903
20110.99299
21(7 I)110.99473
22110.99609
23110.99718
24(8 I)110.99803
25110.99866
26110.9992
27(9 I)110.99953
28110.9997
29110.99991
30(10 I)111