Providing dynamic learning for software agents in a simulation is
described. The software agents with learners are capable of learning from
examples. When a non-player character queries the learner, it can provide
a next action similar to a player character. A game designer provides
program code, from which compile-time steps determine a set of raw
features. The code may identify a function (like computing distances). At
compile-time steps, determining these raw features in response to a
scripting language, so the designer can specify which code should be
referenced. A set of derived features, responsive to the raw features,
may be relatively simple, more complex, or determined in response to a
learner. The set of such raw and derived features form a context for a
learner. Learners might be responsive to (more basic) learners, to
results of state machines, to calculated derived features, or to raw
features. The learner includes a machine learning technique.