[freeciv-ai] Re: (PR#3467) more problems
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sat, 19 Apr 2003, Per I. Mathisen wrote:
> On Sat, 19 Apr 2003, Gregory Berkolaiko wrote:
> > > The patch works fine, but the idling problem is not completely solved. I
> > > am not sure why.
> >
> > I cannot do anything unless I have precise symptoms :(
>
> Uh, units stand still, like not moving, for several turns, but don't
> fortify? Happens in pretty much every AI game I play with lots of AIs (gen
> 1 or 3).
Ah, yes, here it is!
I guess the explorer code tries to send the unit past the enemy unit/city.
Calls ai_unit_goto, which sets activity to GOTO and calls do_unit_goto.
do_unit_goto cannot find a route because of ZoC conflicts (or finds a
ZoC-impossible route).
(This is just a guess but I think it's right)
I don't think I can do anything now. When I get back, I'll try to rewrite
explorer code in the PF with proper ZoC and enemies_at checks getting and
executing its own paths. An alternative is to change do_unit_goto but I
suspect PF is easier.
> > > Also, the explorer code does not check if moving ahead
> > > will place us in direct danger.
> >
> > A bigger solution is needed, in the form of danger map...
>
> Not pretty, but enemies_at() will do the job.
Misleading name, should be enemies_around and reside in ai/
G.
|
|