Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2004:
[Freeciv-Dev] Re: (PR#9741) Problem inside setup_isledata() (not really
Home

[Freeciv-Dev] Re: (PR#9741) Problem inside setup_isledata() (not really

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: mstefek@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#9741) Problem inside setup_isledata() (not really important)
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 20 Aug 2004 22:14:27 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=9741 >

Jason Short wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=9741 >
> 
>>[mstefek - Fri Aug 20 07:03:17 2004]:
> 
>>Example: Suppose we have three players and two islands. The first one  
>>with goodies = 2000 and the second with goodies = 1000. The first one  
>>will get 3 starting positions and the second only one.
> 
> 
> This patch uses Hamilton's method (from the distribute() function, see
> PR#9755) to distribute starting positions.  In the above case it should
> work fine and give 2 starters on the big island with 1 on the smaller. 
> This may not be more fair in all situations but at least the algorithm
> is guaranteed (the algorithm in use looks kindof like Webster's
> algorithm which can in very rare cases entirely fail).

Actually I believe the algorithm in use is Jefferson's method, which is 
similar to Webster's method but worse.  See 
http://instruction.elgin.cc.il.us/classes/mth101/summary4.htm. 
Webster's method is better than Jefferson's method, and is more "fair" 
than Hamilton's method.  The drawback is that both Webster's and 
Jefferson's method can completely fail for some inputs.  The code 
handles this failure by adding on extra starting positions (as in 
Mateusz's example).  This _may_ be more fair than Hamilton's method but 
I don't think it's worth the complexity of duplicating the methods. 
(Webster's method cannot be used for distribution of trade since in that 
case we have a fixed amount of trade that must be distributed.)

jason




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