Lecture Notes in Economics and Mathematical Systems 441 Founding Editors: M. Beckmann H. P. Kiinzi Editorial Board: H. Albach, M. Beckmann, G. Feichtinger, W. Giith, W. Hildenbrand, W. Krelle, H. P. Kiinzi, K. Ritter, U. Schittko, P. Schonfeld, R. Selten Managing Editors: Prof. Dr. G. Fandel Fachbereich Wirtschaftswissenschaften Fernuniversitiit Hagen Feithstr. 140lAVZ II, D-58097 Hagen, Germany Prof. Dr. W. Trockel Institut flir Mathematische Wirtschaftsforschung (IMW) Universitlit Bielefeld Universitlitsstr. 25, D-33615 Bielefeld, Germany Springer Berlin Heidelberg New York Barcelona Budapest Hong Kong London Milan Paris Santa Clara Singapore Tokyo Herbert Dawid Adaptive Learning by Genetic Algorithms Analytical Results and Applications to Economical Models Springer Author Dr. Herbert Dawid University of Vienna Institute of Management Science BrunnersstraBe 72 A-121O Vienna, Austria Library of Congress Cataloging-in-Publication Data Dawid, Herbert. Adaptive learning by genetic algorithms: analytical results and applications to economic models / Herbert Dawid. p. cm. -- (Lecture notes in economics and mathematical systems; 441) ISBN 978-3-540-61513-2 ISBN 978-3-662-00211-7 (eBook) DOI 10.1007/978-3-662-00211-7 1. Economics--Mathematical models. 2. Genetic algorithms. I. Title. II. Series. HB135.D387 1996 330' .01'5118--dc20 ISSN 0075-8442 ISBN 978-3-540-61513-2 This work is subject to copyright. All rights are reserved, whether the whole or part ofthe material is concerned, specifically the rights of translation, reprinting, re-use of illustrations, recitation, broadcasting, reproduction on microfilms or in any other way, and storage in data banks. Duplication of this publication or parts thereof is permitted only under the provisions ofthe German Copyright Law of September 9, 1965, in its current version, and permission for use must always be obtained from Springer-Verlag. Violations are liable for prosecution under the German Copyright Law. The use of general descriptive names, registered names, trademarks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. © Springer-Verlag Berlin Heidelberg 1996 Typesetting: Camera ready by author SPIN: 10544056 42/3142-543210 -Printed on acid-free paper Preface I started to deal with genetic algorithms in 1993 when I was working on a project on learning and rational behavior in economic systems. Initially I carried out simulations in an overlapping generations model but soon got dissatisfied with the complete lack of theoretical foundation for the observed behavior. Thus, I started to work on a mathematical representation of the behavior of a simple genetic algorithm in the special setup of an interacting population of economic agents and step by step arrived at the results collected here. However, I believe that much more can and has to be done in this field. I would like to thank Gustav Feichtinger who not only supervised my doctoral thesis but always supported and encouraged me throughout the last few years. Special thanks are also due to K. Hornik, A. Mehlmann and M. Kopel who contributed largely to the work. During the preparation of the monograph I also benefited from helpful comments of A. Geyer-Schulz, G. Rote, G. Tragler and A. Rahman. Special thanks to W. A. Muller from Springer-Verlag for his support. Financial support from the Austrian Science Foundation under contract number P9112-S0Z is gratefully acknowledged. Vienna, May 1996 Table of Contents Preface....................................................... V 1. Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2. Bounded Rationality and Artificial Intelligence . . . . . . . . . . . 7 2.1 Bounded Rationality in Economics......... ......... ... . . . 7 2.2 Artificially Intelligent Agents in Economic Systems ... . . . . .. 11 2.3 Learning Techniques of Artificially Intelligent Agents. . . . . . .. 13 2.3.1 Genetic Algorithms and Related Techniques.. .... . .. 13 2.3.2 Classifier Systems ................................ 13 2.3.3 Neural Networks ................................. 17 2.3.4 Cellular Automata. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 21 2.4 Some Applications of CI Methods in Economic Systems .. . .. 25 2.4.1 Bidding Strategies in Auctions .................... , 25 2.4.2 The Iterated Prisoner's Dilemma. . . . . . . . . . . . . . . . . .. 27 2.4.3 Market Models. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 31 2.4.4 Further Simple Economic Models. . . . . . . . . . . . . . . . . .. 33 2.5 Potentiality and Problems of CI Techniques in Economics ... 34 3. Genetic Algorithms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 37 3.1 What are Genetic Algorithms? ......... " ... , . . .. .... . . .. 37 3.2 The Structure of Genetic Algorithms.. . . . . . . . . . . . . . . . . . . .. 38 3.3 Genetic Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 39 3.3.1 Selection........................................ 39 3.3.2 Crossover ....................................... 41 3.3.3 Mutation........................................ 42 3.3.4 Other Operators ................................. 42 3.3.5 An Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 43 3.4 Genetic Algorithms with a Non-Standard Structure.. ... . . .. 44 3.5 Economic Interpretation of Genetic Learning. . . . . . . . . . . . . .. 45 3.6 Some Analytical Approaches to Model Genetic Algorithms. .. 49 3.6.1 The Schema Theorem ............................. 49 3.6.2 The Quantitative Genetics Approach ............... 52 3.6.3 Markov Chain Models ............................ 54 VIII Table of Contents 4. .G enetic Algorithms with a State Dependent Fitness :Function.. .. .. ........ ...... .... .. .......... .. .... .. .. .... 61 4.1 State Dependency in Economic Systems ................... 61 4.2 A Markov Model for Systems with a State Dependent Fitness Function....... ........ ... . ... . . .. .. .. . . ...... . ....... 62 4.3 The Difference Equations Describing the GA . . . . . . . . . . . . . .. 67 4.4 Deviation from the Markov Process. . . . . . . . . . . . . . . . . . . . . .. 68 4.5 A Numerical Example ................................... 72 4.6 Stability ofthe Uniform States... .. ... ... .... . ... ........ 73 4.7 Two-Population Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 81 5. Genetic Learning in Evolutionary Games .......... . . . . . .. 87 5.1 Equilibria and Evolutionary Stability ..................... 87 5.2 Learning in Evolutionary Games... ... . ...... . ... ........ 88 5.3 Learning by a Simple Genetic Algorithm.. .... . . .. . ....... 91 5.3.1 Rock-Scissors-Paper Games.... . . ... . ... ....... . ... 92 5.3.2 A GA Deceptive Game. . . . . . . . . . . . . . . . . . . . . . . . . . .. 97 5.3.3 Learning in Non Deceptive Games .................. 101 5.4 Two-Population Contests ................................ 104 6. Simulations with Genetic Algorithms in Economic Systems111 6.1 A Model of a Competitive Market ........................ 111 6.1.1 Pure Quantity Decision ........................... 114 6.1.2 Exit and Entry Decisions .......................... 117 6.2 An Overlapping Generations Model with Fiat Money ....... 122 6.2.1 Learning of Cyclical Equilibria ..................... 126 6.2.2 Learning of Sunspot Equilibria ..................... 130 7. Stability and Encoding ................................... 133 7.1 The Cobweb Example Revisited .......................... 133 7.2 Impact of a Change in Encoding and Scaling ............... 137 7.3 A Method for Finding Economic Equilibria ................ 139 8. Conclusions ............................................... 141 A. Basic Definitions and Results Used ....................... 143 A.1 Time Homogeneous Markov Chains ....................... 143 A.2 Nonlinear Difference Equations and Stability ............... 145 B. Calculation of the Equilibria of the Evolutionary Games in Chapter 5 ................................................ 147 B.1 Rock-Scissor-Paper Games ............................... 147 B.2 The GA Deceptive Game GAD ........................... 149 B.3 The Games Gl and G2 .................................. 150 References .................................................... 151 Table of Contents IX List of Figures ................................................. 159 List of Tables .................................................. 163 Index ......................................................... 165 1. Introduction The analysis of mathematical models describing the learning behavior of ra tional agents has been one of the major topics of economic research for the last few years or even decades. Many different models have been proposed and their analysis has given the researchers some insights into the phenomenon of formation of equilibria in economic systems. On the other hand, the modern development of computer technology has caused the rise of a new dynamic field of research, which deals entirely with the understanding and imitation of human behavior, namely the "artificial intelligence" research. Although there is considerable overlap between these two fields they have long developed in isolation from one another. Only recently the interest of some economists in certain techniques mainly from the AI related field of "computational intelli gence" (el) has increased and has led to the applications of these techniques to economic models. The main reason for the weak interaction between economists and CI re searchers is that the tools and goals of these two groups are quite different. The traditional approach of economists is to analyze economic systems with the help of mathematical theory. Relying on plausible behavioral assump tions about economic agents an adaptive learning model is constructed. The economists use mathematical representations of the model and try to derive analytical results for these models. In order to keep these models analyti cally tractable most of these models use rather simple behavioral assump tions. Nevertheless, a large number of conclusions could be derived with this approach. Often the mathematical analysis allows structural insights and ex plains similarities and differences in the behavior of different models. On the other hand, the majority of models allow only a few weak or local results. In these cases a mathematical analysis draws only a coarse picture of the learning behavior. Quite the opposite holds true for the approach taken by computer sci entists. They like to deal with learning models which may be efficiently im plemented on a computer. Usually mathematical considerations are of minor importance, and the algorithms rely on heuristic arguments and similarities to nature. Normally the analysis of these algorithms is done by testing them with a large number of actual problems. The -obtained numerical results are used to build up conjectures regarding the performance of the algorithm in 2 1. Introduction different set-ups. On one hand this approach allows to use more complex learning models than the analytical approach described above but on the other hand simulations can never prove a certain feature of the model but only suggest it. In general the structural insights which may be obtained by numerical simulations are not comparable to general mathematical results but simulations allow some ideas about the behavior even if a mathematical analysis is completely impossible. In this monograph we connect the two approaches and analyze a special learning algorithm developed in the CI literature with analytical methods and simulations. We concentrate on genetic algorithms (GAs) and show how these learning algorithms may be interpreted as models of the learning be havior of a population of adaptive agents. We further translate this algorithm into a framework of traditional learning models in economics, namely math ematics. In doing so we get the opportunity to take both the analytical and numerical approach to this algorithm. In the analytical part we do a more or less standard analysis of an economic learning rule and try to describe the long run behavior of a population which acts according to this learning model. We derive by means of Markov theory a result which characterizes the possible long run states of the population. In analyzing a system of difference equations, we furthermore give conditions for local stability or instability of an arbitrary state. Based on these results we show that the calibration of pro cesses like genetic algorithms is very important. Different coding mechanisms and parameter values may lead to a completely different long run behavior of the system. These results will be first shown by mathematical proofs and also illustrated by examples from the fields of game theory and economics. However, the part of these notes in which we present simulations is not intended as a pure illustration of the mathematical results, but should be regarded as an important part of the analysis of GAs in economic systems. The simulations show several properties of the process we could not prove analytically and we also present simulations in models where the assump tions of our analytical result.s are not fulfilled. Thus we believe that in these notes both the analytical approach and the simulation approach are of great importance. Both approaches together will give quite a fine picture of the behavior of GAs in economic systems. Besides the technical aspects a major goal of these notes is also to give an economic interpretation of the GA as a learning rule. We will try to use this interpretation to understand simulation results in different economic models from an economic point of view. Some words of motivation are in order here. Why do we consider GAs as a model of adaptive learning and why do we think that this analysis is of interest. First of all, as already mentioned and as elaborated in chapter 2 various researchers have used GAs for simulating the behavior of a population of interacting agents. Although this per se should not be seen as a striking argument that GAs are a useful model oflearning our analysis can in any case