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.9957300.00046
20.999970.496160.00046
3(1 I)10.748720.12325
410.875350.28092
510.936960.42948
6(2 I)10.968210.5565
710.983840.65982
810.992160.73935
9(3 I)10.996150.8033
1010.998120.85193
1110.998990.88937
12(4 I)10.999510.91732
1310.999710.93824
1410.999850.95362
15(5 I)10.999930.96538
1610.999950.97447
1710.999970.98076
18(6 I)10.999970.98544
1910.999980.98916
2010.999990.99199
21(7 I)110.99399
22110.99543
23110.99665
24(8 I)110.9978
25110.99852
26110.99899
27(9 I)110.9993
28110.99964
29110.99981
30(10 I)111



And again, with +1/256 to each chance.
TurnLv 1Lv 2Lv 3
1100.00045
210.504450.00045
3(1 I)10.752950.12921
410.878060.28614
510.939030.43566
6(2 I)10.970180.56279
710.985130.66479
810.992430.74594
9(3 I)10.996160.80795
1010.997960.85568
1110.998990.89196
12(4 I)10.999480.91968
1310.999770.93957
1410.999870.95438
15(5 I)10.999890.96673
1610.999950.97542
1710.999980.98157
18(6 I)10.999990.98622
1910.999990.98956
2010.999990.9921
21(7 I)10.999990.99421
22110.99593
23110.99697
24(8 I)110.99789
25110.9985
26110.99908
27(9 I)110.9995
28110.99978
29110.9999
30(10 I)111