Jump to content
Asophix

Under the Hood - Bot Definitions and Behaviour

Recommended Posts

With the Skirmish mode coming up and the next demos being released, one may wonder how the computer opponents will get their personality and tactics. There are few details known so far, but the AI definitions have been given a lot more detail, so now we can speculate as to what each of them will do.

Below I will outline and detail, what defines a SH4 computer opponent, and what implications it may bring. Please keep in mind that everything written is mostly my speculation, and details may change over time! 😉 Enjoy!

 

How it Looked in Earlier Games

There is one baseline intelligence running all the computer opponents, as is tradition for all Stronghold games - the characters vary in choice of buildings, units and trade.

For a very long time - up until Crusader 2! -, the AI had to be told in a very fine detail what it should build, as well as how its castle should look like. These allowed for considerably easy design, but it quickly became obvious how repetitive and limited the computer plays: it blindly composed unit groups as told, and threw them in battle.

In Stronghold Warlords, the baseline AI got a large needed boost to its capabilities, replacing the deterministic this "printing press"-like strategy with self-sufficiency: it can adjust building and recruiting based on its demands. Early on, the Warlords opponents build a lot of woodcutters and rice farms to take care of basic necessities, then they branch into other economic aspects.

In short: at the cost of definition detail, the AI no longer makes the same armies. Instead, it decides for itself when to launch smaller probing attacks, and proper sieges, respectively. Considering the similarities in the current files, SH4 will very likely continue with this implementation.

 

Definition Details

The SH4 AI will have three general groups of attributes: castle pool, economic, military.

  • The Castle pool is currently empty, since Skirmish is not yet added.

Economic Attributes:

  • Maximum Rank: the AI will not attempt to rank all the way up to maximum. This limits weaker characters from playing at full strength.
  • Maximum Banquet Variety in the Kitchen: the AI will not attempt to hold richer banquets.
  • Target Fear Factor Rate: the AI will build Bad or Good Things in the castle to reach this limit.
  • Target Housing Value: the AI will try to ensure that this many free peasants are available at all times.
  • Building Chain Toggles: if enabled, the AI will develop and sustain a specific production branch.
    • These can separately be given a maximum rank so that the AI will not utilise them once this rank is reached. An example would be turning off Dances once the AI reached its full potential.   
    • The following chains can be configured:
      • Turnip Farms
      • Apple Farms
      • Dairy chain (Dairy Farm, Cheesemonger)
      • Wheat chain (Wheat Farm, Mill, Bakery)
      • Inns / Ale chain (Hops Farm, Brewery, Inn)
      • Spirit ~ Religion (Chandler's Workshop, religion buildings)
      • Dances (Sheep Farm, Weaver's Workshop)

Military attributes:

  • Minimum Attacks Before Siege: the AI will launch at least this many raids before attempting a siege camp attack.
  • Iron Needed for Troops: the AI will provide iron mines and workshops, if set.
  • Troop to Worker, Troop to Siege Multipliers: these two numbers determine the troop limit, which scales based on how many workers (and siege equipment?) the AI keeps around. Generally as the bot grows its economy, the harder its armies grow and hit.
  • List of Troops: the AI will recruit these units. The AI will keep its units in the castle until it decides to send them in a raid or a siege.
    • Each troop has a weight to alter how much the AI favors making them. Some units will be liked more by the AI.
    • There is also a rank limit to stop the AI from recruiting each troop type, which serves the purpose to phase out weaker units in later stages of the game.
  • List of Siege Equipment: the AI will make these siege equipment when attempting a proper siege.
    • Same attributes as the "List of Troops" property.
  • List of Starting Troops: determines what troops the AI starts the game with.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Topics

    • V1.3 Release - Pre-steam Edition Definitions

      V1.3 has arrived for the SH2 Lord Editor! After @ Ser Steffen  came with an inquiry and realising how the SH2 v1.0 lord definitions work with the Steam Edition, this update has spawned to accommodate the changes. There are a few differences making this game rules version inferior though and I do not recommend it for use, more like for browsing-viewing purposes.   Changelog: Added support to parse and save definitions dating back to SH2 v1.0. Saving preserves the game

      in AI Lord Editor

×
×
  • Create New...