[Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification (rev
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12833 >
Well I trust you will tell me when I get on your nerves:
I looked at the source and it seems to me it
1)iterates over all cities, all tiles, and there is no break or return
to return early
2)higher value of newtiles is good
If I go wrong in the above, I'm probably wrong in my ideas below.
Now, thinking aloud, if one had cache of
>int diff = new_tile_value - old_tile_value;
such that one could determine max over all tiles/all tiles within my
borders on this continent of(diff), or if one would simply guess
at/predetermine the maximum max gain of all possible terrain
improvements,
then one should be able to break off the loop early, assuming the loop
would be rewritten to proceed from tiles close to the settler to tiles
far away, when the movement cost gets to high to justify the possible
max benefit of (max-bestdiff), similar to using alpha-beta pruning in
chess. This would largely supercede the need for
>&& WARMAP_COST(ptile) <= THRESHOLD * mv_rate
and make it redundant except as a failsafe.
I realize I am assuming
1) that is somehow possible to loop over all destinations close to a settler
2) (optionally) that the improvement diff for each tile can and is
predetermined(which may be good anyway), requiring a reverse lookup of
all cities that may use the tile.
I hope I made sense,
bless papa razzi,
yours,
Peter
On 4/19/05, Brian Dunstan <bdunstan149@xxxxxxxxx> wrote:
>
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=12833 >
>
> --- Mike Kaufman <kaufman@xxxxxxxxxxxxxxxxxxxxxx>
> wrote:
> >
> > <URL:
> > http://bugs.freeciv.org/Ticket/Display.html?id=12833
> > >
> >
> > On Tue, Apr 19, 2005 at 07:47:35AM -0700, Brian
> > Dunstan wrote:
> > >
> > > Against dropping the divisor, or against
> > converting to
> > > floating point?
> >
> > against converting to floating point.
> >
> > -mike
>
> Yeah I don't think a decision on that is imminent.
> It would be a lot of work to do, and as you say there
> are arguments pro and con with respect to speed,
> accuracy, etc.
>
>
> __________________________________
> Do you Yahoo!?
> Plan great trips with Yahoo! Travel: Now over 17,000 guides!
> http://travel.yahoo.com/p-travelguide
>
>
- [Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification (rev.), Brian Dunstan, 2005/04/19
- [Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification (rev.),
Peter Schaefer <=
- [Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification (rev.), Brian Dunstan, 2005/04/19
- [Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification (rev.), Brian Dunstan, 2005/04/19
- [Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification (rev.), Brian Dunstan, 2005/04/19
- [Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification, (Eddie Anderson), 2005/04/20
- [Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification, Brian Dunstan, 2005/04/20
- [Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification, Peter Schaefer, 2005/04/20
- [Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification, Brian Dunstan, 2005/04/20
- [Freeciv-Dev] (PR#12833) Re: (PR#12844) Re: consider_settler_action simplification, (Eddie Anderson), 2005/04/29
- [Freeciv-Dev] Re: (PR#12833) Re: (PR#12844) Re: consider_settler_action simplification, Peter Schaefer, 2005/04/29
|
|