I am not sure whether Mathematics Stack Exchange is the appropriate site for this question. Please correct me if it is not.
Recently, I was reminded of a role-playing game (RPG) that I played in my childhood, Tower of the Sorcerer. Basically, this is a simple RPG with cliche story in which the hero has to save the princess in a magic tower with 24 floors by defeating the monsters and the devil lord. The hero has stats "HP", "Attack" and "Defence". Each floor consists of a 2D maze (that consists of certain number of pixels) with monsters of their own stats, and whenever the hero is in contact with a monster, a combat starts (the outcome of which is completely deterministic). In each round of combat, the HP that the hero/monster loses is given by $$\max\left\{0,A_{\text{enemy}} - D_{\text{self}}\right\}$$ where $A$ is the attack stat and $D$ is the defence stat, and the rounds are repeated until one of them loses, i.e., his HP falls below or equal 0. The hero obtains coins and experience points each time he defeats a monster, depending on the type of the monster. The coins and experience points can be used to increase the stats (HP, attack and defence) at some fixed locations of the tower. The stats can also be increased by collecting items in the tower. The hero also needs to collect the keys to open the doors, and sometimes he needs to buy keys with coins. And there are still some other details of the games but basically all of them are elements that can be found in any cliche RPGs.
The problem is, given that I have all details of the tower and all stats of the monsters, what is the most efficient and accurate mathematical optimization algorithm that I can programmatically/algorithmically obtain the best playing strategy of the game. By "best", it is to optimize a given utility function $U(x) \in \mathbb{R}$, where $x$ is a vector that encodes variables like final HP/attack/defence stats, number of total steps of the hero, with the constraint that the game can be played to the end (without being stuck in the process because of insufficient stat, in case of which some monsters cannot be defeated and the game cannot be progressed).
All I have in my mind are genetic algorithms/reinforcement learning algorithms. But I am thinking whether they are an overkill and may not serve as the most efficient solutions (too computationally expensive), considering that the map is quite large.
To extend the problem, what if the combat system is stochastic? For example, what if there are some chances of critical hits/missed hits?
The question may not be specific enough, so I am not sure whether it is suitable for here, but I appreciate for all help. It would even be helpful if you recommend some papers tackling a similar problem.