AI stocklevel not taken into account for building neededness

Bug #1827279 reported by hessenfarmer
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Won't Fix
Undecided
Unassigned

Bug Description

the current stocklevel (i.e. shortage of ware) is not taken into account for neeededness of a productionsite building.

I promisingly experimented with the following lines after l5710 in defaultai.cc:

   inputs[107] = std::abs(management_data.get_military_number_at(190)) - get_stocklevel(bo, gametime);
   inputs[108] = std::abs(management_data.get_military_number_at(191)) - get_stocklevel(bo, gametime);

however this stalls again. keep analysing

Tags: ai

Related branches

Revision history for this message
TiborB (tiborb95) wrote :

I plan resume training soon, so you can just add more such lines and let AI training cope with them...

Revision history for this message
hessenfarmer (stephan-lutz) wrote :

I currently tested these things in a local copy of the fri03 branch to see whether AI is capable of performing the scenario. I made good progress already. However I will prepare a branch over the weekend. I'll be afk of my development machine until Friday evening.

Current behaviour of AI is that it stops building economy after a while, I will investigate.

Furthermore AI doesn't build second carrier recruiting sites (except for frisians where they are build due to the fur output), will investigate that as well, cause we will need them if we really start producing wares

Revision history for this message
TiborB (tiborb95) wrote :

The problem with carriers are that it is hard to measure necessity of its output (no stocklevel of course), but if I remember properly, it is tied to number of buildings but also the building score might be too low...

GunChleoc (gunchleoc)
tags: added: ai
Revision history for this message
hessenfarmer (stephan-lutz) wrote :

I think stocklevel of carriers is available but not taken into account as it is calculated for ware by default, also the code is there to calculate it for workers as well. I'll have look into this for sure, cause currently frisians are favoured by Ai in this particular part.

Changed in widelands:
status: New → In Progress
milestone: none → build21-rc1
assignee: nobody → hessenfarmer (stephan-lutz)
Changed in widelands:
status: In Progress → Fix Committed
Changed in widelands:
assignee: hessenfarmer (stephan-lutz) → nobody
Revision history for this message
GunChleoc (gunchleoc) wrote :
Changed in widelands:
status: Fix Committed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.