DataCollection

Data Collection

The first thing any decision-making framework needs is data. The functions in this section collect information and present it in usable form to the rest of the AI. Many of them utilize global variables that are not player indexed and are intended to be refreshed every cycle.

WORKING FEATURES

OvermindReadLarva()

Counts the number of larva on the ground and provides an estimate of total larva production

Problems
  • Still includes the larva production rate for a Hatchery if that Hatchery has 3 or more larva on the ground and is not producing larva. This can result in the calculated rate of larva production being higher than actual. As a result, the calculated rate should be considered a maximum level of larval output that will only be seen when larva are being used about as quickly as they are being made.

OvermindReadEconomy()

Calculates income, resources available at all towns, and information about drone use.

  • Counts mineral and gas resources on the ground at all towns.
  • Counts number of extractors and number of unused vespene gas geysers.
  • Does not count extractors or geysers at towns where the vespene is completely depleted.
Problems
  • Vespene depletion is on a per town basis, not per geyser or extractor. This could result in believing that a depleted geyser is useful if it resides in a town with another geyser that is not depleted.
TODO
  • Find a way to deteremine the gas remaining in each vespene geyser individually.

OvermindReadBank()

Retrieves current levels of Minerals, Gas, Supply, and "Projected Supply" (includes Overlords in progress.)

OvermindMemory

This is not a function but an array. It provides player-indexed integer storage similar to the natives GetUserInt() and SetUserInt() but without possibility of conflict with other scripts and without the arbitrary limit of 256 entries.

  • Static array allows historical data storage.
  • Safe for use by all players.
  • Interface functions make access look like any other native AI function call.

Presently Used For:

  • Recording the number of peons that have been assigned to gas at each of 32 possible towns.
  • Tracking whether or not this player has run the Overmind's Initialization routines.

OvermindSetPeonGas() and OvermindGetPeonGas()

OvermindSetPeonGas() is a direct replacement for the AISetGasPeonCountOverride() function. Sets the number of peons on gas at a town and records that setting in OvermindMemory.

OvermindGetPeonGas() retrives the number of peons assigned to gas a a particular town.

  • It does not check peon status at the town, it only retrieves the last command for that town that was sent via OvermindSetPeonGas()

TODO

WISHLIST

  • Determine whether any waves are in combat and project change in food usage from coming losses.
  • Determine whether a base is under attack.
  • Create a system of base valuation based on resources remaining, harvest rate, and resources invested in buildings and drones.
  • Determine recoverable resources at a location such as Spine and Spore Crawlers that may be transferred when that location is exhausted (if there are no tech buildings to protect.)

Comments

Posts Quoted:
Reply
Clear All Quotes