← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/tibor-ai5 into lp:widelands

 

I just did some testing and have an improvement suggestion for the next AI branch.

Training sites are built before weapons production, and weapons production is built before the mountains have been reached to build some mines.

Suggestion: For each production site, get descr()->inputs(). Then iterate over inputs and check if we have a building (or a building tied to a constructionsite) that has the ware in its descr()->output_ware_types()

Maybe new buildings should add their output_ware_types() to a global container for efficiency, but the container would need to be updated as well when a building is destroyed/dismantled. Maybe a map of ware types and number of buildings that produce it?
-- 
https://code.launchpad.net/~widelands-dev/widelands/tibor-ai5/+merge/228762
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/tibor-ai5.


References