Colony: Difference between revisions

From DominAnt
No edit summary
Line 35: Line 35:
* Slowly migrating actual [[Worker]] and [[Warrior]] amount towards the setting (ants are given new tasks)
* Slowly migrating actual [[Worker]] and [[Warrior]] amount towards the setting (ants are given new tasks)
* Sometimes cave ins and other accidents occur (decreasing capacity and killing ants)
* Sometimes cave ins and other accidents occur (decreasing capacity and killing ants)
 
* See [[Implementation]] for the actual calculations being done
= Technical implementation =
== Calculations done every other minute ==
For now calculations take place every other minute. r_nnn below is the ratio on that order setting. Using a linear model. This makes one colony "slow to turn" but by using many colonies it gets done faster. Use ar_worker=worker/(worker+warrior) in some formulas instead of r_worker to reflect the actual population.
* capacity += r_expand * ar_worker * const
* secret capacity += r_expand * ar_worker * r_secret * const  (NOTE: secret is a part of the capacity)
* workers += if (worker+warrior < capacity) r_breed * r_worker * const
* warriors += if (worker+warrior < capacity) r_breed * r_warrior * const
* food += min(capacity, (r_food * ar_worker - level) * (workers+warriors) * const), Gathering and eating, if r_food*ar_worker kept at level or above the food increase, else it decreases. Testing with level = 0.4. NOTE: Food can be negative, to affect how many dies in steps below.
 
Transform workers to warriors and vice versa
* if (to many warriors compared to workers) warriors -= const, worker +=const , i.e. if ar_worker > r_worker + 0.01
* if (to many workers compared to warriors) warriors += const, worker -=const , i.e. if ar_worker < r_worker - 0.01
 
Starving:
* if (food < 0) workers += food*ar_workers, warriors += food*(1-ar_workers)
* if (workers + warriors < 2) colony is dead
 
Decaying.
* food turn bad, slowly decreases? -= const similar to setting 1%?
Decaying both inhabited and not inhabited
* if (capacity > 10 or not inhabited) capacity slowly decreases -= const similar to setting 1%?
* if (capacity < 2 and not inhabited) nest is broken and destroyed
 
== Every 12 minutes ==
* Animals at colonies eat and destroy

Revision as of 09:43, 29 April 2016

The ant colony means the ants living together but here the word colony is normally also used to refer to the physical nest built underground too.

The different owner status of colonies

Properties

The colony has

  • Population (the number of ants living there). This population is directly related to the zone of control (zoc) that may interfere with other colonies. The area of the zoc in propotional to the polulation, i.e. the radius is propotional to the square root of the population.

Inherited from the nest:

  • Capacity (max ants and max food)
    • Experienced players may build secret chambers too. Those can not be destroyed by players themselves, only by ants.
  • Food (how much food is stored)
  • Location information, what country and region it is in. (used for scoring)
  • Name

Implementation note: All numbers are stored as floating numbers but the user interface rounds values.

Orders

The player may set what the ants should be doing in the colony. See Colony Orders

Founding

See Build Nest and Colonize

Over time

  • Ordered to expand, the colony expands the nest's capacity.
  • Ordered to breed the colony do so if there is enough capacity.
  • If the food level (r_workers * r_food) is above 40% the food increases. If lower it decreases and when out of food, ants start dying. NOTE: This is one way to kill your colony.
  • If the number of ants in the colony is bigger than the nest capacity limit, the number of ant is slowly decreased
  • Slowly migrating actual Worker and Warrior amount towards the setting (ants are given new tasks)
  • Sometimes cave ins and other accidents occur (decreasing capacity and killing ants)
  • See Implementation for the actual calculations being done