[Paper Review] Dyna-H: a heuristic planning reinforcement learning algorithm applied to role-playing-game strategy decision systems
This paper proposes Dyna-ℋ, a model-free reinforcement learning algorithm that integrates heuristic planning into the Dyna architecture to improve path-finding in role-playing games. By sampling from the worst trajectories—inspired by nightmare-like mental simulations—it accelerates learning and achieves over 90% reduction in path length compared to Q-Learning and Dyna-Q, outperforming them in both speed and optimality.
In a Role-Playing Game, finding optimal trajectories is one of the most important tasks. In fact, the strategy decision system becomes a key component of a game engine. Determining the way in which decisions are taken (online, batch or simulated) and the consumed resources in decision making (e.g. execution time, memory) will influence, in mayor degree, the game performance. When classical search algorithms such as A* can be used, they are the very first option. Nevertheless, such methods rely on precise and complete models of the search space, and there are many interesting scenarios where their application is not possible. Then, model free methods for sequential decision making under uncertainty are the best choice. In this paper, we propose a heuristic planning strategy to incorporate the ability of heuristic-search in path-finding into a Dyna agent. The proposed Dyna-H algorithm, as A* does, selects branches more likely to produce outcomes than other branches. Besides, it has the advantages of being a model-free online reinforcement learning algorithm. The proposal was evaluated against the one-step Q-Learning and Dyna-Q algorithms obtaining excellent experimental results: Dyna-H significantly overcomes both methods in all experiments. We suggest also, a functional analogy between the proposed sampling from worst trajectories heuristic and the role of dreams (e.g. nightmares) in human behavior.
Motivation & Objective
- Address the limitations of classical search algorithms like A* in large or incomplete environments where precise models are unavailable.
- Improve sample efficiency and convergence speed in model-free reinforcement learning for sequential decision-making under uncertainty.
- Integrate heuristic-guided planning into the Dyna framework to enhance learning without requiring a full environment model.
- Evaluate the proposed method against standard RL baselines in a controlled RPG path-finding scenario to demonstrate superior performance.
- Explore the functional analogy between sampling from worst trajectories and human cognitive processes like dreaming or nightmare-based learning.
Proposed method
- Adapt the Dyna architecture to include a heuristic-planning module that guides exploration using an admissible heuristic function, similar to A*.
- Use a heuristic to prioritize planning on branches that are likely to lead to suboptimal outcomes, focusing on worst-case trajectories.
- Integrate this heuristic-guided planning into the Dyna agent’s learning loop, allowing online, incremental updates based on simulated experiences.
- Apply the algorithm in a grid-world RPG environment where the agent learns to navigate from a start to a goal state while avoiding obstacles.
- Tune the number of planning steps (N) to control the trade-off between computational cost and policy optimality.
- Use a Q-learning update rule for value function learning, with experience generated from both real interactions and heuristic-guided simulated rollouts.
Experimental results
Research questions
- RQ1Can heuristic-guided planning improve the sample efficiency and convergence speed of model-free reinforcement learning in path-finding tasks?
- RQ2Does sampling from worst trajectories—rather than optimal or on-policy trajectories—lead to faster convergence toward the optimal policy?
- RQ3How does the number of planning steps (N) affect the trade-off between learning speed and policy quality in the Dyna-ℋ framework?
- RQ4Can Dyna-ℋ outperform standard Q-Learning and Dyna-Q in terms of path length and learning rate in a simulated RPG environment?
- RQ5Is there a functional analogy between the proposed heuristic sampling and human cognitive processes such as dreaming or nightmare-based learning?
Key findings
- Dyna-ℋ significantly outperforms both Q-Learning and Dyna-Q in learning speed, converging in fewer than 7 episodes even with minimal planning steps.
- The algorithm reduces the average path length by over 90% compared to baseline methods, achieving near-optimal trajectories.
- For N=1, the algorithm converges quickly but to a suboptimal policy (around 370 steps per episode), while higher N values (5, 10, 25) yield progressively better policies.
- Despite sampling from worst trajectories, Dyna-ℋ achieves faster convergence than on-policy sampling, suggesting that exploring poor paths accelerates learning.
- The learning curves for N=5, 10, and 25 are nearly identical in shape and convergence rate, differing only in the optimality of the final policy.
- The number of planning steps (N) provides a direct control knob for balancing computational cost and policy quality, enabling efficient resource trade-offs.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.