Application of evolutionary programming to shape design

Application of evolutionary programming to shape design

PII: s0010-4485(97)00050-x Computer-Aided Des,gn, Vol. 30, NO. 1, pp. 29-35, 1998 0 1998 Elsevier Science Ltd. All rights reserved Printed in Great B...

802KB Sizes 13 Downloads 189 Views

PII: s0010-4485(97)00050-x

Computer-Aided Des,gn, Vol. 30, NO. 1, pp. 29-35, 1998 0 1998 Elsevier Science Ltd. All rights reserved Printed in Great Britain 001 O-4485/98/$1 9.00+0.00

ELSEVIER

Application of evolutionary programming to shape design T. Taura*t,

I. Nagasaka* and A. Yamagishi*

exhibit a definitive image of shape with hard lines at this stage might restrict the designers’ imagination. In this case, ambiguity and incompleteness of the geometrical representation of the shape should be considered. However, in existing CAD systems, the aspects of manufacturing feasibility and functionality have greater weight in supporting product design, so the geometric model demands an unambiguous method of representing the shapes ‘,2. For example, in the ‘form feature model’ 3, since the shapes are represented by assembling the form features which are accurately defined, it is difficult to represent the design feature in the sense mentioned above. There is also a representation called the ‘constraint-bases model’4,5. However, since very little geometrical or functional constraint would be found at this stage, this model is not appropriate for this design stage either. Therefore, in this paper, we propose a new model of representing free form shape features, called the shape feature generation process model (SFGP model)6, with the aim of making the system capable of holding and manipulating the features required to support the designer early in the design process. The paper is organized as follows: Section 2 describes the concept of the SFGP model while in Section 3 we explain the model in detail using an implemented prototype system.

Designing the shapes of products is the primary activity of the design process. In this paper, we propose a new model representing free form shape features with the aim of making the system capable of holding and manipulating the shape features after synthesis in order to support the designer early in the design process. The key

concept of this study is the shape feature generating process model (SFGP model) which consists of numerous sets of rules using the classifier system (CS). Finally, a computer program was developed to evaluate the model by combining two existing shapes to verify that the shape features of each shape are preserved in the combined shape. It was demonstrated that the model can produce a variety of combined shapes with original, often exaggerated, features. 0 1998 Elsevier Science Ltd. All rights reserved Keywords: shape feature genetic algorithms

generation,

shape,

form feature,

INTRODUCTION In industrial design, determining the shape of products is the primary activity of the design process. It is common for designers, especially early in the design process, to start designing a product with a vague image of a shape in mind with reference to existing products or combining the features of two or more products. At this stage, they often draw sketches and sometimes make prototypes to fix their image of a product. In words, they are trying to externalize an image of a shape which already exists in their minds within the limits of their background knowledge and experience. Therefore, to support shape design using a computer, it is desirable that the system be able to hold design features of shapes and exaggerate or combine them to stimulate design activities. In this paper, the term ‘design feature’ does not refer to features of parts of products such as holes or drains but to the aesthetic elements of products which may consist of a collection of the parts, to the elements special attention is paid by the designers. When designers draw sketches, they frequently use free form shapes to represent design features. The design feature in a sketch or prototype clearly indicates the intended result, while often leaving room for other design options, since to

SHAPE FEATURE GENERATION

PROCESS

Usually, the structure of data and the feature represented correspond directly. However, in our model, shapes are represented by a process that consists of sets of rules which generate the shapes as they are executed, and the design feature of the shapes is indirectly hold in the sets of rules. Therefore, when two shapes represented by this model are combined by integrating two sets of rules, the features of the shapes are preserved, and often exaggerated, in the combined shapes.

Solid geometric models A solid geometric model is an unambiguous and informationally complete mathematical representation of a shape in a form that a computer can process. Constructive solid geometry (CSG) and boundary representation are the two principal solid model representations. In CSG, an object is described in terms of elementary shapes (half-spaces) or primitives (bounded primitive solids), and complex solids are built by Boolean operations. In boundary representation, the mathematical data for the surface geometry are stored. A solid is represented as unions of faces, bounded by edges, which are bounded by vertices’.

*RACE: Research into Artifacts, Center for engineering, The University of Tokyo, 4-6-l Komaba, Meguro-ku, Tokyo 153, Japan. +To whom correspondence should be addressed. Tel: +8 l-3-5453-5882 Fax: +8 I-3-3467-0648. Paper Received: 21 June 1996. Revised: 22 June 1997

29

Applying

programming

to shape design: T Taura et al.

d = density of cells near point A

Figure 3 cell dl\ l\ion

Correspondence model

between shape and distribution

of’ density

in

In a sense. CSG can be considered to be the generation process. however, since it also contains the elementary shape information which corresponds to the representation, which does not constitute a process or rule, it is different from a geometric model which is focused on the shape feature generation process. In representing and combining lowing difficulties arise.

design features. the fol-

In CSG, when two shapes are combined by Boolean operation. the result is simply a composition of parts of the shapes and the common spaces of the two shapes are erased. In boundary representation, it is difficult to preserve the design feature of shapes after combination. as they are represented by the mathematical data of the surface geometry. and would simply be cancelled out be adding or subtracting the data.

Concept of the shape feature generation

process

Developmental biology is applied to devise a computational model of the representation called the ‘cell division model’ ‘. In nature, the shape of a living organism (phenotype) is represented by genetic information (genotype)’ The genotype contains information that is descriptive through the execution of a set of developmental rules. a range of possible phenotypes, and information encoding the developmental process itself, i.e. how to go about making a phenotype from a genotype “‘. In our model, the former is the set of shape feature generation rules and the latter is the cell division model Figure I shows how the SFGP model proceeds. Shape generation starts with the primary shape (sphere) and rules are selected and applied according to the position and local condition of the shape. After a number of generations. the final shape is generated.

Cell division model In this section, we present a methodology called the cell division mode, which is the basis for the SFGP model. As mentioned above, the cell division model is based on the early development of a living creature. In nature. development begins with the fertilized egg, which is a single cell. giving rise to a number of smaller cells. Cell divisions cleave the egg. resulting in a multicellular structure. These cell divisions simply divide the egg into a population of mailer cells which form the early embryo”. In our model. the set of rules actually consists of the rules oT diviGon for a dot (which we call a cell as an analogy to biological development) on the sphere. Therefore, the shape feature generation process is the series for this cell division. As shown in Figure 2, in the beginning there are a few cells on a sphere. According to the rules, they divide into two or more cells and spread over the sphere. Consequently, after a number of generations, the cell division produces a distribution of cell density at the surface of the sphere. As Figure 3 illustrates, the shape is derived by processing the density of cells”. In this figure, 0 is the center of the sphere. The value ri is the density of cells near point A. Density d is converted to a distance from 0 to the ‘point on surface’ which is the point on the surface of the shape in

~_[=zgqEy input message

store

output message

t+g

1.. treward -I Environment

Figure 2

30

Cell division

J

final

primary model

Figure 4

Classifier

ry5tem

Applying programming to shape design: T Taura et a/. = : if then Figure 5

Classifier

the direction of OA. By equating the density of cells to the distance to the surface of the shape, the ‘cell division model’ can display fairly complicated shapes. The positions of points where the density is measured on the sphere are arbitrary, but clearly the more points that are set, the better the precision of representation of the shape.

Classifier system The set of rules that governs the series of cell division is processed by the classifier system. The classifier system (CS) is a kind of rule-based system based on genetic algorithms (GAS) ‘3,‘4*‘5, with general mechanisms for processing rules in parallel, for adaptive generation of new rules, and for testing the effectiveness of existing rules. Since the cell division model uses the set of rules as a basis for the model. the CS is adopted as a substructure of the SFGP model. The CS provides a framework in which a population of rules encoded as bit strings evolves on the basis of intermittently given stimuli and reinforcement from its environment. The system ‘learns’ which responses are appropriate when a stimulus is presented. The rules in a classifier system form a po ulation of individuals which evolve over time (F&U-~ 4) p6. The environment sends a message which is accepted by the classifier system’s detectors and placed on the input message list. The detectors decode the message into one

or more messages and place them on the message list. The messages activate classifiers (a kind of production rule, see Figure 5); strong, activated classifiers in turn place messages on the message list. The environment evaluates the action of the system (reward), and the apportionment of the credit system updates the strengths of the classifiers. A genetic algorithm reproduces the classifiers according to their strength. This classifier plays the role of the cell division rules in our model. < condition > is the criteria of local density around the cells, and < action > contains the information recording the direction and distance of movement of the daughter cell after cell division. However, applying all rules to every single cell on the sphere surface is not only very inefficient and requires an enormous amount of computational time, it also makes it very difficult to determine which rules are responsible for the generation of the various design features of the shape. Therefore, as shown in Figure 6, the sphere is divided into a certain number of parts and, depending on the location (A, B, C.. .) of the cell on the sphere surface, a group of rules is selected (B). After the cell density around the cell are measured, a rule which matches the criteria of the density, that is the condition in the rule, is applied (Rule B-2) in order to prompt cell division according to the action specified in the rule. The values 0 and r#~are the angles from the position of a parent cell to that of a daughter cell in the directions of latitude and longitude, respectively. Consequently, the rule set itself consists of a group of rules. This means that each rule set contains a fixed number of subsets of rules responsible for a particular part of the sphere. As shown in Figure 7, actual sets of rules (classifier in CS) are binary codes classified by parts of the sphere (A, B,

c. .‘.).

set of rules

group of rules

B,

< Rule > Figure 6

= cell density (condition)

: cell division

(action)

Rule selection process

31

Applying

programming

to shape design: T Taura

et al.

\

‘110111

100010

density ( Figure 7

Setof rulesin

condition ) :

000010

$

f9 (

action )

binary code\

After a number of cell divisions, the distribution of the density of cells is measured and converted into free form shapes. Consequently, the shape is generated by applying the set of cell division rules through the classifier system. Figure 8 shows the correspondence between the genotype (set of cell division rules) and the phenotype (shape).

IMPLEMENTATION There are two steps in implementing the prototype system. The first is a system for finding the set of rules which generates required shapes, since a set of cell division rules must be developed before any procedure can be implemented. The second is a system for combining two existing shapes to verify whether the features of the shape are preserved in the combined shape. In addition, further examination is conducted to determine which rules actually hold the features of the shape.

GenOtVDe rule set

of cell division

Shape

Finding rules In this section, each step of the process of the prototype system for finding set of rules for generating the required shape is explained. An overall functional diagram of the prototype system is shown in Figure 9, and Figure 10 explains each step outlined in the diagram. As previously mentioned, the CS is adopted as a substructure of the system (see Figure 4). and through the exchange of information, that is < condition > (cell density) and < action > (cell division). between the rule store and the CS, the system obtains the rule set for generating the existing shape (target shape). In addition, Figure I I shows how the evaluation function of GAS is used in step 10. Shapes which are generated after undergoing these processes are compared with existing shapes, and the greater the similarity between the existing and the generated shape, the higher the evaluation score for the corresponding set of rules. The evaluation score is the inverse of the sum of differences between the distance from the center of the sphere (0 in Figure 1 I) and the corresponding points on the existing and generated shapes. Figure 12 shows how generated shapes become closer to the target shape entered by the existing CAD system. At the 200th generation, generated shapes are almost identical to the largest shape. The same result can be observed in Figure 13 in terms of the evaluation score.

Combining

Cell Division

Figure 8

32

Genotypeandphenotype

shapes

In this section, the procedure of combining two exiting shapes is explained and two existing shapes are combined to verify if the features of the original shape are preserved in the combined shape and to determine possible applications of this model. Figure 14 shows how a combined set of rules (classitier) is obtained by exchanging parts of the set of rules with GAS operation, i.e. crossover. As shown in Figure 14, the crossover operation does not mix up the set of rules, but cuts the part of the set of rules which may hold the required features of the shape and exchanges it for the same part of the set of

Applying

target shape (existing shape)

programming

to shape design: T Taura et al.

@ ;

(repeat)

@

_

cell division

out aeometric d&a of existina shaoes usina CAD svstem; if then 100110 : 001001 110101 111100 : 101010 100111 density ; 8 i 101101 : 001011 001110

@_

@(generate)

Randomlv aenerate a number of cell division rule sets;

0

e



Convert the distribution of densitv of cells into free-form shaoe:

I

001001 110101

-

101010 100111

In first run. send to the effecters without outout from

Evaluation score = It Ugenerated - d_existing)

0

#

Select the rule set used to aenerate a shaoe more similar TV the existina one than the others bv GAS evaluation function;

001001 110101

Cell division takes olace accordina to ;

3 (GA)

Crc

d

Measure the distribution of densitv of cells and decode it into _btnarv messapes to send to the detector; to the cells in a SDecific Dart of the SDhere

Send mews surface;

0
looli-_ 4 001100 I

I

~~~00~ m

t

111100 : 010 100111 001011 101 : 001011 001110 Yf

Oololr

111

I

Crossover and mutate selected rule sets bv aenetic ooeration; 0

,,,,~~ h;act’on’ 10101 100110 l 001100

Exchange

: i .

(repeat)

Retreat 4. - 11. until the svstem finds the set of cell division rules used to oenerate which is sufficientlv similar the existina one. One aeneration consists of 1. - 17 .

001001 ~0101

_.

-

(not sent) (not sent)

Comoare messaaes with : ’ n>. if After a number of aenerations. the svstem obtains the rule set used to aenerate the existina shaoe.

Figure10 Explanation

of each step

33

Applying

programming

to shape design: T Taura et al.

ated

generated shape

existing shape

Evaluation score = l/X (dgenerated

Figure 11

Evaluation

dexisting)

of shapes

rules of the other shape. Therefore, after exchanging rules, the features of shapes are preserved in most cases. Examples of original and combined shapes are given in Fi,qrrr IS and Figuw 16 respectively. As shown in the example, the system can produce a I ariety of combined shapes with often exaggerated design features of the original shapes. After combination, features which are not apparent in the original shape sometimes become clear and in some cases appear at different parts of the shapes. For example, while shape 1 in the examples keeps the features of the original shapes very well. and simultaneously it creates an impression different from either of the original shapes. In shape 8. the feature on the right of the original shape appears at a different section of the new shape.

Target Shape

Specifying the shape feature in rules In addition to the previous experiments, further examination was performed to determine which rules actually hold the features of the shapes. Figure 17 shows the codes for the sets of rules and the shapes generated by them. The codes for the sets of rules (classifier in CS) are binary codes classitied by parts of the sphere. When the codes circled in the box are changed into “+” such as those on the left side of Figure 17. the generated shapes turn into shape on the left. On the other hand. if all codes are changed into ‘*’ except the codes circled in the box, the shape feature of the center shape (in ellipse) appears on the right sphere. This indicates that specific features of shape may be specified in the codes. However. this is not always possible because sometimes the feature of Figure

13

Evaluatwn

score

Combme

Crossover

J

1

Exe:hange

t Figure 14

34

Combination

t

of the truleh of cell chcisu)n

Figure 16

Combined

shape\

Applying

programming

to shape design: T Taura et a/.

rule finding algorithms based on the classifier system or other rule finding algorithms such as genetic programming. Applications based on this study will include work related to design feature recognition and reusable rule sets for specific design problems, and design support tools for spatial design, such as mechanical component layout and room layout in buildings, are being developed.

ACKNOWLEDGEMENTS The authors would like to thank the Research into Artifacts, Center for Engineering for the technical support of his research. The provision of DESIGNBASE by Ricoh Corporation is also greatly appreciated. Figure 17

Code of representations

REFERENCES the shape spreads over two or more parts of a shape which consists of a unit of codes.

CONCLUSIONS

AND FUTURE DIRECTIONS

With the aim of making the system capable of holding and manipulating design features after combining shapes to support the designer early in the design process, a new model for representing free form shape features called the shape feature generation process model (SFGP model) is proposed. In this model, developmental biology is applied to devise a computational model of the representation called the cell division model using the CS. Finally, a computer program was developed to evaluate the model by combining two existing shapes to verify whether specific features of the original shapes are preserved in the combined shape. It was demonstrated that the model can produce a variety of combined shapes with original, often exaggerated, features and the rules which hold features are specified. The advantage of this approach is that in most cases, it can hold specific features and also show a variety of alternative shapes after combining existing shapes. On the other hand, the constraints of the approach is that the cell division model has a limited capability for representing shapes, i.e. it cannot represent a shape such as a coffee cup with a hole because the coffee cup cannot be represented by a welltessellated surface. Additionally, it takes time to find the set of cell division rules. Future directions include implementing more efficient

1. Sodhi, R. and Turner, J.U., Towards modeling of assemblies for product design. Computer Aided Design,, 1994, 26(2), 85-97. 2. Akman, V.W., ten Hagen, P.J. and Tomiyama, T.. A fundamental and theoretical framework for an intelligent CAD system. CompucerAided Design,, 1990, 22(6), 352-367 3. Ludy, S. C. Dixon, J. R. and Simmons, M. K., Designing with features: Creating and using a features data base for evaluation of manufacturability of castings. ASME Computers in Engineering Conference, (1986) 285-292. 4. Anderl, R. and Mendgen, R., Modeling with constraint: theoretical foundation and application. Computer Aided Design,, 1996, 28(3), 155-168. 5. Feng, C. and Kusiak, A., Constraint-based design parts. Computer Aided Design,, 1995, 27(5), 343-352. 6. Nagasaka, I., Yamagishi, A., and Taura. T., 3D geometric model for shape design (2nd report). Journal of the Japan Society for Precision Engineering, 1997, 63(2), 193-197. I. Mortenson, M. E., Geometric Modeling, Wiley, New York, 1985. 8. Nagasaka, I., Yamagishi, A., and Taura, T., Methodology of emergent shapes for creative design. Proceedings of Third International RoundTable Conference on Computational Models of Creative Design, 1995, pp. 117-129. 9. Smith, J. M., Evolutionary Genetics, Oxford University Press, Oxford, 1989. IO. Pomerai, D. D., From Gene to Animal, Cambridge University Press, Cambridge, 1985. 11. Wolpert, L., The Triumph of the Embryo, Oxford University Press, Oxford, 1991. 12. Brown, C., Fast Display of well-tessellated surface. Computer and Graphics,, 1979, 4(2), 77-85. 13. Smith, S. F., A learning system based on genetic algorithms, PhD Dissertation, University of Pittsburgh, PA, 1980. 14. Goldberg, D. E., Genetic Algorithms in Search, Optimization and Machine Learning, Addison-Wesley, Reading, MA, 1989. 15. Holland, J. H., Adaptation in Natural and Artificial Systems, MIT Press, 1992. 16. Michalewicz, Z., Genetic Algorithms + Data Structure = Evolution Programs, Springer Verlag, New York, 1994.

35