AI building too many military buildings

Bug #951548 reported by spth
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Medium
Unassigned

Bug Description

I have often noticed this issue, both in build16 and current bzr: The AI likes to build many military buildings, rather than using the materials to build something productive.

Typical situation:
http://pholia.tdi.informatik.uni-frankfurt.de/~philipp/widelands/shot0001.png

As you can see, the border region is full of military buildings on both sides of the border, most of them empty. The AI should really stop building military buildings in a region until they are at least half full on average or so.

Philipp

P.S.: I know the AI is dumb and probably needs a rewrite or major overhaul, but this looks like a serious issue for longer games that could probably fixed quick and dirty for now.

Tags: ai
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Hi spth and welcome to Launchpad!

I have noticed the AI have a tendency to go a bit overboard and build loads of military buildings as well. (Especially, or maybe it's just more noticable when it has run out of soldiers or materials to finish the buildings).

From my observation, this only seem to happen close to borders which face an enemy player. In other words, if only the eastern border face an enemy, the west, south and north borders don't seem affected. I suspect the AI is trying to place defensive buildings along the enemy border but overestimates a bit what it needs to protect itself (or simply doesn't notice it already has additional defenses which are being built). Just speculations as I don't know how the AI think.

Changed in widelands:
importance: Undecided → Medium
status: New → Confirmed
tags: added: computerplayer
Revision history for this message
SirVer (sirver) wrote :

Setting to incomplete for bug sweeping.

Changed in widelands:
status: Confirmed → Incomplete
Revision history for this message
wl-zocker (wl-zocker) wrote :

I think this is quite a big idiocy what the AI does. It wastes many resources for the buildings and when it gets some soldiers, every building gets occupied with one of them. The AI cannot attack, but its buildings can easily be conquerred.
Tibor is currently working on the AI (https://code.launchpad.net/~tiborb95/widelands/tiborb-ai). However, I do not know if he intends to change the building of military buildings.

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Yes, this goes straight back to confirmed. I don't know the details of Tibor's patch, but we may want to revisit a lot of the ai/computerplayer bugs once that has been reviewed and merged to see which have been fixed.

Changed in widelands:
status: Incomplete → Confirmed
Revision history for this message
TiborB (tiborb95) wrote :

Please review the behavior with trunk, revision 7080 and later. Problem should be mitigated.

There are too checks added:
a) AI does not built another military building if x of them are unoccupied
b) AI now counts capacity of soldiers in near buildings and does not start another building if the capacity is sufficient

Revision history for this message
SirVer (sirver) wrote :

If this times out I consider it fixcommitted.

Changed in widelands:
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for widelands because there has been no activity for 60 days.]

Changed in widelands:
status: Incomplete → Expired
SirVer (sirver)
Changed in widelands:
status: Expired → Fix Committed
milestone: none → build19-rc1
GunChleoc (gunchleoc)
tags: added: ai
removed: computerplayer
GunChleoc (gunchleoc)
Changed in widelands:
status: Fix Committed → Fix Released
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build19-rc1.

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.