continue optimize sc2bot
now can beat all races veryhard level
sometimes can beat zerg CheatInsane level
committing history:https://github.com/ferryzhou/sc2_bots/commits/main/han
several critical optimizations:
- enabled micro
- enable mule in mining
- enable faster expansion
- fix placement issues
- fix some bugs
- tuned production
- handle early game cheese
mostly changes are based on prompts + ai code. sometimes need to understand the code and fix some bugs introduced by ai. or do some refactoring.
uploaded bot to ai arena. let’s see what happens.
there’s still some room to improve.
Commits on Mar 15, 2025
add run.py for hanbot.
ferryzhou committed23 minutes ago 30abb31
remove some prints.
ferryzhou committed38 minutes ago 2ee2fbc
enable handling opponent cheese. some prompts: "in early defense mode, attack opponent structures that have attacking capability (like cannon) and opponent workers first." "in early defense mode, a…
ferryzhou committed5 hours ago 3b3df9e
tune expand_base. total_minerals < 1000 to total_minerals < 2000 for base skips.
ferryzhou committed10 hours ago 049acd9
update expand_base function. Now can beat veryhard terran. Prompt 1: "optimize base expansion to maximize minerals collection.". Prompt 2:"for existing_base_locations, also count base in pending."
ferryzhou committed11 hours ago d7dd5f1
Commits on Mar 13, 2025
allow two base expansion at the same time. fix tank attacking bug and refactor the function.
ferryzhou committed2 days ago ef9d2b3
tune expand_base a little bit to allow faster expansion.
ferryzhou committed2 days ago 276df0f
Commits on Mar 12, 2025
Now we can win zerg and protoss veryhard.
ferryzhou committed3 days ago 8ebf1ba
fix a iteration counting bug.
ferryzhou committed3 days ago 1b462a8
move manage_army out of per 10 iteration step. also leave 20% idle production to prepare for base expansion.
ferryzhou committed3 days ago 7fc1568
Add run_local_games.py to have han bot vs lishimin bot.
ferryzhou committed3 days ago 0fc12d8
build more gas as we have mule mining now.
ferryzhou committed3 days ago 5289503
Commits on Mar 11, 2025
lift barracks limit as we have more resources left.
ferryzhou committed4 days ago 363f1f3
tune nearby enemy range so base can be protected. also tuned barrack techlab vs reactor ratio.
ferryzhou committed4 days ago 7200eac
Commits on Mar 10, 2025
prompt: when we check "if current bases are saturated", we should exclude bases that's nearly depleted.
ferryzhou committed5 days ago 9ab28f3
fix a defense bug. current execute_defense is simply rally.
ferryzhou committed5 days ago c779509
simplify fallback attack logic.
ferryzhou committed5 days ago 0eba305
simplify execute_defense. also add behavior to avoid idle units in attacking mode.
ferryzhou committed5 days ago e1cd227
prompt 1: enable mining with mule.. prompt 2: if found enemies near our base, attack them instead of attack enemy base.
ferryzhou committed5 days ago a44c81b
prompt: enable micro for units.
ferryzhou committed5 days ago d7faa38
tune some attack params.
ferryzhou committed5 days ago 7d8c480
attack if we have significant army value advantage.
ferryzhou committed5 days ago a3f10a0
Commits on Mar 9, 2025
update should_attack function to check whether we have combat advantage.
ferryzhou committedlast week 270dc13
fix allocation_ratio error introduced by ai. move barracks build after factory.
ferryzhou committedlast week 77bddac
further update placement function to separate buildings so tank can pass through. prompt: in placement function, leave some room between different structures to allow tank to move out.
ferryzhou committedlast week 5cc75ff
tuned shoud_attack parameters.
ferryzhou committedlast week a3de42a
build medivacs before ravens.
ferryzhou committedlast week c17c82a
better placement. previously buildings are too close to each other or too crowded. add_on not considered. prompts: 1. have a funciton to calculate where to place the building, make sure there's eno…
ferryzhou committedlast week ec58f15
Fixed a attacking army allcoation bug introduced by ai.