Steamhammer 1.4.4 change list
Steamhammer bugfix version 1.4.4 is uploaded to SSCAIT. It has only been a week since the last version was uploaded, so the changes are not many. The bug fixes probably mean slightly less inexplicable erratic behavior. Zerg is slightly smarter because of a few small tweaks, but it may not be easy to tell.
After rechecking the CIG publication dates, the next public release may not be until October, after AIIDE submission closes. We’ll see; there is plenty of time before then for me to change my mind.
the Bruce bugs
The bugs found by Bruce Nielsen (Locutus) and related fixes.
• BuildingManager::validateWorkersAndBuildings()
copied building objects unnecessarily.
• BuildingManager::cancelQueuedBuildings()
and BuildingManager::cancelBuildingType()
unsafely deleted buildings from the _buildings
vector while looping through it.
• Squad::releaseWorkers()
had a similar deletion bug.
• MapTools::nextExpansion()
had a typo that caused it to do a check with the wrong coordinates.
other code changes
• UnitUtil::GetAttackRange()
and UnitUtil::GetAttackRangeAssumingUpgrades()
mistakenly returned the weapons range of a reaver or a carrier as 8 pixels, rather than 8 tiles (8 * 32 pixels). “We’re perfectly safe at this distance, folks!”
• I am reworking DistanceMap
as the foundation of a range of classes that keep a number for each tile of the map. A new base class Grid
provides the basic data structure, initialization to a constant value, and lookup. DistanceMap
is renamed to GridDistances
. I wrote a new class GridAttacks
as a start on a kind of influence map; some code is there, but it is not yet tested or used, so exercise care.
• Removed the unused BuildingData
class, and the unused method MicroManager::calcCenter()
.
• Removed more unnecessary includes.
zerg
• If an expansion hatchery fails to build, the building manager turns it into a macro hatchery instead. It prevents Steamhammer from sending drone after drone to expand and losing them all. It’s a low-level trick instead of the high-level tactical safety analysis that should be done, but it’s simple and it works moderately well.
• Versus protoss, count only corsairs, scouts, and carriers as reason to make devourers. Steamhammer played a game in which it made devourers to combat the enemy’s large number of observers. “I know how to beat that plan!”
• On 2 player maps, increase the chance of playing rush-safe ZvZ openings. Also rejiggered fast pool chances (suggestion by Antiga). A number of other probabilities are adjusted, mostly to make more diverse choices so that learning has data to work with.
Comments
Stanislaw Halik on :
The fix from your link looks bogus, see: https://en.cppreference.com/w/cpp/container/vector/erase
While it invalidates the original iterator, the newly-returned iterator is ok, so the common idiom is "it = vec.erase(it);". Call "cancel-building" first, then delete as mentioned.
Other than that, do you have version control up, other than releasing tarballs?
Jay Scott on :
Stanislaw Halik on :
Sorry for the nitpicking. I'm still high on full C++17 support in Visual Studio 2017 Preview.
Jay Scott on :