LifeGameBot

HomePage | Memberswill go by tor | RecentChanges | Join |

The bot's name is LifeGameBot who is in the channel \lifegame of freenode IRC network and operates the game rules. All users commands are by means of private message with the bot in the syntax of section 0 below. Players can chat on IRC with each other publicly privately or simply choose their preferred methods for any negotiation which is not covered but necessary in the game. Players can use any IRC clients software to irc.freenode.net or using the web interface https://webchat.freenode.net to play the game.

Sec 0. Syntax. IRC channel \ lifegame syntax. IRC 火腿族頻道 \lifegame 操作命令 Sec 1. Game plot-English Sec 2. 遊戲腳本-中文 Sec 3. Strategy 攻略 Sec 4. Known bug 已知問題

Sec 0. Syntax

The things in the game are exampled as below.

example: battery, goods_1, ele_2, person_3, sol_0, sol_5_3, factory_goods_1, factory_ele_2, energynote

meaning: battery, goods of type 1, element of type 2, person of type 3, plain solar energy generator, solar energy generator of type 5 of age 3, factory of goods of type 1, factory of element of type 2, energy ownership in the quarantine

The commands are listed as below where A means an English word and Q means a positive number.

help

description: send me the manual; this document.

play

description: tell the bot to participate the game.

trade A A A Q A Q

description: barter trade with someone. The two players can chat by any means to agree on the term of the trade by both. Then they both send the bot the exactly same trade message to express the agreement and do the trade.

example: trade Albert Bob battery 1. 2 ele_4 34. 56

meaning: Albert gets 1. 2 battery from Bob and Bob gets 34. 56 element of type 4 from Albert.

trade A A A Q energynote Q Q

description: typical trade by energy note with someone. The two players can chat by any means to agree on the term of the trade by both. Then they both send the bot the exactly same trade message to express the agreement and do the trade.

example: trade Albert Bob battery 1. 2 energynote 3. 40 . 1

meaning: Albert gets 1. 2 battery from Bob and Albert pays 3. 4 energy note to Bob and 0. 1 energy note for transaction fee.

helper Q

description: contribute some energy to help confirmation of the cash flow.

example: helper 0. 03

meaning: the player contributes 0. 03 energy to confirm a block of cash flows of trades.

resource

description: show the player's current belongings data and status.

blockchain

description: show the blockchain.

create A Q

description: create some subjects by some amount.

example: create person_6 3. 4

meaning: create 3. 4 person of type 6.

trash A Q

description: trash some subjects by some amount.

example: trash goods_6 1. 2

meaning: trash 1. 2 goods of type 6.

save Q Q

description: save some energy to quarantine to get the energy note.

example: save 1. 20 . 01

meaning: save 1. 2 energy to quarantine and pay 0. 01 transaction fee.

withdraw Q Q

description: withdraw real energy from the quarantine.

example: withdraw 1. 20 . 01

meaning: withdraw 1. 2 energy from quarantine and pay 0. 01 transaction fee.

invest Q Q

description: invest some energy note.

example: invest 1. 20 . 01

meaning: invest 1. 2 energy note from quarantine and mark it in lending pool and pay 0. 01 transaction fee.

cashout Q Q

description: cashout some investment.

example: cashout 1. 230 . 01

meaning: cashout 1. 23 energy in the lending pool and put back to quarantine and pay 0. 01 transaction fee.

borrow Q Q

description: borrow some energy note from the lending pool.

example: borrow 0. 230 . 01

meaning: borrow the amount of lending pool and will repay 0. 23 more energy note at the due date of the borrowing and pay 0. 01 transaction fee.

repay Q Q

description: repay the repayment.

example: repay 10. 230 . 01

meaning: repay 10. 23 energy note back to the lending pool and pay 0. 01 transaction fee.

war A A

description: raise war with someone. If two players want war. Then both players send the bot the exactly same war message to start the war.

example: war Albert Bob

meaning: Albert and Bob in war.

next

description: go on to the next period. 00

Sec 1. Game plot -English

It always requires constant amount of energy to boiling 100 gram of water while non-constant amount of equivalent fiat currency.

This is a game to deliver some essential concept#s in a world following laws of physics as simple as possible. One player for one country. The goal of the game is to help the country's existence by encouraging civilization, being strong against the invaders or to survive with people death rate as lower as possible. There are many subjects; many types of people, many types of elements and elements' factory, many types of goods and goods' factory, battery and energy note. A solo homesteadyer can learn about diversity, birth, death, energy, wealth. A social player who likes to interact with other players can in addition learn about economic scale, money, saving, investment, trust, trade, war. The concepts introduced in the game are all mathematically deductible, including, for example, investment sourced from saving not thin air never leads to uneven wealth, robustness of a country will be guarded by diversity; the misunderstanding or unawareness of these crucial concepts are the root causes of many real world problems and the bad performance of a player in the game.

Energy can be saved in battery or consumed. All subjects can be traded. Each type of goods will decrease the death probability of the specific type of person if these goods are functioning. Each type of person also faces a disaster of wipe out with probability during each period. Producing the goods requires energy and a manufacture factory. Keeping these goods functioni00ng requires energy. Energy will diffuse to heat and no longer being used but luckily there is a constant energy flux 1 energy for 1 unit of soil size from the Sun. Soil is the base material of all subjects and can be used to create persons or solar cells of different types or elements or goods or manufacture. Conversely, all subjects will turn into soil in any destruction action and the energy contained in these subjects is not usable and diffuse to heat.

These are rules ( X and Y are positive integer) of the game. The plot and these setting numbers look weird for the sake of speedy change in the game.

  1. Initially, with equivalent 10000 soil, a random number of persons and goods of random types are given to the player's country. All the work can not be done if no persons alive. Game is over when country population down to less than 0. 01.
  2. Energy can be generated by solar cells or trades with other players.
  3. One battery == one soil +5 energy
  4. One battery can contain energy up to 1000
  5. One person = one soil + 10 energy
  6. One person needs 10 energy per period to live
  7. One element of type X=X= one soil +5. 5 X energy00
  8. One solar cell == one soil +1 energy. Plain solar cells generate 1 energy per period.
  9. Elements can increase the power of plain solar cells when they are used on the plain solar cell. One solar cell of type X=X= one solar cell + one element of type X
  10. One solar cell of type X becomes one plain solar cell after 10 period with power decreasing from 1.0+1.0X to 1.0+0.9X, ..., to 1.0+0.1X, and at time 11 the elements become soil
  11. Numbers of persons of type Y has the one period death probability which is a decreasing to zero with amount of working goods of type Y increasing to infinity; in this game it is set to 1.0 / (2.0+ working goods Y amount). So the population of next period of person type Y is current population of person type Y times 1-1.0 /(2.0+ working goods Y amount) if without disaster; the probability of disaster of a period is 0.1 .
  12. One goods of type Y needs 10 energy per period for working
  13. One goods of type Y= one soil +10 energy
  14. Each goods of specific type needs a factory to manufacture. Each elements of specific type needs a factory to manufacture. One factory =1000 soil +20 energy.
  15. Amounts of all subjects are real numbers and all subjects can be traded by transactions. Moving any 1 subject costs 1 energy.
  16. Transactions of any subjects can be done by barter between two players, exchange ratio negotiable by the two players. Double-spending-money flaw is not present in b00arter transactions.
  17. Transactions can be done by energy note, aka a typical transaction, between two players if the buyer has the energy note. Transactions fee is responsible by buyers. An energy note of amount resembles energy ownership in the quarantine. Typical transaction needs to specify an arbitrary positive amount as the transaction fee. Because validating of any consensus needs energy,the purpose of the transaction fee energy is to compensate the helpers who validate the transactions so that the double-spending-money flaw can be avoided;see 20 below. If there is only one helper,it resembles the case of a centralized exchange or a banking account to solve the double-spending-money flaw.
  18. Players can recall the battery by giving in the energy notes back to the quarantine. However,with the constant energy flux throughout the country and for the sake of avoiding transportation cost,the energy in the quarantine is seldom claimed back. Therefore an energy note is essentially the proof-of-work just like gold or ancient Indian shell. In order to have some energy note,the player must have spent the energy without public doubt,unless stealing or conspiracy with the seller.
  19. Players can get energy note in three ways:(i) moving a full or partial real battery to the quarantine. (ii) producing selling some subject in typical transaction for a buyer. (iii) luck in earning the transaction fee in ii and i by devoting some energy to validate the transaction mentioned in ii and the energy amount mentioned in i. A solo player's country might not have any energy note but wealthy and strong.
  20. The detail of(iii)above is as below. An updated transaction block of all the transactions,if any,is created when the total helpers devoting energy is larger than the total transaction fee. The total transaction fee contributed by all transactions in the transaction block is grant to only one helper by probability proportional to the helper's devoting energy. The transaction block is designed in such a way that modifying one block would require recreation of all the following blocks with the same devoting energy of these blocks. The energy note consensus is represented and guarded by the longest blockchain because to overrule the state of the longest blockchain needs the greatest amount of energy among all blockchains. Therefore amount of energy ownership of each player can be trusted when it is buried deep in the blockchain. Every helper has a blockchain. A helper will include the new trades into the block if the helper thinks the buyers have sufficient energy note. Every player can count the energy balance in the quarantine of every player.
  21. The energy note can be marked to part of the lending pool and the energy amount stated in the note will not be in the quarantine and will be available to all potential borrowers so that the lending pool participant is facing possible loss of investment in case the borrower does not repay and possible gain of investment in case the borrower completes the repay obligation.
  22. Players can borrow energy battery from the lending pool;borrower shall repay the interest at the time of repay borrowing which is 5 periods;in case the borrower doesn't repay in time,the borrower's name is broadcast to public and can not deal in energy note for 10 periods. The player who first claims to borrow after a lending pool is ready is the borrower. The repayment will be grant to the lending pool participants based on his stake.
  23. Two players can be in war. War winning probability is proportional to amount of working goods. Losing player's belongings will turns into soil and the soil will be grant to the winning player.

Sec 2. 遊戲腳本-中文

===== 煮沸 100 克的水總是需要固定數量的能量但是未必固定數量的法定貨幣 =====

這是一個依據物理原則設計的生存遊戲,盡可能簡單地傳達在一個遵守物理定律的世界中必然會有的觀念。一個玩家代表一個聚落。遊戲的目標是讓聚落得以存在,藉由提升勞務水準所以聚落可以強盛抵禦外侮或是降低居民的死亡率。遊戲裡有許多類型的生物、元素和製造這些元素的工廠、勞務和製造這些勞務的工廠、電池和能量票、太陽能產生器、土壤。喜00歡自給自足單獨玩的玩家可以學到關於多樣性、出生、死亡、能源、富有。喜歡和其他玩家互動的玩家可以額外學到關於經濟規模、錢、儲蓄、投資、信任、國際貿易、戰爭。這些遊戲裡提到的觀念都是數學上可以推導出來的,含括,例如,投資的錢如果始終來自正常儲蓄而非空氣則不可能會有貧富不均的問題、增進聚落的韌性則不可能沒有多樣性,雖然世界上許多問題以及在這個遊戲的表現不佳根源於在這些觀念上沒有正確的認知或無知。

能量可以被保存在電池裡或是被消耗。所有東西都可以交易。每種特定類型的勞務如果有足夠的能量正常運作,將減少特定類型的族群的死亡率。每種類型的生物在每個時期都機率性的面臨一場災難,一旦發生,該類型的生物族群在該期會被完全摧毀。生產勞務和元素需要工廠和不同數量的能量。生產出來後保持這些勞務能運作也需要能量。能源使用一次後將轉成熱的形式所以不能再使用,但幸運的是太陽每一個單位土地面積每一單位期間可以提供一單位的能量。土壤是所有東西的基礎原料,可以用來製造成生物或其他物品或勞務。相反的變換方向,在任何故意非故意的廢棄行動中,塵歸塵土歸土,所有物品都變成土壤,這時候在這些物品中的能量都將轉換成熱。

這些是遊戲規則( XXYY 是正整數)。劇本和數字誇張只是00為了快播變化的過程,以凸顯遊戲要傳達的觀念:

  1. 一開始遊戲會提供等量 10000 個土壤的隨機的種類和數量和物品給玩家的聚落。如果沒有活著的生物,所有轉換資源工作無法進行,當聚落總生物數量小於 0. 01 則遊戲結束。
  2. 能量的取得可藉由太陽能產生器或電池或與其他玩家交易。
  3. 一個電池 = 一個土壤 +5 的能量
  4. 一個電池的最大容量為 1000 能量
  5. 一個類型 Y 的生物 = 一個土壤 +10 能量
  6. 一個類型 YY 的生物每期需要 10 能量
  7. 類型 X 的一個元素 = 一個土壤 +5. 5 X 能量
  8. 一個太陽能產生器 = 一個土壤 +1 能量。普通太陽能產生器每期能產生 1 能量。
  9. 當元素放在普通的太陽能產生器上一起使用,可以增加太陽能產生器的功率。一個 X 類型的太陽能產生器 == 一個普通太陽能產生器 + 一個類型 X 的元素
  10. 一個類型 X 太陽能產生器的每期產生的能量從 1.0+1.0X, 1.0+0. 9X, ..., 1.0+0.1X ,並在十期之後成為普通太陽能產生器,上面的元素會退化成土壤。
  11. 每一期類型 Y 的生物的正常死亡機率只要是運作中的隨著類型 Y 勞務的增加會遞減即可;本遊戲設定為 1.0 /(2.0+ 正常運作的類型 Y 勞務的數量)。所以如果沒有災難,下一期類型 Y 族群數量是當前數量乘上 1 減掉這個數字;每期發生災難的機率是 0.1 。
  12. 類型 Y 的一個勞務需要每期 10 能量來正常運作
  13. 一個類型 Y 的勞務 = 一個土壤 +10 能量
  14. 每個特定類型的勞務需要工廠製造。特定類型的每個元素需要工廠製造。一個工廠 =1000 個土壤 +20 能源。
  15. 所有物品都可交易。取得 1 單位物品,需要花費 1 能量去運送。
  16. 任何物品的交易可以藉由以物易物的方式,由玩家雙方自由決定交換比率。以物易物的交易沒有一筆錢花兩次的問題。
  17. 如果買方有能量票,則交易可以藉由能量票去做,也就是典型的交易。交易手續費用由買方負責。能量票代表的是放在一個安全隔離區域的能量數量的擁有權。這樣的交易需要一點額外的金額作為交易手續費,給的交易手續費越多越有人願意幫忙這個交易的成立。因為驗證要耗費能量,交易手續費的目的是讓幫忙驗證交易紀錄的驗證人員有動機去做,因此可以避免一筆錢花兩次的問題;見下面第20。如果只有一個驗證人員則這個驗證人員就像是交易所或是銀行的角色,以集中化的戶頭管理方式避免一筆錢花兩次的問題。
  18. 玩家可以把能量票退還給安全隔離區域去取回等量能量的電池,但是因為始終都有穩定的能量流通過聚落(所以玩家不用急於去安全隔離區域提領)以及避免以物易物的費用,放在安全隔離區域的電池能量幾乎不會被用到,這種情況下能量票就只是個難以偽造的投入能量的證明,就像黃金或是古印地安貝殼。為了取得特定數量的能量票,除非利益輸送或是偷竊,某個玩家一定做了被公評承認的能量投入。
  19. 玩家取得能量票的方法有三個:(一)移動實際電池到安全隔離區域(二)生產銷售一些物品給典型交易的買方(三)幫忙第一點和第二點的交易的驗證,靠運氣賺取交易手續費。自己單獨玩的玩家聚落可能沒有任何能量票卻很富有強盛。
  20. (三)的詳細解釋如下。尚未確認完成的交易記錄,如果幫忙驗證的玩家認為合格而且累積的全部幫忙驗證玩家貢獻的能量超過這些交易提出的手續費,則這個交易完成驗證,成為最新的公認交易區塊,玩家所擁有的能量票數量也據此更新。這個交易區塊的總交易手續費以抽籤的方式給予某一個參與幫忙驗證的玩家,其中中籤的機率和貢獻的能量成正比。交易塊的修改需要投入原本此交易塊及後續交易塊中的手續費能量。能量票資料的共識是由最長的區塊鍊所保護和定義,因為要有能力犧牲巨量的能量才可以變更交易紀錄,因此每個玩家可以信任區塊鍊裡紀載的每個玩家的能量票餘額,只要這個玩家的最後一個交易已經深埋在區塊鍊裡。
  21. 能量票所代表的電池能量可以註記成轉換到貸款池,此時這個數量的能量開放給其他玩家借去使用,借期間是 5 。玩家如果償還(或沒償還),這些貸款池的能量會增加(或減少),因此投資貸款池的玩家因此可能面臨投資利得(或損失)。
  22. 玩家可以從貸款池借能源電池。玩家應該要償還, 5 期之後如果借款人無法還款00,除了玩家的名字被公布之外並且禁止以能量票交易 10 期。當貸款池已經有投資者之後,第一個宣稱要借錢的玩家就是貸款人,可以支用這些能量去做事。借期到期,貸款池投資者可以依照投資比例拿回能量票。
  23. 玩家可以用戰爭去取得資源。戰爭獲勝概率和正常運作的勞務的總數量成正比。輸家的全部東西變成土壤並將授予贏家,輸家的能量票也歸贏家所有。

Sec 3. strategy 攻略

It is not intentional to show the strategy of a game especially in its manual. Players shall find out their preferred best strategy by playing. However, this game is for educative purpose so I am happy to state it here.

Mathematically it can be proved that the best strategy is to set equal population of person of different types and set equal amounts of goods of the specific types. In such situation, let mm be the amount of goods of each specific type and let NN be the number of types of persons and let d(m)d(m) be the death probability given amount of goods m . Then the long-term-average population growth rate without birth, denoted by R=qln(11N)+ln(1d(m))R=q \ln(1-\frac{1}{N})+ \ln(1-d(m)). Therefore the strategy is to set NN and mm as large as possible. However, without international trade or in solo playing, there is some constraint between N and m.

Let KK be the soil size to create all goods then m=KNm=\frac{K}{N} and the number of NN is such that 0.1ln(11N)+ln(1d(KN))0.1 \cdot \ln(1-\frac{1}{N})+\ln(1-d(\frac{K}{N})) is maximized. The maximization is guaranteed because d(m)d(m) is convex which is guaranteed because d(m)d(m) function is decreasing and with a lower bound zero. Due to economical scale in producing of goods(great soil demand for factory), each country shall consider its comparative advantage as a strength to trade with other countries by getting the goods produced by other countries' soil. Winning resource by war leads to negative infinity of RR and shall not be considered.

RR is always negative. Without birth, the country will die out eventually irrelevant of the number of population. Therefore a player shall create the new borns by the soil released by the death to maintain a constant amount of persons.

Due to energy conservation, the long-term-average power efficiency of energy generators of any type is always the influx of the Sun, taking into account the energy spent in the producing of relevant elements for the high-efficiency solar energy generator. Therefore, it is no better to use energy generators other than plain energy generator as the long-term energy providers. However, it is good to have some high-efficiency energy generator prepared in advance to handle some emergency usage, for example, the energy usage to recover the civilization after a disaster. Ridiculous proposals like this shall not be a long-term energy plan.

The nature of money is work-of-proof and nothing to do with thin air. It works like the law of energy conservation. The money system in the game, the"energy note", is non-centralized to tackle single-failure-point problem and power-leading-to-corruption problem. It is also fair in the sense that no one can get richer statistically unless working hard mentally/physically;for example, if the investment fails, it fails, no financial bailout possible to allow the neighbor of the financial industry to get the new money from the thin air.

揭露攻略是很奇怪的事,尤其在一個遊戲的說明文件裡。玩家應該自己藉由遊戲發覺玩家自己覺得最好的策略。但是本遊戲是為了教育目的,所以在這還是很樂意揭露最佳攻略。

根據遊戲規則數學上可以證明最好的策略是讓每一種族群的數量都一樣,也讓對應這些人的勞務數量都一樣。在這種情況下,以 m 代表每種族群對應的勞務數量,以 n 代表族群的種類數,以 d(m)\mathrm{d}(\mathrm{m}) 代表死亡機率的函數,那麼長期平均人口變化率 R 就是 qln(11/N)+ln(1d(m))\mathrm{q} \ln (1-1 / \mathrm{N})+\ln (1-\mathrm{d}(\mathrm{m})) ,因此攻略就是讓 N 和 m 儘可能大。然而在沒有國際貿易或是玩家自己單獨玩的時候,NNmm 之間有個約束。以K代表製造全部勞務的土地面積,所以 m=K/Nm=K / N ,所以存在一個使得 0.1×ln(11N)+ln(1d(KN))0.1 \times \ln(1-\frac{1}{N})+\ln(1-d(\frac{K}{N})) 最大的 NN 。這個極大化是被保證的只要 d(m)d(m) 是凸函數,而 d(m)d(m) 是凸函數也是被保證的因為它是遞減函數而且有個零作為下限。因為製造勞務有規模經濟的問題(工廠需要 1000 個土地),所以每個國家應該以各自的比較利益去生產勞務,然後和其他國家貿易去取得原本數量少的由其他國家土壤製造的勞務。藉由戰爭取得資源會導致負無限的R所以不應該考慮。

RR 永遠是負的。沒有出生,不管原始人口有多少國家終將滅亡。因此一個玩家需要持續用死亡人口釋放的土壤去製造新生人口讓總人口數維持常數。

因為能量守恆,如果把製造這些特殊能源生產裝置所需要的元素所花費的能量也考慮進來,任何能源生產裝置長期平均的功率一定和日照功率一樣。因此作為長期能源的提供,沒有必要使用不是陽春能源生產裝置的特殊裝置。然而事先準備一些高功率的能源生產裝置在身邊是有幫助的,可以用來當做緊急時候的能源提供使用,例如在遇到大規模災難之後的復原文明的能源需求。像這樣的企劃作為長期能源提供是很蠢的。

錢的本質是能量和能量付出證明,不可能無中生有。它工作方式就像能量守恆定律。在本遊戲中的錢,所謂的能量票,藉由去中心化的方式來解決單一弱點和絕對權力絕對腐化的問題。這個錢系統也是公平的,因為統計上沒有人能夠變富有除非動腦動身體的努力工作;例如,如果投資失敗就是失敗,不會有財務救濟讓金融業附近的人能拿到憑空而來的錢。

Sec 4. Known bug 已知問題

  1. Some floating numbers calculation may have rounding error. For example, 1. 0 minus 0. 9 is not 0. 1 but 0.0999999992 therefore causing some weirdness in playing experience occasionally. In such situation,players can adjust the number a little bit.
  2. This game is for education purpose. No much protection about identity thief. The IRC nickname may not be the same player always but the bot recognizes players by the nickname only. There is no private key protection in the trades message neither, so it is easy to fake the trade message.
  3. The energy is energy in the game but not energy in real life; when some player Albert writes helper 123.45, Albert contributes 123.45 energy in the game but not in real life, therefore it is not a real sacrifice and highly possible to fake the consensus message in a real life. To see a real life energy contribution consensus protection example,see bitcoin blockchain.
  4. To avoid jam, IRC server may set the limit on the length of message so the blockchain info may not be shown completely.
  1. 浮點運算可能會有誤差,例如 1. 0 減掉 0. 9 不是 0. 1 而是 0. 0999999992 所以可能偶而會導致玩家奇怪的經驗。如果發生這種情形,玩家稍微調整一下數字即可。
  2. 這個遊戲是為了教育目的。沒有嚴謹的身分認證機制。IRC裡面人的別名可能不會總是同一個人但是這個機器人卻只認這個別名。交易訊息也沒有私鑰編碼保護,所以很容易捏造。
  3. 遊戲裡的能量是假的,不是真實生活裡面的能量;當亞伯特在遊戲裡說"helper 123.45 "的時候,他在遊戲裡貢獻了 123. 45 能量並不是在真實生活裡貢獻了 123. 45的能量,所以不是真正的犧牲,因此這些遊戲裡面的社會共識訊息也就可以是在真實生活上捏造的。想要看一個貢獻真實能量去保衛的社會共識訊息的例子,請參看比特幣區塊鍊。00
  4. 為了避免網路塞車,IRC server可能會設限訊息的長度所以blockchain的訊息可能無法完整呈現。

Sec 5. Math

Given the survival ration function of service amount ms(m)\mathrm{ms}(\mathrm{m}) ,the average change rate of population is:

(1q)ln( ix is(m i))+ iqNln( jix js(m j))(1-q) \ln\left(\sum_{i} x_{i} s\left(m_{i}\right)\right)+\sum_{i} \frac{q}{N} \ln\left(\sum_{j \neq i} x_{j} s\left(m_{j}\right)\right)

Define y i jix js(m j)y_{i} \equiv \sum_{j \neq i} x_{j} s\left(m_{j}\right)

It becomes:

(1q)ln(1N1 iy i)+qN iln(y i)(1-q) \ln\left(\frac{1}{N-1} \sum_{i} y_{i}\right)+\frac{q}{N} \sum_{i} \ln\left(y_{i}\right)

Subject to iy i\sum_{i} y_{i} is constant C

The maximization leads to y 1=y 2=..=y N=CNy_{1}=y_{2}=. . =y_{N}=\frac{C}{N}

Therefore

0=y 1y 2= j1x js(m j) j2x js(m j)=x 2s(m 2)x 1s(m 1)0=y_{1}-y_{2}=\sum_{j \neq 1} x_{j} s\left(m_{j}\right)-\sum_{j \neq 2} x_{j} s\left(m_{j}\right)=x_{2} s\left(m_{2}\right)-x_{1} s\left(m_{1}\right)

The so-far maximization is

(1q)ln(CN1)+qln(CN)(1-q) \ln\left(\frac{C}{N-1}\right)+q \ln\left(\frac{C}{N}\right)

when

x 1s(m 1)=x 2s(m 2)=..=x Ns(m N)=CN(N1)Dx_{1} s\left(m_{1}\right)=x_{2} s\left(m_{2}\right)=. . =x_{N} s\left(m_{N}\right)=\frac{C}{N(N-1)} \equiv D

The so-far maximization value is:

(1q)ln(ND)+qN iln((N1)D)(1-q) \ln(N D)+\frac{q}{N} \sum_{i} \ln((N-1) D)

where

x 1s(m 1)=x 2s(m 2)=..=x Ns(m N)=Dx_{1} s\left(m_{1}\right)=x_{2} s\left(m_{2}\right)=. . =x_{N} s\left(m_{N}\right)=D

1=x i1=\sum x_{i}

The service area is m i\sum m_{i}, the minimization occurs at x 1=x 2==x N=1Nx_{1}=x_{2}=\cdots =x_{N}=\frac{1}{N} therefore m 1=m 2=..=m Nmm_{1}=m_{2}=. . =m_{N} \equiv m

This minimization is global because s(m)s(m) function is a concave function. At the same time, a maximization of average change rate of population is:

qln(11N)+ln(s(m))q \ln\left(1-\frac{1}{N}\right)+\ln(s(m))

So the larger N the better, the larger m the better. However, suppose there is a constraint about total service area K , then:

m=KNm=\frac{K}{N}

And the maximization is qln(11N)+ln(s(KN))q \ln\left(1-\frac{1}{N}\right)+\ln\left(s\left(\frac{K}{N}\right)\right)

There is one unique NN such this is maximized and this is the final solution of all the maximization.