Introduction to SetupAI

Welcome! This guide will detail the various features of the SetupAI strategic script generator. SetupAI is designed to output well-formed and consistent scripts that describe strategies for Chameleon AI. By eliminating the need to define a strategy's rules manually, typographical errors are greatly reduced and much more attention can be given to the strategy itself. This facilitates a rapid path to completion for almost any conceivable strategy.

In addition to generating strategies, it also serves as an information source for the various units, technologies, and buildings in Age of Empires II. By hovering the mouse, you can determine how much a unit or building costs, and when and where it is allowed to be created. For research, by simply hovering over any item, you can find those same details, in addition to technology dependencies, their costs, and total cost. By making this information readily accessible, it reduces the time needed and the amount of reference material required to develop a strategy.

This project was started in order to allow for the creation of a multitude of strategies by many people, all with their own unique aspects, so that Chameleon can finally reach its goal of becoming a nearly unpredictable AI.

How to Create Your First Strategy

Lorem ipsum.

General Configuration

In this subsection, you can configure the most general settings for a strategy. The strategy comment can be anything, but it would be best if it also conveyed some sense of the strategy's focus in order for allies to better coordinate their tactics. As for the research tiers, it's better to enable more tiers and have them sparsely populated than to have too few and risk blocking large numbers of technologies while waiting for a tier to complete.

Settings

  1. Comment for this strategy:
    Here, you can write a strategy notification, of sorts, that the AI will announce to itself and to its allies at the start of each game. In addition, in response to taunt 250, it will repeat this line to the requesting player in order to clarify its strategy later on. It will not respond to the requests of human enemy players, however.

  2. Final research tier number:
    The research system provides tiers in order to organize and group technologies. This value can be set to any number between 1 and 10, depending on how much complexity you believe your strategy requires. Once changed, all technologies located after the final tier will be moved into the Accessory Items category.

  3. Research tier after which units are prioritized:
    Once the AI moves past this research tier, units will be prioritized over research, in terms of resource allocation. The military population is likely to boom toward the population limit after this event.

  4. Distance for optional wall placement:
    If your AI will build walls, you can use this setting to designate whether those walls will be built closer or farther away from your starting town center.

  5. Create a spearman scout from:
    In order to assist with scouting, a spearman is used to cover additional ground. With this setting, you can specify when the spearman should be trained.

  6. Reconnaissance timing:
    Once the AI begins militarization, it can intermittently send scouts to the enemy in order to discover their unit composition. This can help the counter-units system to perform more effectively. You can define the frequency of this intelligence gathering by adjusting this setting.

  7. Number of military explorers:
    If you would like to have more or less military explorers, you can change it with this setting. The recommended value is 2, which will assign, at least at the start of the game, a scout cavalry, or an eagle warrior, and a spearman as explorers.

  8. Personality for each game:
    This setting adjusts some minor characteristics of the AI. The 3 personality types are: aggressive, standard, and defensive. The random personality will automatically become one of the other three personalities at the start of each game. The aggressive personality is required if you wish to attack before the Castle Age. If you would like this to vary from game to game, select the random personality, which will allow it to initiate early attacks in a more unpredictable fashion.

  9. Allow Wall Reconstruction:
    When an AI attempts to rebuild a wall that is under attack, it can be very damaging, as villagers, in order to fill in the gaps, tend to stream toward the wall, one by one, right into the hands of the enemy army. For this reason, the recommended setting is to disable wall reconstruction, which means that after the walls and gates are finished, they will not be repaired. If you require wall reconstruction, you can enable this setting.

Economy Configuration

In this subsection, you can adjust the global economic parameters for a strategy, including special research prioritization, market settings, and early villager distribution.

Settings

  1. Market transaction buffers when gold-deficient:
    When the AI detects that gold mines have become limited, it will begin to take actions in order to maintain gold availability. For example, if the Guilds technology is available, it will be researched in order to make market trade more efficient. At this point in the game, one of the goals of market trade is to maintain a minimum quantity of gold. This quantity is the gold target. The food and wood buffers specify the minimum amounts of each resource that must exist before that resource is allowed to be sold for gold.

  2. Initial civilian scouting percentages:
    When the game starts, villagers are assigned to perform various tasks until required resources are located. These settings define the villager distribution for builders, explorers, and gatherers during this initial scouting period. The 3 percentage values should add up to 100.

  3. Enable Hunter Scouting:
    If this setting is enabled, the initial civilian scouting period will be extended, in order to make deer location more likely. This can be important if your strategy depends upon hunting, however it comes at the cost of fewer gatherers and an increased risk of being attacked by wild animals.

  4. Prioritize Loom:
    By default, Loom will be researched in the Dark Age if the AI finds itself unable to create a villager, if it begins hunting, or if it cannot immediately advance once it begins preparing for the Feudal Age. If it can advance before taking Loom, it will do so and, instead, research Loom upon arriving in the Feudal Age. If you require Loom to be taken in the Dark Age before advancing, enable this setting.

  5. Prioritize Wheelbarrow:
    If researching Wheelbarrow is a priority, enable this setting. Once enabled, the AI will conditionally block all activity once the research plan arrives at Wheelbarrow until it is researched.

  6. Prioritize Hand Cart:
    As with the Wheelbarrow setting, if you enable this setting, the AI will conditionally block all activity once the research plan arrives at Hand Cart until it is researched.

Custom Rules

If you absolutely must have a few special rules to refine your plan, you can define them in this subsection. Note, however, that this feature should only be used as a last resort; please use it carefully and sparingly. It would be best to write your rules in another editor and then paste them into the textbox. A dedicated goal, gl-state-strategy-data, is available for your use, if needed.

Tactical Configuration

Here, you can define the AI's military plan by manipulating its eight tactical phases. The first phase is required and it is followed by seven optional phases. The required phase, which begins militarization, must be entered into before the AI will proceed into any of the optional phases. With each phase, the behavior of the AI can be adjusted using the various settings below. Upon entering any phase, all previous settings are discarded and the new settings are adopted. If multiple optional phases have the same starting conditions, only the last phase will take effect.

Settings

  1. Begin this tactical phase from:
    With this setting, you can assign the earliest possible starting point of a phase, in age and time. Depending on the research condition, however, the phase may be delayed or, if the phase is optional, skipped entirely if a later phase meets its prerequisites first.

  2. Depends on the following research to begin:
    This setting has two fields: the first dropdown selects a research category, and the second dropdown selects a technology. By chaining together research with cross-category dependencies and using the research tier system, you can ensure that various technologies have been researched before the conditional technology is reached. If no particular technology is required to begin this phase, you can select "No Research Required" in order to discard this condition.

  3. Attack with the following units and military state or better:
    With this dropdown, you can set the worst-case scenario for an attack to be permitted. If the situation is deemed to be worse than the selected state, no attack will be initiated. The "Indeterminate" state, which exists when no player has a discernible advantage, is the worst recommended state for attacking. To be cautious about attacking, you can select, "Player Advantage - Low."

    The textbox assigns the minimum military population required to attack. If this number is set to 0, attacking will be disabled for the duration of the phase.

  4. Withdraw with the following military state or worse:
    With this dropdown, you can set the "best-case" scenario for attack withdrawal. If the situation is deemed to be at this level or worse, attacking will be discontinued. It's recommended to set this 2 levels lower than the attack initiation level.

  5. Depends on the following research to attack:
    This setting has two fields: the first dropdown selects a research category, and the second dropdown selects a technology. By chaining together research with cross-category dependencies and using the research tier system, you can ensure that various technologies have been researched before the conditional technology is reached. If no particular technology is required for attacking, you can select "No Research Required" in order to discard this condition.

  6. Ability to maintain distance:
    Ranged units must balance attacking the enemy with maintaining their distance from them. This applies to ships, as well as land units. You can select one of the static settings to force a specific behavior, or choose a dynamic setting. The dynamic settings use the current military state to determine whether units should stand and fire or focus on maintaining their distance.

  7. Enable Counter Units:
    If this setting is enabled, the counter-units system will occasionally train units in order to counter sighted enemy units. In addition, during an attack, normal unit training will be suspended if high-priority counter units are required to defend. If this setting is disabled and the AI is under attack, normal unit training will remain unaffected and the Unit Configuration setting, "Counter units while at peace and the threat is low," will determine whether or not any additional units are trained in order to combat sighted units.

  8. Enable Counter Buildings:
    If this setting is enabled, the counter-buildings system will prioritize the construction of the appropriate military buildings in order to create more locations for training to counter sighted enemy units. You can specify how many of each building type can be constructed to counter in the Building Configuration section.

  9. Enable Rush Detection:
    With this setting, you can specify whether or not you would like to detect enemy eagle rushes and knight rushes. If this detection is enabled, the AI will train a number of the appropriate counter units and prioritize research in order to strengthen them. In addition, if the counter-buildings system is enabled, a second barracks will be constructed, if necessary, to assist with their training.

  10. Allow Town Size Attack:
    If you require only group attacking during a phase, this setting must be disabled. If this setting is enabled, both town size expansion attacks and group attacks may be used depending on the situation in the field.

  11. Use Aggressive Training:
    If this setting is enabled, the resource conservation system will not be allowed to disable the use of gold and wood units entirely; it will only be allowed to limit expensive units. In addition, the 50 food villager buffer will be disabled. These adjustments will likely result in rapid militarization, at the expense of idle town center time and, thus, a weaker economy.

Economy Configuration

Lorem ipsum.

Unit Configuration

Lorem ipsum.

Building Configuration

Lorem ipsum.

Research Configuration

Lorem ipsum.