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 01:38:28 -0800 (PST)

--- Petr Baudis <pasky@xxxxxxxxxxx> wrote:
<snip>
> > c is used in numerous ai funcs. I just like to be absolutely sure of the ai
> > code. Make one small change and it snowballs into an avalanche.
> True. I'm dumb, I messed it up. When we remove c which is zero, we need to
> remove too * SHIELD_COST after it. So the formula will look 'a bit'
> differently
> :|.  Sorry for that, just discovered it now when feeding my patches to my
> private AI CVS...

We're hardly dumb. I have long been an advocate of break it to see how it works
;). By the way, I think they originally meant to use c, but never got around to
using it in the formula properly. My best guess is going to come in
amortise-who
knows if it will work.diff. There is a lot of stuff in the ai like that.

Goals for cleanup:

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)

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.

3) Diplomacy? Fix it so that the AI does not always go to war with other
players.

4) Do you find these hardcoded wonder effects a good idea? I think we should
try to convince people to get rid of B_Colossus etc. There's a patch from the 
AC people which makes generalised AI improvements.

Let me know if you agree with them.

__________________________________________________
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]