Complete.Org: Mailing Lists: Archives: freeciv-dev: July 1999:
Re: [Freeciv-Dev] PATCH: AI governments + PATCH hell level
Home

Re: [Freeciv-Dev] PATCH: AI governments + PATCH hell level

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: brunel@xxxxxxxxxxxxxxxxxxxx (Nicolas Brunel)
Cc: rizos@xxxxxxxxxxx, freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] PATCH: AI governments + PATCH hell level
From: Rizos Sakellariou <rizos@xxxxxxxxxxx>
Date: Thu, 8 Jul 1999 00:21:32 -0500 (CDT)

> > On Wed, Jul 07, 1999 at 06:10:40PM +0000, Nicolas Brunel wrote:
> > > +    if (strcmp(pplayer->name,"old000")>0 &&
> > > strcmp(pplayer->name,"old999")<0)
> > > +       ai_eval_buildings_old(pcity);
> > > +    else
> > > +       ai_eval_buildings(pcity);
> > > 
> > > Now, one knows what name to use to have pre-rizo AIs vs rizo AIs.
> > 
> > Wouldn't it be natural to use the ai levels for this purpose?
> 
> Yes !

Just a remark here:

The code above is left *only* to assess current behaviour in 
the evaluation of buildings from the AI (ai_eval_buildings_old)
with the new improved approach for evaluation of buildings. 
As i said, the new approach makes a more elaborate assessment of 
unhappiness (necessary to sustain democracy) - and of course it can
also be used by AI's staying all time in Republic (so, essentially,
there is no reason for ai_eval_buildings_old).

 
> Attached is a patch with Rizo patch in it updated to latest cvs +
> a new level hell (I like 4 letters commands). Hell is gamelevel 9.
> I add new command CMD_HELL for the server. Use 'hell' level exactly as you
> use 'easy','normal' and 'hard' level before.
> 
> Here some comments and some changes I have done to Rizo patch :
> 
> --- In aihand.c
> 
> put player.h respecting alphabetic order.

Well, my compiler complained when including city.h before player.h
If no one else faces the same problem, this may have to do with 
some rather out-of-date files in my private world...

 
> I don't like the fc_malloc in ai_hand.
> Why don't you C mechanism 
> ...
> { struct city tmpcity; 
> ...
> }
> 
> When you write *tmpcity=*pcity, what does It do with
>  int ppl_happy[5], ppl_content[5], ppl_unhappy[5];
> 
> Does it really copy the array or only int * ?

No, the whole thing is copied. I think this is fairly
standard behaviour... 

 
> Use pplayer->ai.skill_level instead of player name.

See above... As i said eval_buildings_old has no reason
to be in the code.


 
> --- In advdomestic.c
> 
> Remplace 2 if (0) freelog by freelog

Correct!

 
> Put int railroad_trade(struct city *pcity) ROAD->RAILROAD 

That has been a bug in the existing version. The function
railroad_trade is used for the evaluation of Superhighways,
but Superhighways are affected by road, not railroad.


 
> --- In advdomestic.h 
> 
> Declare the function ai_eval_buildings_old(pcity); to have no implicit
> declarations.
> 
> --- In aicity.c
> 
> Use pplayer->ai.skill_level instead of player name.

Allowing the AI to choose any government depending on pplayer->ai.skill_level
should be done in ai_manage_government in aihand.c
The quick (and dirty) fix in aicity.c is only to have a comparative
behaviour with the current AI. This can be removed - only 
ai_eval_buildings() needs to stay.


So the question is (***opinions_are_sought!***):

- Do we want the AI to be able to change governments at all levels?
- Should we create a new level (as Nicolas suggested) ?
- Or should we allow the AI to switch between different governments
  at the hard level (or normal too)?

Personally, i'd vote for the 3rd option (ie allow the AI to change
governments in normal/hard - or at least hard level). I think that
even though the AI becomes more powerful this way, it will still
be lagging behing good players in development and therefore all
this will be of little (if any use).

Once the above is agreed, i can prepare the final patch.

--rizos


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