Complete.Org: Mailing Lists: Archives: freeciv-ai: September 2002:
[freeciv-ai] Re: definitely last version of active diplomats patch
Home

[freeciv-ai] Re: definitely last version of active diplomats patch

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Per I. Mathisen" <per@xxxxxxxxxxx>
Cc: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] Re: definitely last version of active diplomats patch
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Mon, 9 Sep 2002 17:17:12 +0200

On Mon, Sep 09, 2002 at 11:01:09AM +0000, Per I. Mathisen wrote:
> On Mon, 9 Sep 2002, Raimar Falke wrote:
> > > > Can you please describe how the AI uses diplomats (which functions are
> > > > called in which order and do which tasks)? Can you also write down the
> > > > limitations and assumptions?
> ...
> > Not to me but write an entry in HACKING or README.ai
> 
> Diplomats are not special. They are treated just like any other unit by
> the AI. I can write a text on this in README.AI once I've cleaned up the
> use of roles and activities.

Why can't you put the text that you snipped above in one of the files?

> > > It can't be, since city_incite_cost() just updates
> > > pcity->incite_revolt_cost, and the incite bonus is dependent on who does
> > > the inciting. IMHO, city_incite_cost() should be called once for every
> > > city at turn start, so we don't need to everywhere else before
> > > pcity->incite_revolt_cost is used.
> >
> > So why don't we remove pcity->incite_revolt_cost and add a pplayer arg
> > to city_incite_cost?
> 
> That would be useful. I can have a look at it, but I don't think that is
> an issue that needs to be fixed before the diplomats patch hits cvs. 

> (Then the patch that you complain is big will get even bigger!)

No. It is a kind of pre-patch. A patch which cleans up issues which
were detected by the bigger patch. This is a common thing.

> > > > Compare incite_cost against INCITE_IMPOSSIBLE_COST.
> > >
> > > I'd rather assert that. Since we should check all possible reason why we
> > > can't incite here. If we missed one reason, we should fix it.
> >
> > And exactly this the reason why the CMA dump core if the results
> > doesn't match.
> 
> Good point. I won't assert that.

To make sure I got this right:

I said: see you have the same intentions

you said: since the CMA core dumps are annoying/cause a lot of bug
reports I don't want them anymore in the AI code

Correct?

> > > > What is the problem? Updating the cached value every turn is enough.
> > > >
> > > > > +  gain_incite *= SHIELD_WEIGHTING; /* cost to take city otherwise */
> ...
> > I understood the previous lines but not this multiplication with
> > SHIELD_WEIGHTING and the comment.
> 
> We assume that the more valuable the city, the better it is defended
> against conventional attacks...

Can you describe what unit does the gain_incite variable has before
the multiplication and what afterwards? I think this just doesn't add
up.

> I know, that is a laughable generalisation, and it makes us not desire
> small, cheap cities that can be bribed for a bargain, but as I've said
> over and over, making a good incite algorithm is very hard and can and
> should be done properly later.

        Raimar

P.S.: I don't the inflation of the term "can and should/would be done
later". History shows that these things get forgotten very quickly.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Python is executable pseudocode. Perl is executable line noise"
    -- Bruce Eckel


[Prev in Thread] Current Thread [Next in Thread]