The goal of the research described in this paper is to develop a computational model of the Medina of Marrakech in Morocco. The ultimate goal is to develop a system that could capture some of the characteristics of traditional Muslim cities fabric and use it in contemporary urban planning. Previous papers have proposed the use of three grammars to encode the spatial complexity of the Medina: the urban grammar, the negotiation grammar, and the housing grammar, and addressed the development of the urban grammar. This paper proposes a grammar to describe the formal structure of the houses, the first step in the developments of the remaining two grammars. It describes the set of rules and then illustrates its application in the generation of an existing house. The basic formal structure consists of three concentric rectangular rings with the patio in the middle. The location of the entrance and the staircase are fundamental for the definition of the basic layout.