Debugging your AI can be a tedious process. VisAI tries to save you as much time as possible by providing helpful debugging tools and an optimized debugging environment.
What makes it easy to debug?
With VisAI, there are only 4 things to consider when debugging.
Behaviour
Issues with the structure/design or improper setup.
Decision
Issues with the structure/design or improper setup.
Action
Issues with the structure/design or improper setup.
Integrations
Issues with integrations not providing the proper data/functionality. Integrations can be from VisAI, yourself, or another developer. They typically exist in the Decisions or Actions of an AI.
- An example of an Action integration would be using the targeting system to get the current target for the purpose of moving to that target.
- An example of a decision integration would be using the targeting system to check if there are any valid targets in order to determine if an AI should attack.
In both of these cases, if the transmitted data is incorrect, it would cause issues with the AI’s desired functionality.
We’ve been steadily adding more debugging tools as VisAI has evolved. For now, it’s been restricted to useful debug messages and a debugging focused environment. In the future, you’ll be able to see the debugging tools for each system in the AI Toolkit section.
General
- Print strings everywhere! Check your data
- If you haven’t seen Epic’s AI Debugging Documentation, check it out!
- Seeing the Behaviour Tree stuck like the picture above is an indication that the behaviour tree could not find an Action to run. This is usually due to a couple of things:
- Not having an Action on every behaviour/goal/plan
- Not having an “Idle” action (behaviour tree really needs at least one action otherwise it gets stuck)
- Decisions are giving incorrect inputs, resulting in a bad B/G/P structure being chosen. An example would be the behaviour being something like “cook” but the decision has selected a goal from a behaviour “woodcutter”. Meaning the cook has a Behaviour of “Cook” but a goal of “Mine rocks” or something else that’s undesired and unreachable.
- Behaviour structure mishap leading to similar outcomes as the above. This just means that you could have accidentally setup your behaviour incorrectly. Going from the last example, maybe the “woodcutter’s” goals are assigned to the cook, or the decorator values weren’t changed when copy pasting them.
- For now, VisAI uses Behaviour Trees. You can see the current Behaviour/Goal/Plan during live play (PIE) there as shown below: