How Dogtato's Layered Micro Architecture Makes Every Unit More Effective

In this session we explore how @chad (Dogtato) structures his bot’s micro using a layered decision tree that gives every unit self-sufficient behavior β€” from dodging banelings to retreating toward allies that counter its threats.

Key Takeaways

:building_construction: Layered decision tree per unit β€” Every unit runs through the same priority chain: avoid effects β†’ use ability β†’ move to repair β†’ attack β†’ retreat β†’ move to position. Each step can be overridden per unit type via subclassing.

:factory: Factory pattern for micro instances β€” MicroFactory.get_micro(unit) returns the correct subclass (MarineMicro, SiegeTankMicro, etc.), so you just call micro.move(position) without worrying about unit-specific logic.

:brain: Retreat toward counters, not just away β€” Instead of fleeing randomly, units retreat toward allies that counter their current threat. Marines retreat toward bunkers; ground units retreat toward tanks. This turns retreat into a tactical repositioning.

:crossed_swords: Squad-level tactics, individual-level micro β€” The military class handles high-level decisions (attack, defend, retreat as a group) and tells squads where to go. Individual micro handles the moment-to-moment: kiting, dodging, stutter-stepping. The two layers don’t need to know about each other.

:wrench: Perfectable unit behavior β€” Dogtato views each unit’s micro as independently perfectable. You can tweak Siege Tank siege/unsiege logic without touching Marine kiting. Add a new unit type by subclassing BaseUnitMicro and overriding only what’s different.

:high_voltage: Swarm intelligence from simple rules β€” No central coordinator tells units what to do in combat. Each unit evaluates threats, picks targets, and retreats based on local information, producing coordinated behavior without coordination code.