There are two major things that can make AI difficult: having too many options to choose from, and having difficulty figuring out which options are better. NetHack is nasty in both of these dimensions.
• Many options are available:
- Many different actions available at any given time (move, attack with a weapon, Zap using a wand, Quaff a potion, Wear a different piece of armor or equipment, Wield a different weapon, Read a scroll, Spellcasting, etc)
- Many different options available within each action (place to move, spot to place a fireball or lightning bolt, place to teleport to (!!), which piece of armor or equipment to use)
As a very rough estimate from someone who hasn't played NetHack much, I'd guess that a mid-level character might have 10^4 or so options immediately available to them at any given time, though many of these are combinatorial results of having thirty different spells that can be targeted on any of the hundred or so visible tiles. The branching factor for Chess is about 10^1.5, and Go is around 10^2.
• Options are difficult to evaluate:
- On an immediate mechanical level: If you want to use teleport, what's the best place to teleport to? If you want to cast Fireball, how do you use it as effectively as possible? If you want to shoot into a group of enemies, where do you aim?
- On a tactical level: Would this monster be more effectively dealt with by spending some energy to cast Fireball, using a charge from your Wand of Magic Missiles, or attacking it in melee and risking taking some damage?
- On a strategic level: Would it be more useful to clean out the rest of this level or immediately go down the stairs? What set of armor and weapons would result in the best chances in melee against the enemies I expect to encounter in the near future? Which of my items should I cast Polymorph on to maximize the chance of receiving a random item that would be useful to me?
- On a mathematical level, NetHack suffers significantly from the horizon problem. That is, many immediate tactical or mechanical decisions have strategic consequences that require an AI to simultaneously consider all of the above problems. You can't just have a mechanical planner, a tactical planner, and a strategic planner; you have to have a unified AI that can realize that it'd be a good idea to not kill that one enemy in the corner because it can kill it and eat it two hours later on its way back up to the surface.
This is an even nastier issue. Even humans can't do this effectively for NetHack. For example, if you look on the NetHack subreddit, one of the current top posts is "Help me make it out of this group of enemies alive!", and everybody who comments has a different idea of what the best solution is.