DEPARTMENT OF ECONOMICS WORKING PAPER SERIES

Size: px
Start display at page:

Download "DEPARTMENT OF ECONOMICS WORKING PAPER SERIES"

Transcription

1 DEPARTMENT OF ECONOMICS WORKING PAPER SERIES McMASTER UNIVERSITY Deprtment of Economics Kenneth Tylor Hll Min Street West Hmilton, Ontrio, Cnd L8S 4M4

2 Lerning Algorithms in Decentrlized Generl Equilibrium Model Jmes Bruce 1 Deprtment of Economics, McMster University 1280 Min St. West Hmilton ON L8S 4M4 e-mil: jbruce@symptico.c web: My 22, I would like to thnk John Burbidge, Michel Vell, nd Ted Bergstrom for their insights, comments, nd/or encourgement.

3 Abstrct A model is developed in which economic gents lern to mke pricesetting, price-response, nd resource lloction decisions in decentrlized mrkets where ll informtion nd interction is locl. Computer simultion shows tht it is possible for gents to ct lmost s if they hd the dditionl necessry informtion to define nd solve stndrd optimiztion problem. Their behviour gives rise endogenously to phenomen resembling Adm Smith's invisible hnd. The results lso indicte tht gents must engge in some form of price comprison for decentrlized mrkets to cler--otherwise there is no incentive for firms to respond to excess supply by lowering prices. This suggests tht gentbsed models with decentrlized interction risk untenble results if priceresponse decisions re mde without being first directed towrd the most fvourble locl price. 1. INTRODUCTION This pper presents n gent-bsed computtionl economic (ACE) generl equilibrium model in which boundedly rtionl gents lern to produce nd trde in such wy tht the outcome resembles competitive equilibrium guided by the invisible hnd of Adm Smith. ACE models thus fr hve not overcome the difficulties imposed by hving gents lerning to propose nd respond to prices while hving the subsequent results guide gents' decisions bout resource lloction. Such difficulties hve either limited the scope of ACE models to prtil equilibrium settings or required devition from the methodology of hving phenomen emerge from gents' behviour. ACE models employ utonomous intercting gents to simulte n economy or some spect of one nd s such tret the subject of study s complex dptive system (Tesftsion 2001). Any system-wide regulrities emerge from the ctions nd decisions 1

4 explicitly modelled t the gents' level rther thn being imposed by the modeller. An exmple of this is Howitt nd Clower's (2000) model in which through process of serch nd trde gents crete form of money employing good with low trnsction costs. The ssumption tht gents hve the necessry informtion nd bility to define nd solve n optimiztion problem is relxed in n ACE model nd gents typiclly employ lerning schemes to guide their behviour. Often the models re such tht the gents' optiml behviour cn be determined nd used s benchmrk from which to evlute the results. For exmple Arifovic (1996) hs gents in n overlpping genertions frmework use genetic lgorithm 2 s lerning scheme to determine their consumption/svings decision nd to llocte their svings between two different fit currencies which llows the gents to (nerly) settle on the optiml svings/consumption decision. 3 The growing body of ACE literture hs ddressed issues in finnce (LeBron 2000), lbour mrkets (Tesftsion 2001b), R&D investment (Yildizoglu 2002), foreign exchnge mrkets (Arifovic 1996,2001, nd 2001b), signlling (Arifovic nd Eton 1998 nd DeVny nd Lee 2001), uction design (Bower nd Bunn 2001), development (Arifovic et l 1997), the demnd for money (Howitt nd Clower 2000), nd industril orgniztion (Price 1997). Despite the pproch of explicitly modelling from the gent up nd voiding the imposition of system-wide controlling rtifices with no rel-world nlogue, ACE models hve not yet lived up to tht potentil with regrds to the Wlrsin Auctioneer. With the exception of Kirmn nd Vriend (2001) no ACE model hs been developed in which 2 Formlized by Hollnd (1977). 3 The centrl result of the model is tht the exchnge rte fluctutes, wheres the rtionl expecttions equilibrium of the equivlent model (Krken nd Wllce 1981) hs stble but indeterminte exchnge rte. 2

5 gents lern to propose nd respond to prices. They develop model where wholeslers lern strtegies governing stocking, queue-ordering nd pricing who interct with retilers who lern strtegies governing queue-choosing nd price-response. The focus of their pper is not on pricing behviour but on loylty. 4 Their model hs only one good so it is not cler if the price-relted decisions re pproprite in generl equilibrium setting. The mjority of ACE models hve gents lerning to mke non-pricing decisions nd Wlrsin uctioneer subsequently determining the mrket clering price. 5 Mny other ACE models focus on issues in such wy tht prices do not ply role nd hence there is no cll for price decisions nor Wlrsin uctioneer. 6 Other pproches tken involve hving different gents propose different but immutble prices (Rouchier et l 2001), hving pricing decisions follow n (unlerned) rule of thumb (Howitt nd Clower 2000), bypssing locl brgining process by hving gents trde t price determined s some defensible function of gent ttributes (Epstein nd Axtell nd Dwid 1999), nd hving gents lern to set prices but responding to prices by optimlly choosing quntity (Dwid 2000). The lck of n emergent replcement for, or equivlent of, the Wlrsin uctioneer hs not gone unnoticed in the literture. Tking the 'invisible hnd' of Adm 4 Although the gents' decision-mking process does not llow them to formulte strtegies in such terms, it ppers tht the retilers ct s if they py price premium nd exhibit loylty to their chosen wholesler in order to secure gurnteed supply. 5 Exmples of this include Arifovic (1995, 1996, 1998, 20001, nd 2001b), Arifovic nd Rmzn (2000), Dwid nd Kopel (1998), Duffy (2001), Price (1997), Ty nd Linn (2001), Vriend (2000), nd Yildizoglu (2002) s well s those modelling finncil mrkets. 6 Exmples of this include Andersson nd Sndholm (2001), Arifovic nd Eton (1998), DeVny nd Lee (2001), nd Tesftsion (2001b). 7 In chpter IV, Epstein nd Axtell present decentrlized model with two goods tht re trded t locl prices. While they find tht the men price is tht expected if gents fully optimized, the gents in their model do not lern but insted follow immutble rules of thumb. 3

6 Smith to be the process by which optiml lloction of resources cross sectors of the economy emerges from the self-interested ctions of economic gents, Kochugovindn nd Vriend (1998) rgue tht existing forml economic models tret it s blck box by relying on fictitious constructs, including the Wlrsin uctioneer. They speculte tht the study of complex dptive systems my yield insight into how decentrlized economy gives rise to this emergent property. Leijonhufvud (1999) mkes similr rgument. Arifovic (2000 p241) surveys models with evolutionry lerning lgorithms. In her conclusion she discusses the stte of ffirs in the literture in so fr s price determintion is concerned nd the hurdle it presents for more comprehensive ACE models: One of the chllenges tht the reserch in this re fces is the extension of evolutionry models to the generl equilibrium type of economies with multiple mrkets. The min issue is the one of determintion of prices. These models cnnot tke dvntge of computing prices through simultneous determintion of gents' optiml decisions nd mrket-clering conditions. Insted, the clcultion of prices hs to be explicitly modeled by describing brgining process or some other equilibrting mechnism. This dds n extr lyer of complexity on top of the dynmics tht tend to be quite complicted nywy. However, this obstcle will hve to be overcome if these models re to be more widely used in the generl equilibrium setting. Such successful generl equilibrium ACE model would, inherently, elucidte the invisible hnd s n emergent property. The purpose of this pper is to present nd nlyse such model. In this model, gents must decide to produce one of two goods nd then hve the opportunity to engge in trde for the other good vi sequence of locl interctions with other gents. Agents lern which good to produce s well s pricing nd purchsing strtegies. 4

7 The resultnt dynmics mirror how the invisible hnd is normlly described s functioning: A shortge (surplus) of one good results in its price rising (flling) nd gents respond by shifting resources towrds (wy from) the production of tht good. This lloction however cycles round the optiml one. There is lg between the introduction of shortge (surplus) nd gents' bility to perceive this nd djust prices in response. Thus when the shortge (surplus) is corrected, prices continue to be bove (below) mrket-clering levels for tht optiml lloction, nd resources continue to move, creting surplus (shortge) of the good in question. Additionlly, gents must engge in price comprison visiting number of gents to collect price informtion nd ptronizing first those gents offering the most fvourble prices for the outcome to resemble competitive equilibrium. This provides gents with n incentive to respond to surplus of the good they produce by lowering prices. The next section presents the model. Section three presents nd nlyses the results. Section four presents nd nlyses results of vritions of the bse model. Section five concludes. 2. THE BASE MODEL 2.0 Overview of the Bse Model There re n gents who live for T periods nd hve identicl preferences over two goods. Tble 1 gives the vlues used for the prmeters. Every period ech gent decides which of two goods to produce. Ech gent then hs series of opportunities to engge in bilterl trde with number of other gents. Any prticulr gent will, in 5

8 Tble 1: Prmeter Vlues Prmeter Prmeter Nme Vlue Used n Number of gents 1000 T Number of periods 1000 e 1 Production level for good one 1 e 2 Production level for good two 1 v Number of gents visited per period 10 ρ Preference prmeter 0.6 nd 0.3 JCR Job chnge rte 0.01 MR Muttion rte 0.1 δ Muttion rdius 0.1 some trdes, ct s store by offering specific exchnge. In other trdes, tht sme gent will ct s customer by responding to n offered exchnge. Subsequent to the trdes of period, ech gent revises its strtegies by imitting the strtegies of the most successful gents encountered during trde. Some of the gents then mutte some of their strtegies through stochstic process. A period ends with consumption. Ech period thus consists of five stges: i) Production ii) iii) iv) Trding Imittion Muttion v) Consumption 6

9 which re explined in detil below. Additionlly, ppendix A presents the bse model s Guss progrm. 2.1 The Production Stge An gent is ssumed to be ble to produce only one of the two goods in ny given period. Production behviour is dictted for gent 8 by its production strtegy wp { 12},. If wp = 1, gent produces e 1 units of good one; while if wp = 2, gent produces e 2 units of good two. 2.2 The Trding Stge A given gent 's trding behviour is dictted by its exchnge strtegies {{ o } {, 1, r2, k1, o2, r1 k2 }}. These exchnge strtegies nd the production strtegy wp mke up gent 's entire complement of strtegies. At the beginning of every period, ech gent selects v different gents to visit tht form set Γ of gents. is determined through n independent rndom process; Γ in prticulr, it is independent of gent 's strtegies, ny Γ formed in previous periods, nd ny where b. Every possible set of v of the n 1 other gents is eqully Γ b likely to mke up Γ. A pir of gents is ssumed to not trde with ech other if they both produced the sme good. Thus set γ Γ is formed by dropping from Γ gents producing the sme good s gent. γ consists of the gents tht gent will visit nd potentilly trde with, where gent b γ cts s store nd gent cts s customer. 8 Regrding nottion:, b, nd c re used to denote gents; i nd j re used to denote goods; s nd t re used to denote time periods. Vribles representing sets of gents nd strtegies hve implicit subscripts denoting the period which re usully suppressed for redbility where there is no loss of clrity. Occsionlly, when it fcilittes exposition, the gent subscripts re lso suppressed. 7

10 Agent b, cting s store, is ssumed to offer its good in pckge of size fixed for the period t o jb where j = wp b. Agent b dditionlly offers price, lso fixed for the durtion of the period. The price gent fces when visiting gent b is given by r o ib jb ; gent b offers o units of the good it produced (good jb j ) nd in exchnge requests r ib units of the other good (good i, which gent produced). A proposed exchnge is crried out if both gents involved hve sufficient holdings of the good they produced vilble for trde. Ech gent keeps (where k i i = wp ) of the good it produced for personl consumption, putting up the remining e i k i for trde. (Goods put up for trde but not ctully trded re still vilble to the producing gent lter for consumption.) Thus if gent (the customer) visits gent b (the store), gent gives to gent b r ib units of good i = w p nd receives o units of good j = wp b i if nd only if xi r ib ki nd x o k where denotes gent 's current holdings of good i. Note tht if gent produces good one in some period, only { o, r, re used to determine its trde behviour; while if wp = 2, {o, r, 2 1 k 2 } 1 2 k 1 } re the only ctive exchnge strtegies. jb jb jb x i An gent is ssumed to go to the gents-s-stores in γ in n order determined by their offered prices, visiting first those gents-s-stores tht offer more fvourble prices (from gent 's point of view). only if b γ v γ is thus ordered into γ where b γ v if nd, while dditionlly, if b is element q in γ nd c is element q + 1 in v jb v γ then r o ib jb ric v where wpb = wpc = j wp. Should gents bc, γ hve strtegies o jc 8

11 such tht the prices they offer re equl, b is s likely to come before c in v γ s the other wy round nd this is determined by rndom process independent of ny spect of the stte of the model. Once the vrious vectors γ v for = 12,,..., n re formed, the whole of the n v v gents re rndomly ordered into N (with t indicting the period). Ech possible is chosen with equl independent probbility; in prticulr, strtegies nd the set of ny prior such orderings { }. The first gent in v N t t is independent of gents' between gent nd the second gent in γ v, gent moves on to the third gent in v nd similrly continues to move through γ until either it engges in trde (ending its turn) or it hs reched the end of γ v (which lso ends its turn). Agent 's turn being v v over, the second gent b in similrly hs turn to go through. Then the third N t N s t 1 s= 1 v N t v visits the first gent in its list γ. If they engge in trde it is the end of gent 's 'turn'. If not, gent moves to the second gent in N t v γ nd if it engges in trde with this gent, it is the end of gent 's turn. If no trde occurs v v gent in hs turn nd so on until the n th nd finl gent in hs hd its turn. N t Cll this process the n gents ech getting turn to ttempt to trde s customer with n gent in its v γ trding run. v The entire trding stge of period consists of the formtion of nd { } followed by trding runs which occur until no more trdes re mde (i.e. trding run hppens in which ll n gents end their turns by filing to trde with ny member of their respective v γ s). Since typicl trding stge will involve hundreds of trding runs, γ b N t v N t γ v γ n =1 9

12 gents who re stuck on the short side of n excess supply or demnd outcome find themselves there more likely due to their strtegies rther thn their plcement in the v rndom order of movement, N t. One wy to conceive of the trding stge is to suppose tht gents cn shop nd mintin their stores simultneously, tht store sells discrete pckges t rte (pckges per unit time per customer) tht is constnt cross stores, nd tht the store is ble to service n rbitrry number of customers simultneously. Agents begin the trding period hving lredy smpled some price informtion nd going to their most preferred store. Whenever store runs out of stock, gents t tht store ll disperse to their next-most preferred store nd the process continues until ll mutully greeble trdes between gents nd the stores they visit hve been exhusted. 2.3 The Imittion Stge ρ 1 ρ The utility obtined by gent is given by U = x x. 1 2 Ech gent hs set of gents met during the exchnge stge including the v gents on its visittion list, the rndomly determined number of gents tht visited it, s well s itself. Thus if is the set of gents met by gent then b µ if nd only if b Γ µ, Γ b, or = b. This set of gents met is divided into two groups bsed on which good they produced, with the imitting gent itself in both groups: µ 1 µ nd µ 2 µ where b µ i if nd only if b µ nd wp = b i or b =. Agents re ssumed to imitte their ctive exchnge strtegies from the gent met tht obtined higher utility thn ny other gent met tht produced the sme good. Agents re ssumed to imitte their inctive exchnge strtegies from the gent met tht obtined higher utility thn ny other gent met tht produced tht good, but only if tht 10

13 highest-performing gent obtined more utility thn the imitting gent. Otherwise it retins the sme inctive exchnge strtegies. So, for i = 12, if during period t, b µ i nd c µ i: c b, U > b Uc then {o, r, k } during period t + 1 will equl i i i { o, r, k } ib ib ib during period t. 9 With probbility JCR, the gent looks to the gent encountered who obtined the highest utility (regrdless of the good produced) nd imittes wp from tht gent. So if during period t, b µ nd c µ i: c b, U > b Uc then (with probbility JCR ) wp during period t + 1 will equl wp b during period t. It is during the imittion stge tht gents mke use of more informtion thn t ny other stge in the model. In order for the imittion stge to be crried out, gents must know t lest wht ech gent met obtined in goods t the end of the trding stge s well s the ctive exchnge strtegies of up to two other gents (perhps best viewed s selected by the gent in question). To fcilitte lter discussion, gents' informtion sets re ssumed to be greter thn this bre minimum. Agent 's informtion set t period t, Ω t, is ssumed to include the goods obtined, nd the strtegies used, by ll gents encountered during period t. Agents re ssumed to hve perfect recll of informtion gthered in the pst s well s the bility to identify previously encountered gents. Thus: Ω = {( X1, X2, wp, ex ): s t, [ b Γ Γ ]} t sb sb sb sb s sb 9 If, in some set of gents met, (µ 1 nd µ 2 for exchnge strtegies or µ for the production strtegy) there re more thn one gent with the highest utility level, the gent to be imitted is determined s follows: If the imitting gent is one of those with the highest utility it retins the strtegies to be imitted i.e. imittes itself. Otherwise, if there re members of Γ with the highest level of utility, those members of Γ re ech eqully likely to be chosen for imittion by n independent rndom process. Otherwise ll gents with the highest level of utility (none of who is gent nor member of Γ ) re ech eqully likely to be chosen for imittion by n independent rndom process. 11

14 where X it represents gent 's holdings of good i t the end of the trding stge of ex t period t while represents gent 's six-member set of exchnge strtegies in period t. 2.4 The Muttion Stge The six exchnge strtegies re ll subject to muttion; the production strtegy, wp, is not. 10 Ech gent perturbs ech of its exchnge strtegies seprtely with independent probbility MR. If strtegy is to be mutted nd its initil vlue is x, its new vlue will be independently drwn from uniform distribution over the intervl [( 1 δ ) x, ( 1+ δ ) x]. 2.5 The Consumption Stge In the consumption stge, ech gent consumes ll of its holdings of the two ρ 1 ρ goods nd experiences utility U = x x. The goods re ssumed to be perishble, so 1 2 by the end of the consumption stge, x i = i 12 nd 12,,..., n. 0 {, } { } 2.6 The Initil Stte The strtegies in period 1 re determined by rndom nd independent drws for ech gent nd ech strtegy. Strtegies o 1, r 1, nd k 1 re drwn from uniform distribution over [ 0,e 1 ] while o 2, r 2, nd k 2 re drwn from [ 0,e 2 ]. Note tht vlue for ny ctive strtegy tht is bove this intervl would preclude ny trde, while 10 View the imittive lerning process s serch lgorithm tht combs through the set of sensible 3 3 exchnge strtegies [ 0, e1 ] [ 0, e2 ] s well s the set of production strtegies { 12, }. Muttion of exchnge strtegies is necessry for comprehensive serch. So long s both goods re being produced, muttion of the production strtegy is not, nd so is neglected in order to void subjecting the results to ny more noise thn necessry. 12

15 negtive vlue is eqully uncceptble. 11 probbility. wp is initilized t 1 or 2 with equl 2.7 The Brgining Structure nd Homo Economicus The bilterl brgining encounters in the bse model re ones in which one gent b proposes price-quntity pir ( p, q, while the other gent 's response is b b ) determined by some function f :R 2 { ccept, reject}. The bse model uses rib, =, o BM o ( pq) jb jb if k nd, =, 0) otherwise. The response x o ( ) jb jb jb pq BM ( function used is f BM r o ib jb, o ccept if jb = x r i ib k i nd f BM r o ib jb, o jb = reject otherwise. The dictum tht gents should do s well s they cn under the circumstnces ostensibly suggests tht gents should insted use ( ) f * p, q b b = ccept if cceptnce of ( ) the proposed exchnge would cuse gent 's utility to rise nd f * p, q = reject if it would cuse utility to fll. However, gent hs sufficient informtion to mke its problem more complicted thn simply choosing from { ccept reject to mximize U t the end of the exchnge. The perfectly rtionl gent should be mking its response bsed on }, b b { p, p,ω } b t p b where is the price it fces now s customer nd is the price it offers p s store in ny future bilterl brgining situtions to come during the current period t. In prticulr, the response decision is complicted by the fct tht when is more p 11 The fct tht o i > e i k i would lso preclude trde if wp = i is not used to further restrict the rnge tht o i is drwn from. Insted gents must, nd do, lern to set o i < e i k i. 13

16 fvourble price for gent thn p b, 12 the purchses tht gent now mkes limit the uncertin quntity of future trding t more fvourble price. (Note tht if gents know the initil conditions nd other gents' preferences, the expected utility of ech response in { ccept, reject is computble nd so gent 's problem is well-defined if exceedingly difficult. } 13 ) As n optimiztion problem, the gents' sitution is better viewed s imperfectly choosing quntity to purchse bsed on distribution of prices to be fced. More ccurtely, gent 's problem involves choosing quntity to ttempt to spend ( e k ) nd price-quntity pir, for its store behviour, bsed on Ω. Lst period's informtion set is enough to compute the distribution of other gents' strtegies this period nd define the expecttion of U t. The gents do not perform ny optimiztion, so if they mnge to settle on nerly optiml outcome, this is due entirely to the lerning lgorithm. This would open up the possibility tht the lerning lgorithm cn be used in situtions where the gents' problem is more complicted. 3. RESULTS OF THE BASE MODEL The purpose of this model is to subject brgining decisions (price setting nd price response) to lerning lgorithm in n informtion-poor generl equilibrium environment to guge their bility to generte behviour leding to n optiml (in this cse synonymous with competitive) outcome. Since the economic process in the model is subject to noise, ssessing the degree of optimlity of the outcome is not strightforwrd. t, 1 i it 12 Which the results show is usully the cse. 13 Assuming tht ll other gents follow the simple imittion nd muttion rules. 14

17 The most obvious criteri for evlution would be implemented by ssessing the observed welfre outcomes nd compring them to wht would be relized by perfect informtion generl equilibrium outcome. However ny prticulr outcome (in terms of resource lloction nd consumption ptterns) cn be chrcterized s rbitrrily close or fr from the optiml outcome using utility functions tht re monotonic trnsformtions of ech other. Utility cn be ppropritely used to rnk the bility of different vritions of the model to chieve the optiml outcome. In n ttempt to impose some rigour on this, only utility functions which were homogeneous of degree one were used. When reported, utility will be s percentge of the optiml outcome's level. Another criteri for considertion is the degree to which the ggregte price level comes close to the competitive equilibrium level. But since the model will produce price dispersion, it is problemtic to declre tht some given level of price vrince is comptible with being ner n optiml outcome, even if the men price is t the GE level. 14 The third criteri used is resource lloction. When the resource lloction is ner to optiml, the imittive lerning lgorithm is deemed to work in the sense tht it gives rise to nerly competitive lloction tht full informtion nd rtionl behviour would produce. While none of these criteri re entirely stisfctory since they do not indicte how ner to optiml the results need to be to declre the outcome nerly optiml, in prctice it turns out tht for the vrious versions of the model nlysed, it is lmost 14 In section four, one vrition of the bse model produces men price t the competitive level but rbitrrily lrge price dispersion. 15

18 lwys strightforwrd to tell when the decision-mking lgorithm hs produced (or filed to produce) nerly optiml resource lloction. The model is run for 1000 periods. 10 such runs were mde nd the results were qulittively similr. During the first 500 periods rho (the preference prmeter) is set t 0.6. For the lst 500 periods it is 0.3. With the prmeter vlues listed in tble 1, the competitive equilibrium would involve 1000ρ gents producing good 1 (with the other 1000( 1 ρ ) gents producing good 2), nd trdes occurring t price of 1 so tht ech gent consumes ρ units of good 1 nd 1 ρ units of good 2 (resulting in men utility of 100%). This bse model is lso run without gents engging in price comprison i.e. where n gent v does not, t the beginning of the exchnge stge, order the gents it will visit into γ ccording to the prices offered by those gents in γ v ; the order in which those gents will be visited is, insted, rndom. Figure 1 shows the number of gents producing good 1 for the bse model with nd without gents engging in price comprison. The stright lines, t 600 gents for the first 500 periods nd 300 gents for the lst 500 periods, show the competitive equilibrium resource lloction. Figure 1b shows the men price of good 1 t which trdes occurred for the two versions of the bse model (gin with line t 1 showing the competitive result) nd figure 1c shows the men utility gents relized ech period. For ll three grphs, only every fifth observtion is shown since otherwise they re indecipherble. Furthermore, prices of good one greter thn two re shown s two since 16

19 vlues could be s high s sixteen. Prices bove two were rrely observed in the runs with price comprison. 15 With gents engging in price comprison, the price hovers ner the competitive equilibrium price. This llows for resource lloction pproximting tht of competitive equilibrium, nd correspondingly higher men utility. Note tht price nd resource lloction cycle round the competitive level. When less thn the competitive level of good one is being produced, the men price rises bove the competitive level, inducing more gents to produce it. This process occurs until competitive resource lloction levels re reched, t which point the price hs not yet fllen to reflect this. Agents continue to switch to producing good one nd it is then overproduced. Eventully the price begins to reflect this nd gents strt switching to production of good two. When competitive resource lloction is gin chieved, the price hs yet to reflect this, nd so the economy goes bck to overproducing good one. This process's dynmics hve two driving forces to be explored: 1) When the price of good is below the competitive level, gents switch wy from producing it. 2) When the economy produces more thn the competitive level of good, tht good's men price flls below the competitive level. Ech of these is exmined in turn: Ignoring the impct of the decision of how much of one's product to reserve for personl consumption (or ssuming it is optimlly mde), gents re eqully well off regrdless of which good they produce if ll trdes occur t the competitive equilibrium. 15 When observed they re ttributble to the initil conditions; the ltest they were observed ws the 31st period. 17

20 Figure 1: Tringles: With Price Comprison Circles: Without Price Comprison Number of Agents Producing Good One Period Resource Alloction with nd without Price Comprison Figure 1b: 2 Tringles: With Price Comprison Circles: Without Price Comprison Men Price of Good One Period Price of Good One with nd without Price Comprison 18

21 Figure 1c: Tringles: With Price Comprison Circles: Without Price Comprison Men Utility Period Men Utility with nd without Price Comprison price. Thus if the verge price of good one is bove the competitive level, the verge gent producing good one is better off thn the verge gent producing good two, nd so n gent considering switching its production good is more likely to imitte n gent producing good one. The reverse, of course, is true if the verge price of good two is bove the competitive level. This resoning suggests tht if, in some period, the price of good one is bove the competitive level we should see production of good one rise nd vice vers. This turns out to be the cse in over 83% of periods in ten runs for which it ws exmined. Furthermore, lmost ll of the periods during which production does not move in the direction suggested by men price re clustered round the peks nd vlleys of the resource lloction cycle when the price is generlly closest to competitive levels. The other dynmic force moves the price of good one bove competitive levels when it is under-produced nd below when it is overproduced. A more restrictive 19

22 sufficient phenomen would be if the price tends to move towrds the mrket clering price (i.e. the competitive price given the existing resource lloction which itself is not lwys t the competitive level). This seems to be roughly the cse. Figure 2 shows the mrket clering price nd the observed men price of good one for typicl run (with only every fifth observtion shown for legibility). Figure 2b shows the mrket clering price nd the observed men price (every tenth observtion grphed) when the model is ltered so tht gents do not chnge the good they produce: the sme 600 gents re ll producing good one. The preference prmeter ρ moves bck nd forth between.6 nd.3 nd the resultnt mrket clering prices re 1 nd 2/7 respectively. While it is cler tht gents trde t prices ner to the mrket clering level, it is not obvious why they do so given tht their behviour is simple imittive lgorithm nd they lck informtion bout the current resource lloction needed to determine wht tht price would be. Consider tht prticulr pricing strtegy propgtes through gents more redily if it delivers for its users more utility. If we imgine much more clever gent fced with the sme problem these gents fce for selecting price, tht more clever gent hs both benefits nd costs to mrginl increse in the price it posts. The obvious benefit is tht the gent gets better del from the customers (visiting gents) it does del with. 16 The cost of rising the price offered is tht it increses the likelihood tht the gent will find itself too low on its visitors' ordered lists, too few gents visit to trde, nd 16 An dditionl potentil benefit is tht by posting high price, visiting gents re less likely to hve the gent ner the top of their sorted lists, in which cse the gent hs more opportunity to trde t the best price it finds mong the gents it visited without dnger tht it runs out of its stock of mrketed product by selling it to visitors. As it turns out, this is not considertion t ctulized strtegies since gents generlly propose prices more fvourble to themselves thn the ones they encounter. 20

23 Figure 2 Circles: Observed Price Tringles: Mrket Clering Price 2 Price ind Mrket Clering nd Observed Prices Figure 2b Lines indicte mrket clering price 2 Price Period Observed Men Price with Fixed Resource Alloction 21

24 the gent finds itself t the end of the period hving engged in n insufficient number of trdes. Note tht without the price comprison process, the cost of rising the price disppers nd so the imittive lgorithm selects higher prices. The impliction of this is tht the costs nd benefits of rising the price must blnce t or ner the mrket clering price. To test this four different cses were run in which ll but ten gents hd the sme fixed pricing strtegy, while the remining ten gents, ll of whom produced good one, hd their pricing strtegy fixed t some other level. Furthermore, the production strtegies of ll gents ws fixed to mintin stble mrket clering price. The first cse hd N-10 gents employing strtegies giving mrket clering price (They offered.1 of their production good in exchnge for.1 of the other good.) while the other ten gents offered exchnges t higher price (offering.099 of their production good for.1 of the other good). The second cse lso hd N-10 gents offer mrket clering price with the other ten gents offering lower price (.101 if their good for.1 of the other good). The third cse hd 10 gents offering mrket clering price while the other N-10 gents offered higher price. The fourth cse hd 10 gents offering mrket clering price while the others offered lower price. Tble 2 summrizes the results; the figure reported is the percentge of periods in which the group of gents employing the competitive pricing strtegy hve higher men utility thn the other group of gents. The higher these figures, the more it suggests the costs nd benefits of price movement blnce t the competitive price nd so the more stble it is s phenomen resulting from gent behviour. For exmple suppose initilly ll gents offer exchnges t the competitive price nd smll number of them, due to 22

25 strtegy muttion, begin to offer higher price. This describes the first cse. The gents mintining the competitive pricing strtegy re on verge usully doing better. Thus we expect both tht these gents will not dopt the higher price nd tht the ones tht did will bndon their new high price by imitting the mjority of gents offering Tble 2 Mjority Pricing Strtegy Minority Pricing Strtegy Stbility Percentge Competitive 1 Higher thn Competitive 101/ Competitive 1 Lower thn Competitive 99/ Higher thn 101/99 Competitive Competitive Lower thn Competitive 99/100 Competitive competitive prices--which suggests stbility round the competitive price. For three of the four cses we hve results suggesting movement towrds the competitive price. This is consistent with generl stbility t the competitive price since in the cse where minority of gents offering lower thn competitive price do better, the resulting dynmics would led to something more resembling the cse where the mjority offer low price nd do less well thn the minority still offering competitive price. To see why it is tht these costs nd benefits blnce ner the mrket clering price we need to consider the role of k i the decision of how much of its product n gent keeps for personl consumption nd how much it mkes vilble for trde. If ll of the gents re initilly employing strtegies leding to competitive outcome nd then those producing good two were to switch to higher k 2, the gents producing good one will respond by offering lower price on good one they now fce positive probbility 23

26 of being unble to mke enough trdes nd so those tht void tht by offering slightly lower price cn on verge outperform those tht do not. Another wy of viewing the effect of k i is to note tht by incresing k 2, the mrginl cost of price increse for producers of good one is incresed becuse the probbility of engging in too few trdes hs incresed, so it is by wy of k 2 tht producers of good two prevent producers of good one from chrging n rbitrrily high price. Tble 3 shows the results of version Tble 3: Prices with k 2 nd wp held constnt. k 2 Implicit Price of Strtegy 5th Percentile Men 95th Percentile Price Observed in Trdes 5th Percentile Men 95th Percentile of the bse model designed to test this for ll gents is fixed t 3 levels: one run k 2 ech with k 2 below, t, nd bove the competitive level. (.3,.4, nd.5 respectively) The production strtegy wp ws lso held fixed t the competitive level, otherwise it soks up the effect of k 2 on price by shifting resource lloction until the price returns to the competitive level. The men observed price of trnsctions nd the men price of the strtegies employed by producers of good one re shown s well s the bounds of their 95% confidence intervls. As expected, the higher, the lower the price of good one both in terms of strtegies employed by producers of good one nd relized trdes. k 2 24

27 In the bse model gents do not collude to restrict supply; they choose their strtegies imittively. So despite the dvntge of ffecting price by jointly restricting supply, gents choose individully beneficil levels of competitive price. k producing n pproximtely Given some distribution of k i strtegies, if every gent posts the mrket clering price, the mrginl cost of rising one's price is lmost zero: the probbility of being unble to mke enough trdes due to higher price is close to zero since the mrket is nerly clering. Thus if ll gents lern to set price where the mrginl costs nd benefits of price chnge re equl, brring lrge discontinuity in the costs when the probbility of unrelized trdes becomes positive, gents will set price tht is more fvourble to themselves thn the mrket clering price. The results of the bse model support this resoning. Figure 3 shows the men price of good one posted by producers of good one, the men price of good one posted by producers of good two, nd the mrket clering price. The men price posted by producers of good one is usully greter thn the mrket clering price (true in 80.1% of periods in the ten runs) which in turn is usully greter thn the men price of good one posted by producers of good two (true in 85.2% of periods in the ten runs). The overll dynmics of the bse model re similr to the story of Adm Smith's invisible hnd. Agents post prices ner to mrket clering to void lrge probbility of being cught bsorbing excess supply (which works becuse gents engge in price comprison). On verge the observed price is close to the mrket clering level becuse gents with different production strtegies re posting prices on opposite sides of mrket 25

28 clering nd becuse price comprison will likely men gents with prices closer to mrket clering relize more trdes. Menwhile gents shift into the more Figure 3 2 Producers of Good One Mrket Clering Price Producers of Good Two Price of Good One Period dvntgeous production strtegy, which reduces tht dvntge. Lgs between ctul nd perceived dvntges (due to non-instntneous price djustment in the informtionpoor environment) cuse gents to keep shifting into n industry even fter it hs become disdvntgeous to do so, leding to cyclicl outcome round the competitive one. 4 VARIANTS OF THE BASE MODEL This section discusses the robustness of the bse. For n gent-bsed generl equilibrium model to produce n outcome pproximtely tht of competitive equilibrium while lso portrying economic gents s pursuers of self-interest, it needs three fetures: 26

29 1) The set of possible ctions the n gents re ble to undertke (rising from the set of possible strtegies fed through the economic environment) must include nerly optiml behviour t the individul level nd something ner competitive outcome t the economy level. i.e. It must be possible for gents to choose optiml ctions nd it must be possible for gents to choose competitive outcome. 2) If ech gent chooses its optiml strtegy t time t given its informtion set, the outcome needs to be pproximtely competitive outcome. 3) The lerning lgorithm gents use finds something close to the optiml strtegy. A number of vrints of the bse model re considered nd nlysed in terms of their impct on the bove three fetures. When describing the vritions, only the differences from the bse model re outlined. Tble 4 t the end of this section presents summry sttistics on these vritions. As in the bse model, ten runs of one thousnd periods were generted for ech vrint. 4.1 Altering the strtegy-ction reltionship The inbility of the bse model without price comprison to result in the competitive outcome cn be ttributed to gents not trding t the most fvourble vilble price first, but the strtegies could deliver such ction only by coincidence. Here I present two vrints on the bse model designed to build fvourble-price-first ction into the strtegies subject to lerning. v n n Vrint 1.1 The formtion of { } from { } is governed by strtegies γ =1 γ =1 subject to the lerning lgorithm. Ech gent hs n dditionl exchnge strtegy D consisting of the integers one through ten in some order. If the first integer in is q, v the first gent visited for trde (i.e. the first gent in γ ) is the one met producing the D 27

30 pproprite good (i.e. from γ ) with the q th lowest price. If the second integer is r, the second gent visited is the one with the r th lowest price, nd so on. This strtegy is imitted from the most successful gent encountered. It is mutted with independent probbility MR for every gent. If this strtegy is mutted for n gent, then two entries re chosen t rndom nd swpped. Agents in vrint 1.1 were ble to lern to find competitive outcome but not s effectively s in the bse model. Figure 5 shows resource lloction nd figure 5b the men price. 17 Agents obtined lower men utility, 79.8 over ten runs, s opposed to 94.2 in the bse model, lthough this is n improvement over the bse model without price comprison which hd men utility of Figure 5c shows the pth of the men of the first three entries in this ordering strtegy for typicl run. 18 Optimlly they would hve vlues of one, two, nd three respectively. The first entry tended to be low it hd men vlue of 3.48 over the ten runs nd exhibited pttern of stying just bove one with periodic spells t higher vlues. On verge 48.1% of the gents hd it equl to one in ny period over the ten runs. The other nine entries hd men vlues greter thn five nd did not pper to differ much from ech other overll. Wht price comprison tht did occur consisted of most gents visiting the best price first nd the remining visits being crried out in rndom order. This ws, however, significntly more successful thn no price comprison 17 Some of the vlues for the men price re s high s 24, so to preserve the grph's legibility, vlues greter thn 2 re shown s 2. No vlues greter thn 2 were observed fter the 60th period in ny of the ten runs. 18 With only every 5th period shown. 28

31 Figure 5 Number of Agents Producing Good One Period Resource Alloction Vrint Figure 5b 1.5 Men Price Period Men Price Vrint

32 Figure 5c First Entry Second Entry Third Entry 10 Men Vlue Across Agents Period Vrint 1.2 Agents do not engge in price comprison but do hve dditionl strtegies rp 1 nd rp 2 : reserve prices. The conditions for proposed trde to be crried out become: i) Ech gent will remin holding t lest s much s its relevnt k strtegy dicttes nd ii) The implicit price of the trde does not exceed the visiting gent's relevnt reserve price. This new strtegy nd trde condition could pprently function in wy similr to price comprison it potentilly punishes gents who post high prices but it could not however deliver on this. Over the ten runs the men level of utility ws 47.8, only slightly better thn the bse model without price comprison. There ws no typicl resource lloction result; the chief similrity between runs ws tht most cycled round some level tht ws not the competitive lloction, but tht level vried from run to run. Figure 6 shows resource lloction for three of the runs. 30

33 The bove two vrints were designed to endogenize price comprison s lerned behviour nd met with mixed success. The price-ordering strtegy is rther contrived. It conditions lerning on informtion of which the proper use should be obvious. One possible extension would be to hve gents lern to revisit gents with fvourble prices bsed on previous encounters, set-up tht hs been employed by Howitt nd Clower (2000) nd Kirmn nd Vriend (2001). Figure 6 Number of Agents Producing Good One Period Resource Alloction Vrint Altertions in Agents' Optiml Strtegy One vrition ws considered tht significntly ltered the gents' optiml strtegy. Vrint 2.1 Agents' exchnge proposl strtegies o 1, o 2,, nd r 2, re replced by pricing strtegies p 1 nd p 2. Agents post price of p for the good they r 1 wp 31

34 produce. Visiting gents respond by purchsing up to the optiml quntity, limited by the visited gent's relevnt k strtegy. Note tht if two gents producing different goods re involved together in their first interctions of trding stge, the visiting gent will spend the sme mount of its production good regrdless of the price. 19 Thus, in such n encounter, the visited gent's subsequent utility rises with its posted price. Price comprison ws not ble to prevent offered prices from climbing geometriclly presumbly s fst s muttion nd propgtion vi imittion llowed. Figure 7 shows the nturl log of the men level of strtegies p 1 nd p 2. Figure 8 shows the resource lloction nd figure 8b shows the men price. Given the growth of posted prices, the outcome for ny individul gent is Figure 7 Producers of Good One Producers of Good Two 50 Log of Price of Good One Period Men Posted Price Vrint If the visiting gent produces good 1, it spends (1-ρ)e 1. If it produces good 2, it spends ρe 2. 32

35 Figure 8 Number of Agents Producing Good One Period Resource Alloction Vrint Figure 8b Men Observed Price of Good One Period Price of Good One Vrint

36 Figure 9 Number of Agents Producing Good One ind 2 Figure 9b Men Observed Price of Good One ind 34

37 dependent upon whether it is visited (nd receives goods nerly for free) before visiting or vice vers (in which cse it gives goods nerly for free). Hence the observed price will reflect the resource lloction by being bove one if more gents produce good one nd hence re more likely to be visited first, otherwise below. This suggests tht if 0.5, the men price would be 1 nd resource lloction would lso be ner the ρ were competitive level. This ws borne out in the results. With ρ set equl to 0.5 throughout the 1000 periods of run, the men price ws over 10 runs nd resource lloction styed ner 500 (with men vlue of 501) gents producing ech of the goods. Figures 9 nd 9b show the results of typicl run. Despite nerly competitive price nd resource lloction, men utility ws only 71.5 over ten runs nd every individul trde hd price growing rbitrrily fr from the competitive level. This suggests tht summry sttistics in gent-bsed models hve the potentil to be misleding. One other vrint ws considered tht hd the potentil to lter the gents' optiml strtegy. Vrint 2.2 An dditionl criterion ws dded to the bse model for proposed trde to be relized. If utility went down for either gent, the trde ws rejected. Qulittively the outcome ws the sme s the bse model nd so the results re not presented. Men utility ws slightly lower t 92.6 vs in the bse model. 4.3 Vritions in the Lerning Algorithm Three minor vritions in the lerning lgorithm were nlyzed. Vrint 3.1 Agents imitte ll exchnge strtegies from the most successful gent met. 35

38 Vrint 3.2 Agents do not imitte their inctive exchnge strtegies. The ctive exchnge strtegies re imitted from the most successful gent met who produced the sme good. Vrint 3.3 Agents imitte probbilisticlly with more successful gents encountered more likely to be imitted thn less successful gents. Agents encountered who produced good one re rnked from most successful to lest successful. If gent is rnked q nd gent b is rnked q + 1, then gent is twice s likely to be imitted (for its ctive exchnge strtegies) s gent b. Probbilities re scled so tht some gent is imitted. Similrly, gents who produced good two re rnked nd one is chosen from whom its ctive exchnge strtegies re imitted. All gents met re rnked nd with probbility JCR n gent is chosen for imittion of the production strtegy. None of the bove three vrints produced results qulittively different from the bse model, so the results re not presented. The finl vrints on the lerning lgorithm employed genetic lgorithms (GAs) for lerning. 20 Ech gent hs its strtegy represented s binry string 6Λ + 1 bits long written over the lphbet {01},. Ech of the six exchnge strtegies is represented by n Λ bit section of the string. If S is the substring for one of those strtegies nd S λ { 01, } is the λ th entry in tht substring, then the vlue for tht strtegy is given by Λ e i λ = 1 2 S λ where i = 1 for, o,, nd k 1, while i = 2 for o 2, r 2, nd k. The 6Λ + 1th 1 r 1 2 bit encodes wp, the production decision. 20 Formlized by Hollnd (1977), the GA is s yet the most common lerning lgorithm in the ACE literture. 36

39 The strtegy strings were subject to the stndrd crossover nd muttion opertors. Regrding crossover, gents re grouped rndomly into n 2 pirs with ech of the n gents in one pir. With n independent probbility of 0.6, pir of gents will swp some elements of their strtegy string. If so, number { c 12,,...,Λ} 6 is rndomly chosen nd the gents swp the first c elements of their strtegy string. Regrding muttion, ech element of ech gent's strtegy string, with n independent probbility of toggles its vlue to zero if one nd to one if zero. The third genetic opertor used, reproduction, ws employed in two forms: tournment reproduction nd proportionl selection. Tournment reproduction ws pplied by rndomly selecting two gents nd dding the one which obtined the higher level of utility to the pool of strtegy strings to exist in the next period. The process ws implemented n times to determine the strtegies of the n gents in the next period. Ech of the n gents ws eqully vilble to be selected for ech of the n tournments. Proportionl selection ws pplied by mking n independent rndom selections of the gents' strtegies to populte the subsequent period, where n gent's probbility of being selected (during ech of the n selections) ws proportionl to its obtined utility. Vrint 3.4 The strtegy imittion nd muttion regimes re replced by GA consisting of tournment reproduction, crossover, nd genetic muttion, implemented in tht order. 21 Vrint 3.5 The strtegy imittion nd muttion regimes re replced by GA consisting of proportionl selection, crossover, nd genetic muttion, implemented in tht order. 21 Both vrints with GAs hd strtegy strings initilized where ech bit of ech strtegy string hd n independent even chnce of strting s zero or one. 37