HomeGamesUpdatesPricingMethodology
Steam News29 April 20215y ago

DevDiary #17 - "Location, Location, Location" - April 2021

Hello fellow Guildians, This time around, our DevDiary #17 will concern itself with a small piece of a very large and complex system of The Guild 3 - the AI.

Full notes

Full The Guild 3 update

Read the full published notes in a cleaner layout. The original post stays linked below.

Repeated intro

Hello fellow Guildians,

What changed

0 fixes1 addition5 changes0 removals
  • Events
  • Gameplay
  • UI and audio
  • Performance
changedThis time around, our DevDiary #17 will concern itself with a small piece of a very large and complex system of The Guild 3 - the AI. The Guild 3 is a very complicated game, offering a vast amount of actions to take and choices to make at any point in time. In order to present a challenge to the player, the AI has to be able to pick a reasonable course of action, and follow it.
changedWe’ve previously presented some areas of the AI, so this time we will concentrate on one system we recently improved upon for the coming patch: Where the AI places its buildings!
addedThis might initially sound like a trivial task: “Just pick a good spot and build there!”. For a human it’s easy to pick a free spot for a new building, but for an AI, unless completely random placement is acceptable, several considerations have to be taken into account. We recently looked at where our AIs put their businesses and residences and determined that we needed something better. To understand what we arrived at, we must first see where we started:
changedThe old building placement was very simplistic. It basically followed three separate rules, based on what type of building needed to be built: - Residential buildings are simply built close to existing residential buildings. The average position of all owned residences is taken as a starting point, and nearby streets are searched for a free spot. This will cause families to build clusters of homes. The only time a family will “break out” of their starting area is when they upgrade to a house that can only be built in a city - they will then simply search for a buildable spot until they reach a city, and build there. - Warehouses are built in the middle of all owned businesses. This follows the same logic as above: Take the average position of all businesses, and start looking for a free spot on the closest street. - Businesses are built close to existing warehouses. If the family doesn’t own any warehouses, they will try to build close to a market instead. Similar to warehouses and residences, all businesses are close together, with the only outliers happening once city exclusive businesses are getting built.
changedIt is pretty obvious that this will always manage to find some valid spot for placing a building, the construction sites will likely be far from optimal. A fishing hut, for example, should try to build close to a fishing spot, and a herb hut should be placed close to a source of herbs, while a barber or preacher should try to find a spot that is in the middle of a highly populated area.
changedTherefore, we set out to improve on the old building placement logic, and came up with a few key aspects that should be supported: - It should be possible to specify individual rules per building type. - It has to be possible to specify buildings you want to build close to (e.g. resource providers, markets, etc…). - It has to be possible to specify buildings that you want to avoid (e.g. the competition, arsenals, robbers, etc…). - There should be no limit on the number of rules you can specify per building type. - The process of finding a spot that satisfies all those rules should be fairly quick (so that the game doesn’t hitch whenever an AI tries to place a building). - The process of finding a spot should be fault tolerant (so that if you

The Guild 3 changes

changedThis time around, our DevDiary #17 will concern itself with a small piece of a very large and complex system of The Guild 3 - the AI. The Guild 3 is a very complicated game, offering a vast amount of actions to take and choices to make at any point in time. In order to present a challenge to the player, the AI has to be able to pick a reasonable course of action, and follow it.
changedWe’ve previously presented some areas of the AI, so this time we will concentrate on one system we recently improved upon for the coming patch: Where the AI places its buildings!
addedThis might initially sound like a trivial task: “Just pick a good spot and build there!”. For a human it’s easy to pick a free spot for a new building, but for an AI, unless completely random placement is acceptable, several considerations have to be taken into account. We recently looked at where our AIs put their businesses and residences and determined that we needed something better. To understand what we arrived at, we must first see where we started:
changedThe old building placement was very simplistic. It basically followed three separate rules, based on what type of building needed to be built: - Residential buildings are simply built close to existing residential buildings. The average position of all owned residences is taken as a starting point, and nearby streets are searched for a free spot. This will cause families to build clusters of homes. The only time a family will “break out” of their starting area is when they upgrade to a house that can only be built in a city - they will then simply search for a buildable spot until they reach a city, and build there. - Warehouses are built in the middle of all owned businesses. This follows the same logic as above: Take the average position of all businesses, and start looking for a free spot on the closest street. - Businesses are built close to existing warehouses. If the family doesn’t own any warehouses, they will try to build close to a market instead. Similar to warehouses and residences, all businesses are close together, with the only outliers happening once city exclusive businesses are getting built.
changedIt is pretty obvious that this will always manage to find some valid spot for placing a building, the construction sites will likely be far from optimal. A fishing hut, for example, should try to build close to a fishing spot, and a herb hut should be placed close to a source of herbs, while a barber or preacher should try to find a spot that is in the middle of a highly populated area.

This time around, our DevDiary #17 will concern itself with a small piece of a very large and complex system of The Guild 3 - the AI. The Guild 3 is a very complicated game, offering a vast amount of actions to take and choices to make at any point in time. In order to present a challenge to the player, the AI has to be able to pick a reasonable course of action, and follow it.

We’ve previously presented some areas of the AI, so this time we will concentrate on one system we recently improved upon for the coming patch: Where the AI places its buildings!

This might initially sound like a trivial task: “Just pick a good spot and build there!”. For a human it’s easy to pick a free spot for a new building, but for an AI, unless completely random placement is acceptable, several considerations have to be taken into account. We recently looked at where our AIs put their businesses and residences and determined that we needed something better. To understand what we arrived at, we must first see where we started:

The old building placement was very simplistic. It basically followed three separate rules, based on what type of building needed to be built: - Residential buildings are simply built close to existing residential buildings. The average position of all owned residences is taken as a starting point, and nearby streets are searched for a free spot. This will cause families to build clusters of homes. The only time a family will “break out” of their starting area is when they upgrade to a house that can only be built in a city - they will then simply search for a buildable spot until they reach a city, and build there. - Warehouses are built in the middle of all owned businesses. This follows the same logic as above: Take the average position of all businesses, and start looking for a free spot on the closest street. - Businesses are built close to existing warehouses. If the family doesn’t own any warehouses, they will try to build close to a market instead. Similar to warehouses and residences, all businesses are close together, with the only outliers happening once city exclusive businesses are getting built.

It is pretty obvious that this will always manage to find some valid spot for placing a building, the construction sites will likely be far from optimal. A fishing hut, for example, should try to build close to a fishing spot, and a herb hut should be placed close to a source of herbs, while a barber or preacher should try to find a spot that is in the middle of a highly populated area.

Therefore, we set out to improve on the old building placement logic, and came up with a few key aspects that should be supported: - It should be possible to specify individual rules per building type. - It has to be possible to specify buildings you want to build close to (e.g. resource providers, markets, etc…). - It has to be possible to specify buildings that you want to avoid (e.g. the competition, arsenals, robbers, etc…). - There should be no limit on the number of rules you can specify per building type. - The process of finding a spot that satisfies all those rules should be fairly quick (so that the game doesn’t hitch whenever an AI tries to place a building). - The process of finding a spot should be fault tolerant (so that if you

Source

Steam News / 29 April 2021

Open original post

Changelog.gg summarizes and formats this update. How we read updates.