Complete.Org: Mailing Lists: Archives: freeciv-ai: September 2003:
[freeciv-ai] (PR#6278) Problems in ai_military_gothere
Home

[freeciv-ai] (PR#6278) Problems in ai_military_gothere

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [freeciv-ai] (PR#6278) Problems in ai_military_gothere
From: "Gregory Berkolaiko" <Gregory.Berkolaiko@xxxxxxxxxxxx>
Date: Thu, 25 Sep 2003 07:01:56 -0700
Reply-to: rt@xxxxxxxxxxxxxx

... and in ai_military_attack

One of the biggest I found is
        if (ground_unit_transporter_capacity(punit->x, punit->y, pplayer)
            <= 0) {
          /* FIXME: perhaps we should only require only two passengers */

i.e. boat will leave only when it thinks it's full.  This makes
transports non-functional.  Also it might create a loop 
units want to go -> boat refuses to leave -> units want another boat
-> capacity increases

Removing this if helps a lot.  A boat might leave without units
bodyguard but that's units responsibility...

Even after boat left there will be problems, heres a log (with y comments):

2: 31's Howitzer[1125] (59,24)->(-1,-1){0} mil att gothere -> 63, 38

// (63,38) is not the closest target here, by far...

2: 31's Howitzer[1125] (59,24)->(-1,-1){0} wants a bodyguard,
danger=3255, my_def=600

// asked for a bodyguard, didn't get one, maybe shouldn't go?

2: 31's Howitzer[1125] (59,24)->(-1,-1){-1} Looking for boat[727].
2: 31's Howitzer[1125] (59,24)->(-1,-1){-1} Found boat[727], going (63,38)
2: 31's Howitzer[1125] (59,24)->(-1,-1){-1} Found beachhead (64,37)
2: 31's Transport[727] (59,24)->(64,37){0} All aboard!
2: 31's Howitzer[1125] (60,29)->(63,38){-1} Not moving

// boat took us to (60,29), but not arrived yet, we return to 
// ai_military_attack

2: 31's Howitzer[1125] (60,29)->(63,38){-1} mil att gothere -> 63, 38

// which sends us back into ai_military_gothere!

2: 31's Howitzer[1125] (60,29)->(63,38){-1} wants a bodyguard,
danger=3255, my_def=600
2: 31's Howitzer[1125] (60,29)->(63,38){-1} Looking for boat[0].
2: 31's Howitzer[1125] (60,29)->(63,38){-1} Not moving

// come back to ai_military_attack, it will also send us exploring 
// and then home...


This all is a bit idiotic.  Needs a lot of fixing and debugging.
But it's all doable and not so hard either, just add more of these
UNIT_LOG calls ;)

Best wishes,
G.


[Prev in Thread] Current Thread [Next in Thread]
  • [freeciv-ai] (PR#6278) Problems in ai_military_gothere, Gregory Berkolaiko <=