bugFreeciv - Bugs: bug #20761, Illegal treaty lives forever

 
 
Show feedback again

bug #20761: Illegal treaty lives forever

Submitted by:  Marko Lindqvist <cazfi>
Submitted on:  Tue 23 Apr 2013 09:17:42 AM UTC  
 
Category: aiSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Release: Operating System: None
Planned Release: 2.5.0, 2.6.0

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Mon 01 Dec 2014 04:02:58 AM UTC, SVN revision 27163:

AI cancels old clauses before building up a new treaty proposal.

See bug #20761

(Browse SVN revision 27163)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Mon 01 Dec 2014 04:02:50 AM UTC, SVN revision 27162:

AI cancels old clauses before building up a new treaty proposal.

See bug #20761

(Browse SVN revision 27162)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun 23 Nov 2014 04:50:49 AM UTC, comment #5:

- S2_5 version

Probably not porting to S2_4. While this fixes real problems in AI diplomacy (them being unable to agree on new treaties between each other) it's a bit risky change for very mature branch, to a bug with which we have lived without big problems for a long time, probably from the time diplomacy between AI players was first added.

(file #22951)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Wed 19 Nov 2014 09:45:10 PM UTC, comment #4:

- Handle more (all) treaty building places

(file #22926)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Wed 19 Nov 2014 05:32:05 AM UTC, comment #3:

Attached untested patch empties old treaty before starting to construct new one. Having only clauses turned illegal would make them just unacceptable for one party (trading tech for tech turning to one-sided when the other side gains tech some other way)

(file #22924)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue 23 Apr 2013 11:43:01 AM UTC, comment #2:

A simple solution would seem to be to iterate over open treaties at the beginning of players_iterate_alive{} in dai_diplomacy_actions() (near the "Try to make peace..." comment), closing any that are unacceptable to the player on whose behalf the function is running prior to determining if new clauses should be proposed. I'm presuming that when an AI player submits a proposal, their evaluation loop is suspended whilst the respondant considers it, but I haven't read enough of the AI diplomacy code to be sure of this: if this assumption is invalid, so is this suggestion.

For AI<->AI diplomacy, this would provide a mechanism to avoid the described problem. For AI<->Human diplomacy, it would avoid Humans having unacceptable treaty windows sit open for a long time (perhaps as a means of judging current AI love, by whether a given pact happens to immediately be acceptable).

Emmet Hikory <persia>
Project Member
Tue 23 Apr 2013 10:39:38 AM UTC, comment #1:

> it's probably bug that they end in such a situation even if tech
> loss is involved


That's probably caused by more general "Unaccepted treaty lives forever" -issue. As far as I can see treaty between AI players is never rejected or cancelled. It's either accepted or waits acceptance forever, even if it turns to illegal one over time.

Main problem in such active treaties is that they block all future diplomacy between the players (players cannot even enter ceasefire once there has been proposal the other party didn't want to accept sometime in the past)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue 23 Apr 2013 09:17:42 AM UTC, original submission:

I got treaty between two AI players that they are unable to accept due to one of them not having the tech he is supposed to give away (it's probably bug that they end in such a situation even if tech losss is involved). As handle_diplomacy_accept_treaty_req() aborts early, treaty is never removed. Each turn the AIs try to enter ceasefire, but new clauses are just added to the illegal treaty they cannot accept.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #22951:  OldTreaty-S2_5-2.patch added by cazfi (3kB - text/x-diff)
file #22926:  OldTreaty-2.patch added by cazfi (4kB - text/x-diff)
file #22924:  OldTreaty.patch added by cazfi (1kB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by persia (Posted a comment)
  • -unavailable- added by cazfi (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 01 Dec 2014 04:03:30 AM UTCcazfiStatusReady For Test=>Fixed
      Assigned toNone=>cazfi
      Open/ClosedOpen=>Closed
    Sun 23 Nov 2014 04:50:49 AM UTCcazfiAttached File-=>Added OldTreaty-S2_5-2.patch, #22951
      Planned Release2.6.0=>2.5.0, 2.6.0
    Wed 19 Nov 2014 09:45:10 PM UTCcazfiAttached File-=>Added OldTreaty-2.patch, #22926
    Wed 19 Nov 2014 05:32:05 AM UTCcazfiAttached File-=>Added OldTreaty.patch, #22924
      StatusNone=>Ready For Test
      Planned Release=>2.6.0
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup