AI tools

From HEWIKI
Jump to: navigation, search

What kind of AI tools exist?

The AI system is completely written in HSL.

Each AI agent has its own stack of AI states. The current state (topmost on the stack) tells the NPC how to behave. Because the stack keeps states that were pushed on to it, an agent can decide to do something, get a new state pushed on, complete that new state, and then it will go back to what it was doing before pretty seamlessly. Each agent has a "brain" which ticks at a specifiable interval; this basic brain function can decide what states need to be pushed onto the agent's stack.

For example, in Hero's Journey the basic brain that all our NPCs inherit from will automatically tell the NPC to wander around its defined area if it has nothing else to do. NPCs that want to do something different would simply override that basic functionality to look at its special actions instead. You can have other things (not just the NPC's brain) also push states onto the agent's stack; for example a probe that is looking for nearby players to attack (which would tick at an interval much more rapid than the NPC's brain) could push a state to initiate combat. You could even have an NPC tell another NPC to do something by pushing a new state.

The bulk of the actual AI lives in the AI states. HeroEngine provides two sample states, one for wandering around a defined set of pathfinding nodes and another for following a path. Most of the AI in Hero's Journey is combat-related, and how that combat system works is not necessarily applicable to what another game will do. In general, however, the base AI state is a class which implements methods that provide hooks when the state is pushed onto an agent's stack or is about to be removed, etc, all of which you would override in your individual state's class. The AI system also includes a basic debugger so that you can watch an agent's state stack in real time and have a single window to watch debug messages from state logic.

In short, HeroEngine provides a highly flexible state-based, stack-based AI system for AI agents to use. Of course, since this is 100% script-driven, it can be replaced without much hassle by a licensee's developers.

As far as "meta" systems go, there are several utilities for AI use which could be used by other things as well. They are written in script as essentially black boxes so that anything can ask them a question and get a response.

Examples:

AI groups are supported in that you can define a group, put NPCs into a group, and get all members in a group. What you do with that information is up to your own AI states.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox