[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]
--- Petr Baudis <pasky@xxxxxxxxxxx> wrote:
> Dear diary, on Mon, Jan 14, 2002 at 02:14:24PM CET, I got a letter,
> where Raahul Kumar <raahul_da_man@xxxxxxxxx> told me, that...
> > > 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.
> Greg? :)
>
Gregory Berkolaiko. Yes, and I don't call him Greg because we already have a
Greg Wooledge.
> > > > > - /* 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.
> Sure. Just I dunno what're 'old style comments', as I didn't see this
> anywhere
> else than in this function.
>
I've seen it elsewhere.
> > 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.
> Post it on the list :).
>
> > > > > + /* 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.
> Sure, but then we would have to add +1 generally in the bestcost assigment
> bellow when we find the path with less cost. I've no idea how it would be
> able
> to help us with finding alternative paths when adding +1 in initialization.
Hmm, looks like I'm going to have to read this again. You might be right, I'll
get back to you on this.
__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/
- [Freeciv-Dev] [PATCH] aiunit.c ai_manage_explorer cleanup (PR#1210), Petr Baudis, 2002/01/06
- [Freeciv-Dev] Re: [PATCH] aiunit.c ai_manage_explorer cleanup (PR#1210), Raimar Falke, 2002/01/06
- [Freeciv-Dev] Re: [PATCH] aiunit.c ai_manage_explorer cleanup (PR#1210), Petr Baudis, 2002/01/07
- [Freeciv-Dev] Re: [PATCH] aiunit.c ai_manage_explorer cleanup (PR#1210), Raahul Kumar, 2002/01/08
- [Freeciv-Dev] Re: [PATCH] aiunit.c ai_manage_explorer cleanup (PR#1210), Ross W. Wetmore, 2002/01/10
- [Freeciv-Dev] Re: [PATCH] aiunit.c ai_manage_explorer cleanup (PR#1210), Petr Baudis, 2002/01/13
- [Freeciv-Dev] Re: [PATCH] aiunit.c ai_manage_explorer cleanup (PR#1210), Raahul Kumar, 2002/01/14
- [Freeciv-Dev] Re: [PATCH] aiunit.c ai_manage_explorer cleanup (PR#1210), Petr Baudis, 2002/01/14
- [Freeciv-Dev] Re: [PATCH] aiunit.c ai_manage_explorer cleanup (PR#1210),
Raahul Kumar <=
- [Freeciv-Dev] Re: [PATCH] aiunit.c ai_manage_explorer cleanup (PR#1210), Petr Baudis, 2002/01/14
- [Freeciv-Dev] Re: [PATCH] aiunit.c ai_manage_explorer cleanup (PR#1210), Greg Wooledge, 2002/01/14
|
|