The author describes the development of a computer tool for urban design and the study of urban morphology: the Town Simulator. The incoherence and lack of cohesion which have characterised much recent urban development show the urgent need for such a tool. Several factors are identified as the source of our 'urban misunderstanding': the complexity of the planning problems involved; certain ideas in the philosophy of modernism in architecture; the multiplicity and discordant character of our democratic society. Many ingredients of urban character are listed, which the Town Simulator must take into account, including environmental factors, the nature of streets and open spaces, the shape and size of building parcels and their patterns of occupation and use, architectural morphologies, and building regulations. The Town Simulator is being built using a flexible rule-based approach to the construction of architectural and urban objects. It is argued that three-dimensional modelling by computer offers a means for overcoming some of the urban design problems identified in the paper.