archive by month
Skip to content

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.

Trackbacks

No Trackbacks

Comments

Stanislaw Halik on :

> BuildingManager::validateWorkersAndBuildings() copied building objects unnecessarily.

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 :

If there is a bug in validateWorkersAndBuildings(), I can’t see it. Removing an item from _buildings does not invalidate the iterator for toRemove. A reference in toRemove becomes invalid when its building goes away, but that is the last step and the reference is not used again.

Stanislaw Halik on :

What I meant was to use vector::erase rather than making a separate "to-cancel" vector.

Sorry for the nitpicking. I'm still high on full C++17 support in Visual Studio 2017 Preview.

Jay Scott on :

I imagine it would be more efficient to use erase-remove, but I think it’s good enough the way it is. I could work full-time on improving low-level code details and never improve play at all....

Add Comment

E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Form options

Submitted comments will be subject to moderation before being displayed.