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.9961800.00043
20.999970.501320.00043
3(1 I)10.747760.1258
410.872860.2831
510.93760.43176
6(2 I)10.96840.55821
710.984820.66
810.992630.74297
9(3 I)10.996170.80507
1010.998160.85319
1110.999220.89024
12(4 I)10.999660.91742
1310.999820.93796
1410.999910.95372
15(5 I)10.999930.96547
1610.999970.97441
1710.999970.98098
18(6 I)10.999970.98578
1910.999980.98933
2010.999990.99223
21(7 I)10.999990.99413
22110.99577
23110.99689
24(8 I)110.99772
25110.99837
26110.9989
27(9 I)110.99936
28110.99964
29110.99979
30(10 I)111



And again, with +1/256 to each chance.
TurnLv 1Lv 2Lv 3
1100.00045
210.501880.00045
3(1 I)10.752960.12589
410.877030.28488
510.939390.43415
6(2 I)10.969370.56285
710.984940.66748
810.99260.74759
9(3 I)10.996190.81077
1010.998010.8572
1110.999020.89324
12(4 I)10.999540.92054
1310.999740.94097
1410.999850.95604
15(5 I)10.999950.96711
1610.999980.97546
1710.999980.98177
18(6 I)10.999990.9865
19110.98985
20110.99256
21(7 I)110.99463
22110.99596
23110.99717
24(8 I)110.99787
25110.99856
26110.99909
27(9 I)110.99941
28110.99963
29110.99987
30(10 I)111