Changes between Version 3 and Version 4 of PetraBot
- Timestamp:
- Sep 18, 2014, 11:26:34 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PetraBot
v3 v4 9 9 All 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. 10 10 11 = [ #headquarter Headquarter] =11 = [=#headquarter Headquarter] = 12 12 13 13 The 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. … … 27 27 The 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). 28 28 29 = [ #queueManagerQueueManager] =29 = [=#queueManager !QueueManager] = 30 30 31 31 The 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. … … 35 35 Note: 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. 36 36 37 = [ #accessibility Accessibility]37 = [=#accessibility Accessibility] 38 38 39 39 = Variability of AI strategy =