[Freeciv-Dev] Re: RFC: Fixing movement code
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
> > My TODO has some too - http://pasky.ji.cz/~pasky/dev/freeciv/TODO
>
> I'm reading it right now. You should number your todo items.
It's not so easy, as it is pretty hard to keep it sorted by priority, because
it is not clear to me frequently.
> I thought you had already finished
>
> * when capital in big danger, move palace (if launched spaceship, do it
> fast!)
I didn't. Yup, there is savepalace patch, but it then applies to all players,
and AI should do that even w/o that. And you will lose spaceship anyway, as the
palace is first removed and then built elsewhere, not vice versa.
> * phalanx inside city attacking against horsemen outside on ordinary terrain?!
> (loosing obviously)
>
> It might be worth it, if you have five phalanxes, and there are stacked units
> with the horsemen. Who cares if you lose 2 phalanx if you destroy for e.g
> 3 catapaults stacked with the horseman.
It was one phalanx inside city and one horsemen outside. But don't mind now,
maybe
it was just my buggy code ;-).
> > Maybe I will also setup cvsweb for it for interested ppl ;-).
>
> Interested person here.
http://pasky.ji.cz/cvsweb.cgi/freeciv/ai/?cvsroot=aiciv
Have fun :-). Basically most changes were already posted as patches before,
so changes you may be most interested in are in advdomestic.c, which now looks
very differently than before ;-).
> When threshold is added to by 1, that is to allow us to find paths of the
> same cost as the one we currently found (normally the first lowest cost path)
>
> Threshold is increased when we want to go exploring unknown squares
> (currently by 9)
I still think it's 3 * THRESHOLD
>
> Threshold is normally used to control the maximum distance that the warmap
> will find a path to. Additional comments Petr?
So now the comment would look like:
/*
* Maximal distance of our targets in tiles, in fact the warmap won't find
* path to more distant places. It prevents us to move too far away, when we
* want something - we will simply ignore anything outside this range.
*
* When comparing it to warmap costs, don't forget to multiply it by move_rate
* of the unit. If you don't care about particular unit or its move_rate, use
* SINGLE_MOVE instead. (should we make most of those unit-dependent?)
*
* When we want to find paths with the same cost as the one we currently
* found, we increase THRESHOLD by 1 for that purpuose.
*
* Frequently used multiplied by 2, however bigger multipliers don't make much
* sense. THRESHOLD is increased when we want to go exploring unknown squares
* too.
*/
Still concerned about SINGLE_MOVE vs move_rate somewhere. I don't see reason
for using raw SINGLE_MOVE when working with THRESHOLD most times, shouldn't we
really use move_rate rather?
> > > 2) Comment these mysterious functions and get rid of all those variables
> > that
> > > actually do nothing. Explain the wonders of amortise. Petr, suggest away
> > > which funcs you find most irritating.
> > find_something_to_kill()! process_attacker_want()! kill_something_with()!
> > :-)
> > Other may appear, as I still didn't read all the code.
>
> Is it just me, or after reading find_something_to_kill, the first thing you
> want to do is kill_something_with? Voodo at work.
It's not just you ;-))).
> > > 3) Diplomacy? Fix it so that the AI does not always go to war with other
> > > players.
> > Nothing to fix, afaik we have to implement it completely. At least I yet
> > didn't
> > saw any existing code for that. I think I will first try to fix some bugs in
> > my
> > TODO, to make myself more familiar with making changes into AI.
>
> Adding diplomacy is a huge task. These tasks are ranked in order of priority.
> After we finish 1 & 2 we will tackle 3 & 4.
Yeah.
> > It would be nice, however I don't see how to implement this clearly and
> > there
> > are more urgent things to do. It's too far away ;-).
>
> The idea is that we use what the Freeciv Alpha Centauri people have already
> done.
--
Petr "Pasky" Baudis
UN*X programmer, UN*X administrator, hobbies = IPv6, IRC
Real Users hate Real Programmers.
Public PGP key, geekcode and stuff: http://pasky.ji.cz/~pasky/
- [Freeciv-Dev] Re: RFC: Fixing movement code, (continued)
- [Freeciv-Dev] Re: RFC: Fixing movement code, Petr Baudis, 2001/11/22
- [Freeciv-Dev] Re: RFC: Fixing movement code, Raahul Kumar, 2001/11/23
- [Freeciv-Dev] Re: RFC: Fixing movement code, Petr Baudis, 2001/11/28
- [Freeciv-Dev] Re: RFC: Fixing movement code, Raahul Kumar, 2001/11/29
- [Freeciv-Dev] Re: RFC: Fixing movement code, Petr Baudis, 2001/11/29
- [Freeciv-Dev] Re: RFC: Fixing movement code, Raahul Kumar, 2001/11/29
- [Freeciv-Dev] Re: RFC: Fixing movement code,
Petr Baudis <=
- [Freeciv-Dev] Re: RFC: Fixing movement code, Raahul Kumar, 2001/11/23
|
|