[Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
--- Petr Baudis <pasky@xxxxxxxxxxx> wrote:
> Dear diary, on Mon, Feb 25, 2002 at 03:03:00PM CET, I got a letter, where
> Raahul Kumar <raahul_da_man@xxxxxxxxx> told me, that...
> > > > Ah hah. By the way, for Per's info, the AI does establish trade routes.
> > > > There are crap routes though, the AI does not seem to check on city
> size
> > > > at all when establishing trade routes.I have never seen it establish a
> > > > trade route with a foreign civ.
> > >
> > > It doesn't as is obvious from the code - and the TODO implies that as
> well.
> > >
> >
> > Obvious from the code. Hmm must be some new definition of obvious. In
> > particular from line 1630 onwards in the ai/aiunit.c. So to be blunt, the
> > todo is wrong, and I'm not sure what code you are referring to that makes
> it
> > obvious that the AI does not establish trade routes.
> >
> > I'll expect your grovelling apologies.
>
> 1629 in your listing - it iterates only in citiees belonging to pplayer.
> Per's
> second patch is changing that, fullfilling the TODO and removing it :).
Where's the grovelling ;)?
Per is a regular superman. I'm surprised Tony hasn't had any comments on the
diplomacy front. I thought he was working on diplomacy code the last I heard.
Tony?
<snip>
> > 1627 /* A caravan without a home? Kinda strange, but it might happen. */
> > 1628 pcity=player_find_city_by_id(pplayer, punit->homecity);
> > 1629 city_list_iterate(pplayer->cities,pdest)
> > 1630 if (pcity && can_establish_trade_route(pcity,pdest) &&
> > 1631 map_same_continent(pcity->x, pcity->y, pdest->x, pdest->y)) {
> > 1632 tradeval=trade_between_cities(pcity, pdest);
> > 1633 if (tradeval) {
> > 1634 if (best < tradeval) {
> > 1635 best=tradeval;
> > 1636 best_city=pdest->id;
> > 1637 }
> > 1638 }
> > 1639 }
>
> Oh nice nice, w/o indentation in order to give me some more fun.. thanks! ;)
You're welcome. LOL.
> > >
> **************************************************************************/
> > > > > > > -
> > > > > > > static void ai_manage_ferryboat(struct player *pplayer, struct
> unit *punit)
> > > > > > > { /* It's about 12 feet square and has a capacity of almost 1000
> pounds.
> > > > > > > It is well constructed of teak, and looks seaworthy. */
> > > > > >
> > > > > > That comment is ridiculous. Kill it.
> > >
> > > Why yes? It's kinda funny and no particular reason why to remove it; the
> code
> > > has to be a little funny in onder to revive programmer lost in the
> wilderness
> > > of Syela's code.
> > >
> >
> > K, funny code is good enough reason. But when the AI crew is done no one
> else
> > will ever get lost in that wilderness again.
>
> It won't be done yet for some time ;). And then we'll find another reason why
> to keep it there, I hope :).
>
> --
>
> Petr "Pasky" Baudis
>
> * elinks maintainer * IPv6 guy (XS26 co-coordinator)
> * IRCnet operator * FreeCiv AI hacker
> .
> No one can feel as helpless as the owner of a sick goldfish.
> .
> Public PGP key && geekcode && homepage: http://pasky.ji.cz/~pasky/
>
We're getting further and further to the goal. And maybe the server side code
will die if the CMA really takes off.
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com
- [Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277), (continued)
- [Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277), Per I. Mathisen, 2002/02/25
- [Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277), Raahul Kumar, 2002/02/25
- [Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277), Raahul Kumar, 2002/02/26
- [Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277), Per I. Mathisen, 2002/02/26
- [Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277), Raahul Kumar, 2002/02/26
- [Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277), Tony Stuckey, 2002/02/26
- [Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277), Raimar Falke, 2002/02/26
- [Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277), Raahul Kumar, 2002/02/26
- [Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277), Raahul Kumar, 2002/02/25
- [Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277), Petr Baudis, 2002/02/25
- [Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277),
Raahul Kumar <=
- [Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277), Tony Stuckey, 2002/02/25
- [Freeciv-Dev] Re: patch: make ai understand peace and alliances (PR#1277), Raahul Kumar, 2002/02/25
|
|