Changes between Version 3 and Version 4 of PetraBot


Ignore:
Timestamp:
Sep 18, 2014, 11:26:34 PM (10 years ago)
Author:
mimo
Comment:

fix wiki anchors

Legend:

Unmodified
Added
Removed
Modified
  • PetraBot

    v3 v4  
    99All modules must have an update() function, this gets called every n turn that the AI runs. They also have an optional init() function which is called once before the first turn of the AI, once the gameState is available. Futhermore, all the events (i.e. messages sent when an entity is destroyed, renamed, ...) received by the AI in turns where it does not update its modules are kept and concatenated so that none are lost.
    1010
    11 = [#headquarter Headquarter] =
     11= [=#headquarter Headquarter] =
    1212
    1313The headquarter module is divided in several sub-modules as attackManager, baseManager, ... which are described below. It is responsible for the development of the civilization (building structures and training units) and the steering of its different sub-modules.
     
    2727The tradeManager deals with barter and trade. It is responsible for finding the best available trade route (either on land or water), training traders and switching trade route when a better one is available. (the version in A17 was rudimentary, a more complete is ready and will be commited after the release).
    2828
    29 = [#queueManager QueueManager] =
     29= [=#queueManager !QueueManager] =
    3030
    3131The queueManager has several individual queues under its control, which each have a priority (dynamically adjustable). Plans (queueplan-building.js, queueplan-research.js and queueplan-training.js, all deriving from queueplan--.js) are created when necessary by the modules and are added to a suitable queue. The plans persist and are never destroyed until they are executed.
     
    3535Note: This is the only code that ever trains or builds things. If the word is used within other modules then it means adding to to queue system in order to be trained or built.
    3636
    37 = [#accessibility Accessibility]
     37= [=#accessibility Accessibility]
    3838
    3939= Variability of AI strategy =