Complete.Org: Mailing Lists: Archives: freeciv-ai: July 2003:
[freeciv-ai] Re: AI Diplomacy v11 (PR#2413)
Home

[freeciv-ai] Re: AI Diplomacy v11 (PR#2413)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [freeciv-ai] Re: AI Diplomacy v11 (PR#2413)
From: "Gregory Berkolaiko" <Gregory.Berkolaiko@xxxxxxxxxxxx>
Date: Mon, 21 Jul 2003 10:32:54 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Mon, 21 Jul 2003, Per I. Mathisen wrote:

> On Sun, 20 Jul 2003, Gregory Berkolaiko wrote:
> > Here are some comments to the code (note that I haven't tried compiling
> > it, but spent about 1,5 hours reading the code):
> >
> > 1. Comment to aisupport_distance_to_player.
> > 2. Make greed() like progressive taxation.
> 
> I don't understand the two above.

Sorry, the list was started as notes to myself...

1. Comment to aisupport_distance_to_player was misleading: I felt when you 
talk about "closest city" it's the closest city to all of your nation.

2. Progressive taxation is when
(a) first 2,000 of your income are taxed at 10%
(b) earnings between 2,001 and 40,000 are taxed at 20%
(c) everything above 40,001 is taxed at 40%

Example: you earn 3,000 so you pay 2,000*10% + 1,000*20% = 400 gold.

It makes sense to code greed like this as well.

> > 4. Same, why can we not make peace with someone who is allied with our
> > enemy? It's good for us, and bad for our enemy (he will get annoyed and
> > break the alliance).
> 
> I think Thomas explain this one well.

I did not understand his explanation.

> > 5. Same,
> >       worth = greed(adip->love - (ai->diplomacy.love_incr
> >                                   + ai->diplomacy.love_coeff));
> > then, 5 lines below
> >       worth = greed(adip->love - (ai->diplomacy.love_incr
> >                                   * ai->diplomacy.love_coeff));
> > (a) note the disparity in the arthmetic
> > (b) why bother with love_incr/coeff ?Be simpler!
> 
> I am not sure what you want here.

Just put worth = greed(adip->love);

> > Also, it's good to define "gift", it took m a while to
> > figure out that it's a treaty with _every_ clause favourable to us.
> > Also, even if it's not a gift, just a favourable (overall) treaty, we can
> > increaselove by a smaller amount?
> 
> Hard to do right, I think.

Hmm, you manage to do it for gifts somehow.

> > 8. Does AI ever break an alliance, or only if it loses patience?
> 
> Correct.
> 
> > But AIs are true to their ally obligations, so this no threat to
> > patience.
> 
> The AIs do not always fulfill their ally obligations, I think.

I found this:

  /*** Declare war - against enemies of allies ***/

  players_iterate(aplayer) {
    struct ai_dip_intel *adip = &ai->diplomacy.player_intel[aplayer->player_no];

    if (aplayer->is_alive
        && adip->at_war_with_ally
        && !adip->is_allied_with_ally
        && !pplayers_at_war(pplayer, aplayer)) {
      notify(aplayer, _(TALK(%s) "Your aggression against my allies was your "
             "your last mistake!"), pplayer->name);
      ai_go_to_war(pplayer, ai, aplayer);
    }
  } players_iterate_end;

> > Need some strategic thinking, if the alliance is still needed.
> 
> I am not sure about this. I think breaking alliances would be bad for
> multiplayer games, while better for single-player. This is probably
> something that needs very careful fine-tuning.

I agree about fine-tuning, but I disagree that alliances should stay 
forever.

G.





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