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.9961200.00051
20.999980.500420.00051
3(1 I)10.749670.12586
410.874360.28245
510.936840.43015
6(2 I)10.968510.55785
710.984140.66045
810.992140.74175
9(3 I)10.995860.80476
1010.997970.85319
1110.999030.88951
12(4 I)10.99950.91638
1310.999750.93751
1410.999880.95314
15(5 I)10.999920.96572
1610.999960.97462
1710.999960.98041
18(6 I)10.999980.98523
19110.98915
20110.99214
21(7 I)110.99418
22110.99577
23110.99685
24(8 I)110.99775
25110.99838
26110.99894
27(9 I)110.99943
28110.99965
29110.99985
30(10 I)111



And again, with +1/256 to each chance.
TurnLv 1Lv 2Lv 3
1100.00029
210.500710.00029
3(1 I)10.752030.12835
410.877870.28658
510.939540.43686
6(2 I)10.970460.56476
710.985260.66641
810.992990.7487
9(3 I)10.996730.81041
1010.998360.85795
1110.999140.89422
12(4 I)10.999540.92197
1310.999770.94223
1410.999850.95653
15(5 I)10.999940.96779
1610.999980.97584
17110.98233
18(6 I)110.98686
19110.99028
20110.99284
21(7 I)110.99484
22110.99626
23110.99736
24(8 I)110.99801
25110.99852
26110.99903
27(9 I)110.99945
28110.99973
29110.99985
30(10 I)111