Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2001:
[Freeciv-Dev] Re: RFC: Fixing movement code
Home

[Freeciv-Dev] Re: RFC: Fixing movement code

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Petr Baudis <pasky@xxxxxxxxxxx>
Cc: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: RFC: Fixing movement code
From: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Date: Thu, 29 Nov 2001 02:24:41 -0800 (PST)

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

> 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. I thought you
had already finished

* when capital in big danger, move palace (if launched spaceship, do it fast!)

* 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.

> Maybe I will also setup cvsweb for it for interested ppl ;-).
> 

Interested person here.

> > 1) Get rid of all hardcoded no's like 6 * 12 for threshold, 0 for railroad
> move
> > costs, and fix the code so that it does not assume magical nos.
> > (I'm mostly done, aicleanupv3.diff is coming soon)
> Yeah!

I think we're mostly done. My theory on threshold

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)

Threshold is normally used to control the maximum distance that the warmap
will find a path to. Additional comments Petr?

> > 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.

> > 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. 
 

> 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.
 


__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1


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