Genetic Learning of Firms in a Competitive Market

Similar documents
how should the GA proceed?

Learning to Forecast with Genetic Algorithms

Lecture 9 Evolutionary Computation: Genetic algorithms

GENETIC ALGORITHM FOR CELL DESIGN UNDER SINGLE AND MULTIPLE PERIODS

Chapter 8: Introduction to Evolutionary Computation

Genetic Algorithms: Basic Principles and Applications

CSC 4510 Machine Learning

Evolutionary Computation

Genetic Algorithm for Solving the Economic Load Dispatch

Fundamentals of Genetic Algorithms

Industrial Organization Lecture 3: Game Theory

Evolutionary computation

[Read Chapter 9] [Exercises 9.1, 9.2, 9.3, 9.4]

Evolutionary computation

A GA Mechanism for Optimizing the Design of attribute-double-sampling-plan

Crossover Techniques in GAs

Chapter 14: Finding the Equilibrium Solution and Exploring the Nature of the Equilibration Process

The Role of Crossover in Genetic Algorithms to Solve Optimization of a Function Problem Falih Hassan

Package nsga2r. February 20, 2015

Search. Search is a key component of intelligent problem solving. Get closer to the goal if time is not enough

The European Applied Business Research Conference Rothenburg, Germany 2002

4. Partial Equilibrium under Imperfect Competition

Outline. Social Behavior and Information Diffusion. Background: RAH vs. ABM What is the Representative Agent Hypothesis? Outline

The Genetic Algorithm is Useful to Fitting Input Probability Distributions for Simulation Models

Lecture 22. Introduction to Genetic Algorithms

Data Warehousing & Data Mining

Scaling Up. So far, we have considered methods that systematically explore the full search space, possibly using principled pruning (A* etc.).

Genetic Algorithms. Seth Bacon. 4/25/2005 Seth Bacon 1

Parallel Genetic Algorithms

Intelligens Számítási Módszerek Genetikus algoritmusok, gradiens mentes optimálási módszerek

Matt Heavner CSE710 Fall 2009

Determination of Optimal Tightened Normal Tightened Plan Using a Genetic Algorithm

Stochastic Search: Part 2. Genetic Algorithms. Vincent A. Cicirello. Robotics Institute. Carnegie Mellon University

Adaptive Generalized Crowding for Genetic Algorithms

Expected Running Time Analysis of a Multiobjective Evolutionary Algorithm on Pseudo-boolean Functions

Lecture 15: Genetic Algorithms

932 Yang Wei-Song et al Vol. 12 Table 1. An example of two strategies hold by an agent in a minority game with m=3 and S=2. History Strategy 1 Strateg

Artificial Neural Networks Examination, March 2004

Computational statistics

The Impact of Organizer Market Structure on Participant Entry Behavior in a Multi-Tournament Environment

Monopoly Part III: Multiple Local Equilibria and Adaptive Search

Optimal Operation of Large Power System by GA Method

Nonlinear dynamics in the Cournot duopoly game with heterogeneous players

Gene Pool Recombination in Genetic Algorithms

Obtaining simultaneous equation models from a set of variables through genetic algorithms

Forecasting & Futurism

Local Search & Optimization

Individual learning and population evolution

INVARIANT SUBSETS OF THE SEARCH SPACE AND THE UNIVERSALITY OF A GENERALIZED GENETIC ALGORITHM

Haploid & diploid recombination and their evolutionary impact

Department of Mathematics, Graphic Era University, Dehradun, Uttarakhand, India

Simple Forecasting Heuristics that Make us Smart: Evidence from Different Market Experiments

Multi-objective genetic algorithm

EVOLUTIONARY DISTANCES

Generalization of Dominance Relation-Based Replacement Rules for Memetic EMO Algorithms

Genetic Algorithms & Modeling

BELIEFS & EVOLUTIONARY GAME THEORY

Genetic Algorithm. Outline

Geometric Semantic Genetic Programming (GSGP): theory-laden design of variation operators

Interplanetary Trajectory Optimization using a Genetic Algorithm

Artificial Neural Networks Examination, June 2005

Evolutionary Functional Link Interval Type-2 Fuzzy Neural System for Exchange Rate Prediction

Evolutionary Computation. DEIS-Cesena Alma Mater Studiorum Università di Bologna Cesena (Italia)

No Information Sharing in Oligopoly: The Case of Price Competition with Cost Uncertainty

Genetic Algorithms and Genetic Programming Lecture 17

Game Theory. Wolfgang Frimmel. Perfect Bayesian Equilibrium

Geometric Semantic Genetic Programming (GSGP): theory-laden design of semantic mutation operators

Limit pricing models and PBE 1

Schema Theory. David White. Wesleyan University. November 30, 2009

Introduction. Genetic Algorithm Theory. Overview of tutorial. The Simple Genetic Algorithm. Jonathan E. Rowe

Computational Complexity and Genetic Algorithms

DISCUSSION PAPER SERIES

Evolving more efficient digital circuits by allowing circuit layout evolution and multi-objective fitness

Long-run Analysis of Production. Theory of Production

Evolution of Populations. Chapter 17

Bounded Approximation Algorithms

Wireless Network Pricing Chapter 6: Oligopoly Pricing

Using Genetic Algorithm for classification of flower plants

OPTIMIZED RESOURCE IN SATELLITE NETWORK BASED ON GENETIC ALGORITHM. Received June 2011; revised December 2011

1 Games in Normal Form (Strategic Form)

LEM. New Results on Betting Strategies, Market Selection, and the Role of Luck. Giulio Bottazzi Daniele Giachini

Artificial Neural Networks Examination, March 2002

VERY SIMPLY PUT-- Evolution is. change in a species over time.

Entry under an Information-Gathering Monopoly Alex Barrachina* June Abstract

Entropy as a measure of surprise

Bertrand Model of Price Competition. Advanced Microeconomic Theory 1

CC283 Intelligent Problem Solving 28/10/2013

A Comparison of GAs Penalizing Infeasible Solutions and Repairing Infeasible Solutions on the 0-1 Knapsack Problem

From Binary to Multiclass Classification. CS 6961: Structured Prediction Spring 2018

Bounded Rationality Lecture 2. Full (Substantive, Economic) Rationality

Thermal Unit Commitment

Simple Forecasting Heuristics that Make us Smart: Evidence from Different Market Experiments

A Simple Exchange Economy with Complex Dynamics

Data Analysis for the New Millennium: Data Mining, Genetic Algorithms, and Visualization

Growing competition in electricity industry and the power source structure

UC Berkeley Haas School of Business Game Theory (EMBA 296 & EWMBA 211) Summer 2016

Linear equations The first case of a linear equation you learn is in one variable, for instance:

Knowledge licensing in a Model of R&D-driven Endogenous Growth

Estimation-of-Distribution Algorithms. Discrete Domain.

1 Simplex and Matrices

Transcription:

FH-Kiel, Germany University of Applied Sciences Andreas Thiemer, e-mail: andreas.thiemer@fh-kiel.de Genetic Learning of Firms in a Competitive Market Summary: This worksheet deals with the adaptive learning behaviour of boundedly rational agents in a competitive market and presents the model of Dawid/Kopel (998) and Dawid (999), which includes two versions. In the first scenario the firms make only quantity decisions. In the other scenario firms decide to exit or stay in the market, and then they decide how much to produce. A simple Genetic Algorithm (GA) with different coding schemes, similar to that used by Dawid and Kopel, simulates the adaptive learning of the firms. Depending from the setup of the GA the behaviour of these artificial agents converges to the rational expectations equilibrium of the market model. A. Thiemer GA-MARKET.mcd, 6..7

A basic model of a competitive market There are n firms which produce and offer the same good. Each firm i,.. n produces a quantity y i. All firms have the same cost function: cy ( ) α. y if y > if y where α, > The parameter α denotes the short term fixed costs of the firm, which only incur if y> (for example a fee for market entry). The market supply is: Y n i = y i The price p that clears the market in every period is determined by the inverse demand function: p( Y, a, b, n) a b. n Y where ab, > In order to allow the clearance of the market y a b has to be satisfied. The profit Π of a firm is given by: Π ( p, y, α, ) p. y α. y if y > otherwise In order to guarantee that Π > at least for some values of p and y, we check: profit_condition( α,, a) "Positive profits are possible!" if α < a 4. "Fixed costs are to high!" otherwise A. Thiemer GA-MARKET.mcd, 6..7

The firms do not know the price p, when they have to decide which quantity to produce. However, each firm forms an expectation p e about the price. Solving the first order condition d of a profit maximum ( Π d y ) we obtain: d y p. e y α. y d auflösen, y p. e But this solution for the optimal ouput is only valid, if the price expectation is higher than the shut down price (where Π ), which is the positive root of the following solution: p. e y α. y ersetzen y p e,. auflösen, p e. ( α. ). ( α. ) In case of this limit price the optimal output y > is: p. e ersetzen, p e. ( α. ) ( α. ) Thus we have to complete the optimal output rule: p y opt p. e e if p e >. ( α. ) ( α. ) or otherwise if p e. ( α. ) A. Thiemer 3 GA-MARKET.mcd, 6..7

In a homogenous rational expectations equilibrium all firms have perfect foresight (p p e ) and all take the same optimal action y opt p e. Hence, if p e >. ( α. ) solving Y n. y opt p e yields the equilibrium price if : p e a b. n n p.. e auflösen, p e. a. (. b) Solving a... α. ( ) auflösen, α a. (. b) 4. 4.. b b it is seen, that the condition p e >. ( α. ) holds if and only if α a. (. b) On the other hand, if p e <. ( α. ) such that Y, we get p a. However this parameter constellation contradicts the "profit condition" from above. In this case no homogenous rational expectation equilibrium p E exists. Thus: a p E ( ab,, α, )... if α ( b) a. (. b) "No homogenous rational expectation equilibrium exists!" otherwise A. Thiemer 4 GA-MARKET.mcd, 6..7

Scenario I: pure quantity decisions In the basic scenario the same parameter values are used as in Dawid (999, p. 4): a 5 α 4 b 5 Check the profit condition: profit_condition( α,, a) = "Positive profits are possible!" Compute the rational expectations equilibrium price: p E ( ab,, α, ) 7 Compute optimal output of one firm at the rational expectations equilibrium: p E ( ab,, α, ) y. E 5 7 Because our firms are only "boundedly" rational agents, they do not know this equilibrium values. Instead they learn from each other by imitation and "trial and error". Like Dawid we use a simple Genetic Algorithm (GA) to simulate the adaptive learning behaviour of the firms. Excurs: A Stepwise Introduction to a Simple Genetic Algorithm Step : Define the fitness function First, we define the fitness function, which assigns at every time some positive "fitness value" to any firm. To rule out negative values we use the normalized version of the profit function: fit( p, y, α,, a, b) Π ( p, y, α, ) α. a b Step : Define encoding and decoding Typically a GA works on a population of binary strings ("chromosomes"), for example: chromosome ( ) Each firms output strategy is encoded by such a binary string. Thus, every chomosome encodes a real number in [, a ]. The following function decodes a single binary string: b A. Thiemer 5 GA-MARKET.mcd, 6..7

DEZ( gen) spalten( gen) j = gen. j spalten gen, ( ) j Example: DEZ( chromosome) = 9 The following subroutine decodes the strings of a whole population (i.e. all firms) where POP is a matrix which collect all strings of the population as single rows: DEZ_POP( POP) for j.. zeilen( POP) gen submatrix( POP, j, j,, spalten( POP) ) z j DEZ( gen) z Depending from the length (= BITS) of a chromosome the maximal encoded value of the real number vary. Example: ZMAX( BITS) BITS i = BITS i ZMAX( 4) = 5 or ZMAX( ) =.3. 3 Therefore, we normalize the decoded values such, that they fall into the output intervall [, a/b]: Example: a b DEZ( chromosome). =.6 ZMAX( spalten( chromosome) ) Step 3: Create an initial population An initial population of firms is generated randomly, where "POPSIZE" means the number of firms: POP( BITS, POPSIZE) for x for i.. BITS, floor( rnd( ).5) x ji j.. POPSIZE A. Thiemer 6 GA-MARKET.mcd, 6..7

Example: P init POP( 4, 8) P init =... or decoded and normalized:.67 y init DEZ_POP P init a. b ZMAX spalten P init y init =.67..667.467.933.67 Step 4: Compute the fitness of the population The market supply of this initial random selection of output decisions is: zeilen P init Y init i = y initi Y init = 3.467 Hence we obtain the market price: p init p Y init, a, b, zeilen P init p init =.833 A. Thiemer 7 GA-MARKET.mcd, 6..7

Using the fitness function for all members of the population we get: F fit p init, y init, α,, a, b F =.84.84.833.57.444.4.773.84 Step 5: Sort the population This subroutine expands the population matrix with a new column which represents the fitness of every population member and sorts the chromsomes from the highest fitness in row to the lowest fitness in the last row: SORT_POP( Z, F) X erweitern( Z, F) X X X spsort( X, spalten( X) ) umkehren( X) Example:.833.773.444 PF SORT_POP P init, F PF =.4.57.84.84.84 Step 6: Select the "fittest" This subroutine models the selection operator, which is intended to implement the idea of the "survival of the fittest". This operator determines which of the chromosomes in the current population will be allowed to pass their "genetic material" (i.e. the output strategy) to the next generation. The parameter "KEEP" means the even number of the fittest firms which will remain unaltered for the next generation (they form the elite; for KEEP = there is non elite formed). To fill up the "mating pool", also a tournament selection takes place. In every tournament two strings are selected randomly from the current population but only the one with the higher fitness value enters the mating pool. The output of this subroutine builds a matrix which includes the pairwise position numbers of the winners from the tournaments. A. Thiemer 8 GA-MARKET.mcd, 6..7

PAIR_T( KEEP, POPSIZE, BITS, POP) j REPLACE ( POPSIZE KEEP) for i.. REPLACE j while j A floor( rnd( POPSIZE ).5) B floor( rnd( POPSIZE ).5) pair ij, A if POP A BITS, pair ij, B otherwise j j pair, POP B BITS Example: keep 4 mating_pool PAIR_T( keep, zeilen( PF), spalten( PF), PF) mating_pool = 3 3 4 Step 7: Use the crossover operator Crossover is intended to join the genetic material of chromosomes with a high fitness in order to produce better individuals. An economic interpretation is that crossover is (partial) imitation of successfull behaviour. The mating pool is splitted into pairs of strings called parents. Given the crossover probability CROSSPROB (often CROSSPROB= is used), one crossover point is drawn randomly between the bits of a string. The following subroutine gives these points for every pair of parents: ( POPSIZE KEEP) X( KEEP, POPSIZE, CROSSPROB, BITS) REPLACE yes runif( REPLACE,, ) for i.. REPLACE yes i, if yes i, CROSSPROB yes i, otherwise X runif( REPLACE,, BITS ) X ( floor( X.5). yes) X A. Thiemer 9 GA-MARKET.mcd, 6..7

Example: X_points X( keep, zeilen( PF),, spalten( PF) ) X_points = Now for every pair of parents the bits to the right of the crossover point are swapped between these two parents: CHILD( POP, PAIR, XPOINTS, BITS) REPLACE zeilen( PAIR) for for i.. REPLACE j.. BITS for k.. XPOINTS i, child i., k POP PAIRi, k, child i., k for k POP PAIRi, k, XPOINTS i,.. BITS child i., k POP PAIRi, k, child child i., k POP PAIRi, k, Example: offsprings CHILD( PF, mating_pool, X_points, spalten( PF) ) offsprings = A. Thiemer GA-MARKET.mcd, 6..7

Step 8: Use the mutation operator The mutation operator should allow the GA to find strategies, which contain bit values that are not existent in the current population. In economic terms mutation stands for innovation. With mutation probability MUTPROB > each bit in any string of the offsprings is inverted: MUT( POP, MUTPROB) for i.. spalten( POP) for j.. zeilen( POP) POP POP ji, POP ji, if rnd( ) MUTPROB Example: mutated_offsprings MUT( offsprings,.3) mutated_offsprings = Step 9: The next generation The elite and the mutated offsprings generate a new population of strategies. The procedure from step 4 to step 9 is repeated until a prescribed number of iterations MAXITER has been performed. -----------------------------End of Excurs----------------------------------------------------- The following main routine GA iterates the steps from above. For any period (= generation) the average production output of the firms will be computed. Genetic Algorithm (GA) Enter GA-Parameters: POPSIZE 3 KEEP BITS CROSSPROB MUTPROB. MAXITER 5 time,.. MAXITER A. Thiemer GA-MARKET.mcd, 6..7

y mean GA( POPSIZE, KEEP, BITS, CROSSPROB, MUTPROB, MAXITER, α) To start a new simulation with the same parameters but with another initial random population click on the red command line and press the F9-key. Average production quantity y E.5 5 5 5 3 35 4 45 5 time period (= generation).8 Average profit.6.4. 5 5 5 3 35 4 45 5. time period (= generation) Try more simulations to see that the firms are able to adapt their production decision in such away that their output quantities converge towards the rational expectations equilibrium. A. Thiemer GA-MARKET.mcd, 6..7

Scenario II: entry and exit decisions Now the fixed costs are higher than before: α Check the profit condition: profit_condition( α,, a) = "Positive profits are possible!" Compute the rational expectations equilibrium price: p E ( ab,, α, ) "No homogenous rational expectation equilibrium exists!" Start a simulation with the GA-Parameters from scenario I: y mean GA( POPSIZE, KEEP, BITS, CROSSPROB, MUTPROB, MAXITER, α) To start a new simulation with the same parameters but with another initial random population click on the red command line and press the F9-key. Average production quantity y E.5 5 5 5 3 35 4 45 5 time period (= generation) Average profit 5 5 5 3 35 4 45 5..4.6.8 time period (= generation) A. Thiemer 3 GA-MARKET.mcd, 6..7

Although there exists no homogenous rational expecatations equilibrium, the average produced quantity converges toward y E and the price towards p E a b. y E. There is a "lock in" of the GA in a "false" economic equilibrium. If all firms produce y E their profit will be negative: Π a b. y E, y E, α, =.49 Obviously any single firm will be better off by exiting the market with a profit of. But this does not happen, because the GA converges towards some kind of local equilibrium, where no firm can gain by a small unilateral deviation from its current strategy. Dawid (999, proposition 4.6.) gives a formal explanation why the GA behaves in this way. But an uniform population with all firms out of the market is also no economic equilibrium. In this case the price is p = a. Because this price is higher than the shut down price, any single firm will decide for market entrance! Thus in this case an economic equilibrium with an uniform population doesn't exist. In the long run only a profit Π can be realized. Therefore, the rational price expectation equals the shut down price: p E. ( α. ) In such a heterogenous rational expectations equilibrium the firms have the same (self fulfilling) expectation, but the optimal production quantity is not unique. y and y α y yield the optimal profit of. Denote the fraction of firms producing x. α. a b. ( n xn. α ). auflösen, x 3 5 α as x. Then and the average production of all firms is y x α. x 3 5. With the previous coding scheme the basic decision to exit the market (y = ) can only be made by changing all bits in the string to. It seems more plausible to seperate the decision of the firm in two parts:. Entry (or exit) decision. Quantity decision To represent this stepwise decision making in the GA, Dawid (999) adds a special bit to the string. Only if this bit has value, the quantity encoded by the other bits in the string is really produced. Otherwise no production takes place. Thus, we have to modify our decoding procedure: DEZ_POP( POP) M spalten( POP) for j.. zeilen( POP) z gen submatrix( POP, j, j,, M ) z j DEZ( gen). POP jm, A. Thiemer 4 GA-MARKET.mcd, 6..7

Also some small adjustments of the main routine are necessary. Genetic Algorithm (GA) Running this program the same parameters are used as before. out GA( POPSIZE, KEEP, BITS, CROSSPROB, MUTPROB, MAXITER, α) To start a new simulation with the same parameters but with another initial random population click on the red command line and press the F9-key. Average production quantity y E y x.5 3 4 5 time period (= generation) Fraction of firms entering the market x.5 3 4 5 time period (= generation) A. Thiemer 5 GA-MARKET.mcd, 6..7

.5 Profits.5 3 4 5.5 average profit maximum profit time period (= generation) Now the average production ends up oscillating heavily around y x. Although the average profit may be negative, there arise single firms with extraordinary high positive profits, if the fraction of firms exiting from the market is high. Hence in the next period more firms are allured to market entry (via the selection operator) and profits decrease, leading to market exits in the following period. Literature: Dawid, H./Kopel, M.: On Economic Applications of the Genetic Algorithm: a Model of the Cobweb Type. In: Evolutionary Economics, vol. 8 (998), 97-35. Dawid, H: Adaptive Learning by Genetic Algorithms. Berlin et al. 999. Haupt, R.J./Haupt, S.E.: Practical Genetic Algorithms. New York et al. 998. A. Thiemer 6 GA-MARKET.mcd, 6..7