Question about AI Links

  • August 2, 2017 at 19:14 #21623

    If I have a setup like

    — = link

    — 50 other job types

    Would all of them be built into one big one. Or Only the one actually used will be loaded?

    August 3, 2017 at 10:27 #21627

    All AIs in use are loaded, however an AI’s footprint is small since it is stateless. Also there is only ever one instance on any AI regardless of the number of agents to which it is assigned, again since the AI is stateless.

    When run, only the AI(s) that a qualifier selects are executed, so if Clerk is selected, HasJob, LumberJack etc. are not executed. What you see in the visualizer is what gets run.
    You can easily verify this yourself by setting break points (in code).

    August 3, 2017 at 11:53 #21630

    Thanks for the information. So just a tiny bit of memory overhead if I have many links to something they will never use.

    I really have to say, your code (whole asset) is top notch.

    August 6, 2017 at 19:03 #21661

    Well there is some overhead in evaluating the qualifiers that eventually end up at a link, so depending on your focus on reuse vs. performance, you may want to trim AIs to avoid unnecessary evaluations.
    How much overhead of course depends on the complexity of the qualifier evaluations.

    We are glad you like the asset.

You must be logged in to reply to this topic.

Topic Tags