I’ve been exploring basic AI in Unreal Engine 5, trying to create a simple but functional system where NPCs juggle three core needs: Hunger, Energy, and Work. To keep things straightforward, they only had three places to go:
- Task Area – Where they get work done.
- Kitchen – Where they eat.
- Bedroom – Where they sleep and recharge.
Implementation
I started with the Third Person Template and tweaked the play area a bit to see if I could get the NPCs to navigate slopes properly. The AI was built using Blackboard and Behavior Trees, which managed variables and controlled what the NPCs did next.
Each zone was set up as an object blueprint with a waypoint. When an NPC’s hunger, energy, or work variables dropped too low, they’d head to the right spot to replenish it.
Challenges and Observations
It all worked as planned—NPCs moved between areas based on what they needed. But I ran into some headaches with Blackboard and Behavior Trees. They got a bit buggy and didn’t handle three constantly changing variables very well. The system struggled to keep everything updating smoothly.

Alternative Methods for NPC AI in Unreal Engine 5
If I were to try this again, I’d look into different ways to handle AI that might be more reliable. Here are some options:
1. State Machines (Finite State Machines – FSMs)
- Instead of using blackboards, FSMs define AI behavior through different states (e.g., Working, Eating, Sleeping).
- NPCs switch between states when certain conditions are met.
- More predictable and easier to debug compared to Behavior Trees.
2. Utility AI
- Uses a scoring system to decide what the NPC should do next.
- Allows for more flexible decision-making since it prioritizes needs dynamically.
- Scales well for more complex AI behaviors.
3. AI Perception System
- Gives NPCs more awareness of their surroundings.
- Can be used alongside FSMs or Utility AI to make NPCs react to world events in real-time.
Conclusion
This experiment gave me some solid insights into AI development in Unreal Engine 5. While Blackboard and Behavior Trees work well for simple behaviors, they didn’t handle fast-changing variables very well. Next time, I’d try State Machines, Utility AI or perhaps AI Perception System if i can get my head around it.



Leave a comment