Comments (2)
As a point of view from history, first iteration of the micro had things like MicroBack
, MicroForward
, FocusFire
and RegroupUnits
etc. This is pretty close to what you are suggesting.
Now the problem with that was that it started to get extremely hard to keep track what step in the chain does what and if there is a bug, which of these steps is causing the issues.
In the current version the only and best way to implement custom micro is to replace individual unit micro classes.
i.e.
self.knowledge.group_combat_manager.micros[UnitTypeId.ROACH] = MyRoachMicro()
I haven't written the wiki pages for this, because I'm not happy with this solution.
What I am thinking now, is to have a class that contains the basic rules for micro. Let's call it MicroRules
. Combat manager would have the current settings as default, but the user could use his own set of Rules
by giving them in command execute like this combat_manager.execute(pos, MoveType.Assault, my_micro_rules)
Or you could write whatever you'd like in the default Rules
. I think it is important for users to be able to temporarily set a different kind of micro for example to your flanking units without the need to mess up with your main army logic.
Thanks for the feedback as that really helps to understand the needs better.
from sharpy-sc2.
Drafting something like this now:
class MicroRules:
regroup_func: Callable[[Point2, List[CombatUnits], MoveType], None]
focus_fire_func: Callable[[MicroStep, Unit, Action, Optional[Dict[UnitTypeId, int]]], Action]
melee_focus_fire_func: Callable[[MicroStep, Unit, Action, Optional[Dict[UnitTypeId, int]]], Action]
ready_to_shoot_func: Callable[[MicroStep, Unit], bool]
init_group_func: Callable[[MicroStep, CombatUnits, Units, List[CombatUnits], MoveType], None]
def __init__(self) -> None:
self.regroup = True
self.unit_micros: Dict[UnitTypeId, MicroStep] = dict()
self.regroup_threshold = 0.75
# How much distance must be between units to consider them to be in different groups, set to 0 for no grouping
self.own_group_threshold = 7
from sharpy-sc2.
Related Issues (20)
- Add Flake8 linting
- Protect expanding workers longer in ActExpand
- Roles manager should drop roles for units aren't claimed each step
- Void Rays are losing DPS because they stutter step
- Add Lurkers and other burrowed units to Memory Manager
- Disruptor shot improvements
- Account for zerg morphed units in enemy units manager HOT 1
- Make sharpy compatible with multiple SC2 versions HOT 1
- Cyclone bot crashes HOT 2
- flake8 ignores exclude configuration when used through pre-commit hooks
- Add mechanism for requesting manager by name or type
- Rename acts and requirements to be simpler
- Plan heat defender is broken
- only_once optional parameter for BuildAddon()
- Add Auto turrets to raven micro
- upgrades get queued in the same building if the upgrades are not in a sequential list
- Fix Protoss Natural wall on Pillars of Gold LE HOT 1
- Army gets stuck on a single zergling
- Default micro for Liberator HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sharpy-sc2.