So I tinkered with the AI's brains and added three values: DIFFICULTY, UNIT_WISDOM and LEVEL_VARIETY. From the settings file:
Difficulty is a percentage used for determining classes. It does not affect what level the enemies are, only when advanced classes start appearing. If you set it to 150, level 10 enemies may be Paladins (normally they need to be level 15), level 12 enemies may be Monks (normally they need to be level 18), and so on. If you set it to 50, you won't meet Mages (level 10 requirement) before level 20, you'll never meet Monks (nobody reaches level 36), etc. Default is 100.
Unit Wisdom determines how good the AI is at putting units in the proper row. The higher the number, the better their unit design is; 0 has Usar placing characters haphazardly, while Hikash puts everyone in the correct row. 10 means everyone puts all characters in a sensible row, while -10 means even Hikash would put Doll Masters in front and Iron Golems in back.
Level Variety is how smart leaders are at evolving their units. More specifically, classes evolve between 0 and LEVEL_VARIETY levels after they could; 0 means Knights immediately stop appearing when paladins are possible, while 25 means you can see fighters at the final stage. The default value is 3, so Knights (who can become Paladins at level 15) don't completely vanish until level 18.
Unfortunately, the next release may not have some or all non-generic classes appear in enemy units.
I've been making some progress. Unfortunately, the key word is "some".
Once again, the game refuses to level up uniques, even though they have stat gains added in. Case in point, this level 4 Rashidi should have 128-ish HP, but it uses the default of 104 HP. I may need to find a coder to get anyone non-generic appearing outside the usual level.
Since leveling is not possible, nongenerics gets a range for where they appear. Default is from (vanilla-1) to (vanilla+3); Albeleo (level 17), for example, could appear in any slot that asks for a character form level 16 to 20. Stats don't change, so Albeleo has the same stats whether he fills in a level 16 slot or a level 20 slot. There can be some nasty units; one Antanjyl group had Ares leading, Saradin supporting, and three Tristans in front.
I should have version 0.2 out within a couple days.