Skip to content

Converting Sharpy KnowledgeBot to SkeletonBot

DrInfy edited this page Dec 4, 2020 · 1 revision

SkeletonBot is intended to give the author more control of the features they want to use within sharpy than what KnowledgeBot does.

In order to use SkeletonBot, just replace the KnowledgeBot inheritance with SkeletonBot and override configure_managers method.

Here is a working example that brings most of the features KnowledgeBot back to a SkeletonBot.

class ExampleSkeletonBot(SkeletonBot):
    def __init__(self):
        super().__init__("The Example Skeleton")

    def configure_managers(self) -> Optional[List[ManagerBase]]:
        return [
            MemoryManager(),
            PreviousUnitsManager(),
            LostUnitsManager(),
            EnemyUnitsManager(),
            UnitCacheManager(),
            UnitValue(),
            UnitRoleManager(),
            PathingManager(),
            ZoneManager(),
            BuildingSolver(),
            IncomeCalculator(),
            CooldownManager(),
            GroupCombatManager(),
            GatherPointSolver(),
            ActManager(self.create_plan()),
        ]

    def create_plan(self) -> BuildOrder:
        return BuildOrder(
            ...
        )
Clone this wiki locally