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.

_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to     : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to