Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2002:
[Freeciv-Dev] Re: [PATCH] aiunit.c ai_manage_explorer cleanup (PR#1210)
Home

[Freeciv-Dev] Re: [PATCH] aiunit.c ai_manage_explorer cleanup (PR#1210)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Petr Baudis <pasky@xxxxxxxxxxx>
Cc: rf13@xxxxxxxxxxxxxxxxxxxxxx, freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] aiunit.c ai_manage_explorer cleanup (PR#1210)
From: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Date: Mon, 14 Jan 2002 05:14:24 -0800 (PST)

--- Petr Baudis <pasky@xxxxxxxxxxx> wrote:


> It's cleaning up this function as well? If it does, and it's available
> somewhere, I would like to see it as an inspiration.
>

Ask GB for the current warmap patch. If you like, I can send you the older
ones I have on hand.
 

> Stalled.

I saw you already discussed this with GB. You might be right on making it
a future patch.

 
> > > -  /* BEGIN PART ONE: Look for huts.  Non-Barbarian Ground units ONLY. */
> > > +  /*
> > > +   * PART 1: Look for huts
> > > +   * Non-Barbarian Ground units ONLY.
> > > +   */
> > > +  
> > 
> > I prefer your way. It looks like time for a jehad on old style comments.
> I didn't see similiar style anywhere else.

I was referring to the way you replaced the previous comment style

BEGIN PART ONE

with 

PART 1 Sentence

Looks much neater to my eyes.


On threshold, I have not sent it in yet. I'll be sending my igter_speedup
patch,
my initial threshold patch and the want stuff to the ai people soon. Let me
know
if you think it is worthy for general audience.
 
> > > +    /* Move cost to the best target (=> lower is better) */
> > >      int bestcost = maxcost * SINGLE_MOVE + 1;
> > 
> > You did not explain why we add 1. It's so that we can find other paths
> > that have the same movecost as the minimum cost one(due to djikstras).
> > If you do this elsewhere, forget it.
> I don't agree, I actually think it's much simpler - just this way we can
> never trigger the goto, as bestcost is higher than maxcost * SINGLE_MOVE.
> We don't reuse this value anywhere else so I don't think it has a deeper
> mean.

That's not what I get from the comment. I'm not quite sure you're right on
this.
Elsewhere in the movement code we seem to add one to get other paths besides
the
first lowest cost path we found.


> README.AI stuff. (read as "I'm too lazy to add this and don't like it here"
> ;)

That's fine. I'm waiting for the patch.


__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/


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