-
Notifications
You must be signed in to change notification settings - Fork 27
Converting Sharpy bot from before 2.0 version
DrInfy edited this page Dec 6, 2020
·
4 revisions
The big difference between KnowledgeBot
before 2.0 version and after 2.0 version is that Knowledge
now hardly contains any functionality and is there to just hold the managers that do the actual work. Only forced managers in Knowledge
are VersionManager
, ActionManager
and LogManager
. When the refactor is fully completed, there will not be any references to any other manager in Knowledge
or Component
.
- Managers like
self.zone_manager
andself.roles
are inKnowledgeBot
instead ofKnowledge
. -
Knowledge
no longer containsself.known_enemy_units
and you should instead use the similar functionality inBotAI
instead: python-sc2 instructions - Prefiltered properties like
.enemy_townhalls
and.known_enemy_workers
no longer exist inKnowledge
and are instead available inIUnitCache
. -
RequireCustom
now takes in theSkeletonBot
class instead ofKnowledge
. This is in line with the change to keep the manager home in the bot instead. -
Component
classes (basically almost everything in sharpy) no longer contain direct links to every single manager in Sharpy. Instead you should request managers for the current component withself.get_required_manager(ManagerType)
instead. - In order to reduce the forced bloat from sharpy, some of the managers have been removed from the default
KnowledgeBot
:ChatManager
andBuildDetector
. You can add them back by overridingconfigure_managers
method inKnowledgeBot
- Shortcut
knowledge.possible_rush_detected
is no longer available and BuildDetector.rush_detected should be used instead. - All shortcuts to
ZoneManager
properties inKnowledge
have been removed and references toIZoneManager
properties should be used instead.
- Plans and Build Order
- Settings, debug and logging
- Structure and Life Cycle
- Unit Roles
- Unit Cache
- Running Games
- Converting Sharpy bot from before 2.0 version
- Converting Sharpy KnowledgeBot to SkeletonBot
- Converting Python bot to minimal Sharpy bot
- OLD: Extending Your Existing Bot With Sharpy
- Packaging For Ladders
- Extending Sharpy
- Advanced Build Order tricks
- Machine Learning With Sharpy