During the "Games and AI" module at the TH Mannheim, our team consisting of Colin Zenner, Dominik Koschik, Luca Ahlf, and myself was tasked with demonstrating an AI technique (old-school algorithms, not machine learning) suitable for educational contexts in Godot.

We chose to expand upon the "Food Gatherer" minigame created as part of a thesis supervised by Professor Eckert, but instead of simple gathering, we wanted to build a fully autonomous survival simulation. The result is "Deserted Island Survivor", a Godot-based simulation where an agent has to manage hunger and body temperature while exploring a manually created island to find parts for a boat to escape. Our "AI technique" was using Behavior trees to simulate a smart behavior.

From a technical perspective, the most interesting challenge was designing the Behavior Tree to be truly reactive.
In standard implementations, a task that takes time (like walking to a boat part) returns a RUNNING status, effectively locking the tree until the task is done.
However, we needed our survivor to be able to interrupt their current action immediately if a critical need arose, like suddenly starving or freezing to death.

We solved this by implementing a custom status we called SUCCESS_STOP.
It allows a task to be suspended for higher-priority nodes without returning a failure state, effectively letting the AI "change its mind" mid-action without breaking the logic flow.
To support this frequent re-evaluation, we also had to implement a pathfinding system with a cache, as recalculating the A* path every single tick was taxing on the performance.
Since this was a project meant for visualization and teaching, we wanted to see the decision-making process happening in real-time.
I built a custom visualizer using Godot's GraphEdit node that draws the active behavior tree on top of the game.
The layout algorithm was a fun little graph theory problem in itself:
It uses a post-order traversal to calculate the coordinates of each node, determining the X position based on depth and the Y position based on the number of leaf nodes, ensuring that none of the connections overlap.
We had the opportunity to present this project at the iExpo event of the THMA, and demonstrated it at Godot Camp 2025. The feedback overall was positive, with people liking the split view of the world and graph view, though we did realize one flaw during the live demos: Our character was a bit too competent. Because we focused so heavily on the logic structure rather than the game balancing, the survivor never actually struggled to survive, efficiently strip-mining the island of resources without ever dropping below critical thresholds. But if the feedback was that it works too well, then we'll take it.
If you are interested in the specific implementation details of the SUCCESS_STOP status or the tree layout algorithm, I highly recommend reading through our project documentation PDF or checking out the sources for yourself.