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.9959500.00054
20.999990.499080.00054
3(1 I)10.750370.12653
410.876110.28194
510.938570.4319
6(2 I)10.968750.55913
710.984180.66077
810.992090.74026
9(3 I)10.996280.80331
1010.998130.85111
1110.999120.88759
12(4 I)10.999590.91575
1310.999860.93697
1410.999910.95307
15(5 I)10.999990.96442
1610.999990.97308
1710.999990.97964
18(6 I)10.999990.9851
19110.98874
20110.99178
21(7 I)110.99415
22110.99572
23110.99687
24(8 I)110.99781
25110.99851
26110.999
27(9 I)110.99925
28110.99953
29110.99988
30(10 I)111



And again, with +1/256 to each chance.
TurnLv 1Lv 2Lv 3
1100.00035
210.503870.00035
3(1 I)10.75420.12831
410.877430.28615
510.939070.43844
6(2 I)10.969890.56642
710.984960.66854
810.992750.74995
9(3 I)10.996530.81176
1010.998280.85793
1110.999160.89335
12(4 I)10.999580.91958
1310.999770.94021
1410.999890.95547
15(5 I)10.999920.96675
1610.999980.97528
1710.999990.98159
18(6 I)110.98621
19110.98953
20110.99213
21(7 I)110.99416
22110.99577
23110.99701
24(8 I)110.998
25110.99859
26110.99902
27(9 I)110.99943
28110.99968
29110.99982
30(10 I)111