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.9955200.00047
20.999990.496130.00047
3(1 I)10.748180.12599
410.873980.28138
510.937980.43105
6(2 I)10.968850.55861
710.984250.66089
810.992230.74224
9(3 I)10.996340.80588
1010.998350.85362
1110.999150.88916
12(4 I)10.999620.91643
1310.999840.93733
1410.99990.95273
15(5 I)10.999950.96458
1610.999970.97349
1710.999990.98077
18(6 I)10.999990.98553
19110.98914
20110.99209
21(7 I)110.99405
22110.99545
23110.99668
24(8 I)110.99764
25110.99847
26110.99902
27(9 I)110.99943
28110.99961
29110.99975
30(10 I)111



And again, with +1/256 to each chance.
TurnLv 1Lv 2Lv 3
1100.00037
210.505330.00037
3(1 I)10.756080.12931
410.878490.2903
510.940790.43918
6(2 I)10.97080.56463
710.985580.66862
810.993170.74901
9(3 I)10.997030.81189
1010.998550.85918
1110.999310.89447
12(4 I)10.999660.92115
1310.999860.94157
1410.999940.95619
15(5 I)10.999980.9678
1610.999990.97585
1710.999990.982
18(6 I)110.98692
19110.99024
20110.99281
21(7 I)110.99479
22110.99626
23110.9971
24(8 I)110.99802
25110.99873
26110.99919
27(9 I)110.99947
28110.99969
29110.99988
30(10 I)111