I want to learn more about how terrain generation, monster AI and quests work.

I'm looking for the Angband variants that offer the best code example for each feature, so I can play around in the code and learn from it. Also maybe try to port a feature from one variant to another as a learning exercise if that isn't too tricky.

From what I've seen in code, Unangband has the most variety, but Zangband has very clean and tidy code. So I'll probably look into Zangband first, because it is easier to read and change.

I've only heard about 4GAI being the best Angband AI, originating from Oangband and Sangband. Is that still true and if so, which variant should I look into as the easiest to read or most recent example?

Terrain: If you're looking at wilderness, FAangband has generation which is different from Z (and descendants) or Un. For room generation, I'd actually look at the template approach in current V; if you want true procedural rather than templates, I think PosCheng may have some (but I'm not sure).

O, S, FA and NPP all have 4GAI; NPP is possibly the most accessible, but I would recommend going back to a quite old version - 0.5, or maybe even 0.4 before UnAngband terrain came in.

NPP and Steam have random quests available from town; I believe they got this from EyAngband, but I'm not 100% sure. For fixed quests, I think all the Zangband family have them; I think they are dependent on having wilderness.

I'm sure I've got some of this wrong and will be corrected

__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.

Fixed quests come from Kangband, which didn't have an overworld as such.. just an elaborate town/wilderness area (seven of them, handmade). Z took quests from there.. in fact it's impossible (or just difficult and never before attempted) to have fixed quests outside of town afaik.

I spent quite some time with room templates, but problem was that I recognised all my own templates. I hope true room generation will keep me more surprised while playing and tweaking.

I'll start with just a room generator, since that looks more modular and maybe easier to understand and start with.

For 4GAI, I found NPP 0.5 on github. Looks like NPP's melee2.c is roughly Sang's monmove.c. I'll have fun with them. Is there some kind of manual that explains 4GAI and how it hooks into Angband?

I'll check out EyAngband and Kangband for random and fixed quest code, or else Steam and Zang if I can't find working links to Ey and Kang. Quest code is probably more difficult than rooms and AI, so I'll keep that for last.

NPP has AI which is strong but to my mind it can be annoying and feels unnatural. For an example watch an umber hulk which will not use a corridor instead moving parallel to it through the wall. It's harder but feels a little off.

For 4GAI, I found NPP 0.5 on github. Looks like NPP's melee2.c is roughly Sang's monmove.c. I'll have fun with them. Is there some kind of manual that explains 4GAI and how it hooks into Angband?

There has been quite a lot of chat on this forum about how having super-smart monsters a la 4GAI is maybe not actually the best thing for gameplay. If you search for AI related threads I'm sure it'll come up. Monster mana also seems like a bit of a dead end to me. As Nick put it recently, you just end up killing the monster twice: first you drain its mana and then you drain its HP.