AI dismantles militarysites at the border

Bug #1794960 reported by Benedikt Straub
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Won't Fix
Medium
Unassigned

Bug Description

The AI frequently dismantles militarysites right at the border, thus losing territory and inviting attacks. Sites are dismantled even if the AI "knows" it´ll lose territory by doing so.
Observed e.g. with red player in second frisian scenario.

See also bug 1792478 #26.

Tags: ai
Revision history for this message
TiborB (tiborb95) wrote :

I ques this is probably because of shortage of soldiers and too much vacant soldier positions....

Revision history for this message
Benedikt Straub (nordfriese) wrote :

I don´t think that´s the cause here. The AI starts with a lot of soldiers, and I could see that it still had several of them left in the HQ and no vacant positions at all…

Revision history for this message
TiborB (tiborb95) wrote :

I see. This behavior is controlled fully by genetic algorithm, so there is not much that can be done in the code, maybe do some C++ debug to see why AI decided to do it. BTW can you estimate the distance from dismantled militarysite to nearest enemy military site?

Revision history for this message
Benedikt Straub (nordfriese) wrote :

Here´s a screenshot: The AI (red) just dismantled the Sentry, losing some territory that is now held by my Outpost. It also dismantles the Tower a few minutes later, which will not lose any territory but is also an obvious mistake.

Revision history for this message
TiborB (tiborb95) wrote :

Yes, it seems not reasonable.

Among other things AI counts own vs enemy soldiers around the military building that it probably came to conclusion that it had odds 4:1 so it is fine to dismantle the sentry.
I might had preserve the tower though...

I plan to run another rounds of testing, though I am now very restricted with access to home PC, so it is not simple.... it is not very feasible just to do simple C++ code change...

But generally final result is what matter, not partial action...

Also I presume it was before they started fight and/or AI is not pressed from other side

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

I have seen this many times now. Best to be seen while watching a 4 players AI only game on several maps. (normally I use full moon for that).
The behaviour is not related to whether the AI has contact with the enemy or not.
Even after having been in fight it dismantles strong military buildings with no obvious reason.

After b20 is out I will start investigating this any further.

Revision history for this message
TiborB (tiborb95) wrote :

OK

Revision history for this message
Toni Förster (stonerl) wrote :

The problem is worse in peaceful mode. I was able to push the ai back to its headquarter just by placing military buildings close to the border and waiting for it to dismantle its buildings.

Revision history for this message
GunChleoc (gunchleoc) wrote :
Changed in widelands:
status: Confirmed → 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.