ITAT 2013 Proceedings, CEUR Workshop Proceedings Vol. 1003, pp. 24–28 http://ceur-ws.org/Vol-1003, Series ISSN 1613-0073, c 2013 M. Kuzma Improving the Estimation of a Font Face Attributes According to User Preferences Miron Kuzma Institute of Computer Science, Pavol Jozef Šafárik University in Košice, Jesenná 5, 04001, Košice, miron.kuzma@student.upjs.sk, WWW home page: http://ics.upjs.sk Abstract: Every day in our life we can discover a lot of There exists some proposals of human user fatigue reduc- optimization problems. By exploring them more deeply tion (accelerating convergence of evolution by Wang [27] we can reveal their fundamentals and think about their so- and also some general approach methods reviewed by Pei lution. [17]. We chose the human values theory by Schwartz and The problem of the most attractive font face for the connected it with fuzzy set theory and improved the previ- writer is such a problem. The optimization function of this ous version of the algorithm problem is unknown. Beside other methods also interac- We describe the problem of the most attractive font face tive evolutionary computation could be used to solve such for the writer which we deal with in our research in vari- type of optimization problems. If we utilize interactive ous stages [8, 9, 10, 11]. We describe in short the theory evolutionary computation to find solution we encounter of human values, then we describe the algorithm that in- the user fatigue problem. To eliminate this disadvantage corporates the theory of human values and fuzzy sets. We we need to accelerate the convergence of the evolutionary also describe the modification of the algorithm in order to computation part. include the learning ability in some important steps of the In this article we propose an algorithm that tries to find algorithm. a candidate solution to the most attractive font face based on input data. We assume that user likes his handwrit- ing properties which is a subject of research for graphol- 2 The Problem of the Most Attractive Font ogy. These handwriting properties will project into prop- Face erties or attributes of the font face. The algorithm tries to connect Schwartz’s culture model with observations and We have dealt with the problem of the most attractive font theoretical knowledge from graphology. It maps the com- face in our past research and also in recent, where we dis- puter font attributes to Schwartz’s culture model using the cuss the question of accelerating the convergence of the revealed knowledge from graphology about handwriting. interactive evolutionary computation in order to reduce the We modified our existing algorithm proposal and we in- human user fatigue. cluded a learning phase of fuzzy membership function to We have one type of font which face is described with match a case when user preferences are different from the a finite set of parameters. The domain of each of the pa- theory found in graphology. The algorithm is a theoretical rameters can be either a finite set of values or interval. The proposal to the user fatigue problem in interactive evolu- task is to set the values for these parameters. By applying tionary computation. values of these parameters to a given font the user should get a font face that is the most attractive for him. 1 Introduction To describe the font face we used the Metafont language [13]. The font parameters are equations and we can change We encounter many optimization problems for which we just one parameter value in one place and by applying this do not know their optimization function. In such cases one change we can obtain consistent change in the whole font need to find such methods that can replace explicit expres- face of the Computer Modern font. sion of optimization function with other resources. Some- The configuration file of the font contains 62 parame- times we can include human user attributes as user can ters. We have experimentally chosen 25 parameters that determine the optimal value according to his criteria. The have the largest impact on the final font face look (or 21 interactive evolutionary computation [3, 5, 6, 7, 15, 16] parameters, if we consider that the parameters are the same has its broad application potential in computer graphics, for upper case and lower case characters). tuning the hearing aid system, music, various industry So we have the configuration file of the font which has applications, speech and image processing, data mining, a parameter vector ~p with dimension of 62. Each of the art, therapy, robotics and control, architecture, design, vir- vector components is a value of one parameter and is equal tual reality, but also in other fields of human activities to 0 if the parameter is one from the set of our chosen [24, 25, 26]. The main problem by using interactive evo- parameters. The modification vector 4~p is also a vector of lutionary computation is the human user fatigue problem. dimension 62 and his components are values of parameters Improving the Estimation of Font Face Attributes 25 4.1 The Common Features of Human Values Table 1: The table of chosen font parameters and their val- ues. Parameters time, P1 – P13 are integers, P14 – P17 are If we think about our values, we think what is important real, P18 – P21 are boolean. for us in our life. Everyone has or can have other values (e.g. achievement, security, benevolence) with other de- lower upper lower upper gree of importance. One value can be very important for Pi limit limit Pi limit limit one person but very unimportant for other. The theory of values [18, 20] is based on a concept of values, that is de- P1 0 100 P12 0 100 scribed by six main features that are implicitly included in P2 0 100 P13 0 100 papers of many theoretics: P3 0 100 P14 0 0,5 P4 0 80 P15 0 1,5 1. Values are believes linked to affect. P5 1 10 P16 0 1,0 2. Values refer to desirable goals that motivate action. P6 0 80 P17 0 0,7 P7 0 60 P18 False True 3. Values transcend specific actions and situations. P8 0 60 P19 False True P9 0 100 P20 False True 4. Values serve as standards or criteria. P10 0 30 P21 False True 5. Values are ordered by importance to each other. P11 0 100 time 0 indiv. 6. The relative importance of multiple values guides the actions. The above mentioned are features of all values. What distinguishes one value from another is the type of goal that we use for the font modification. These components or motivation that the value expresses. The values theory equal 0 that we did not chose. The new vector ~y of all defines ten broad values according to the motivation that parameter values we obtain if we perform vector addition underlies each of them. Presumably, these values encom- of ~p and 4~p: pass the range of motivationally distinct values recognized across cultures. According to the theory, these values are ~y = 4~p +~p (1) likely to be universal because they are grounded in one or more of three universal requirements of human exis- tence with which they help to cope. These requirements 3 From Theoretical Problem to Application are: needs of individuals as biological organisms, requi- sites of coordinated social interaction, and survival and According to the definition of the optimization problem welfare needs of groups [21]. [12] there should exist optimization function f . This func- Individuals cannot cope successfully with these require- tion should assign a real number to each of the vectors ~y. ments of human existence on their own. Rather, people We can state that "the most attractive font face" could have must articulate appropriate goals to cope with them, com- different look for different users. We can also observe the municate with others about them, and gain cooperation in expression of the optimization function f is missing. their pursuit. Values are the socially desirable concepts We have implemented and interactive evolutionary used to represent these goals mentally and the vocabulary computation methods into our application that is trying to used to express them in social interaction. From an evo- solve the problem of the most attractive font face [8]. The lutionary point of view these goals and the values that ex- application run-time is iterative process where in each iter- press them have crucial survival significance [21]. ation 12 font samples (one generation) are presented to the user and user has to evaluate the proposed font samples. 4.2 Human Values After a lot of iterations the user can get tired and we face the problem of the user fatigue. Here arises the challenge Each from the ten human values 1 expresses a wide set of to improve the raw interactive evolutionary computation, goals. We also know them as a culture model. Values are e.g. to accelerate convergence or to create some smart way based on universal needs and they refer to similar concepts a convenient starting generation of font samples. of values. Furthermore the values are organized by moti- vational similarities and oppositions. They form four main groups: 4 The Theory of Human Values • Openness to change We chose the theory of human values from Schwartz [18] • Self-Transcendence because the theory describes each human as an individual • Conservation carrying each of these values ordered by some custom pri- ority that makes every human unique. • Self-Enhancement 26 M. Kuzma Openness Self- Self- tozChange Direction Universalism Transcendence Creativity, SocialWJustice, Freedom Equality Stimulation ExcitingWLife Benevolence Helpfulness Hedonism Pleasure Conformity Tradition Obedience Humility Devoutness Achievement Success, Ambition Security Power SocialWOrder Conservation Self- Authority, Wealth Enhancement Organizedzbyzmotivational similaritieszandzoppositions Figure 1: The Schwartz’s culture model of basic human values, image borrowed from [21]. 5 The Road from Human Values to Font tributes and attributes of given font that is going to be mod- Attributes ified. We can see in table 2 the occurrence of the font at- tributes by particular human values from Schwartz’s cul- In order to assign each human value their characteris- ture model. This model was tested in an European Social tic font attribute values we need to search through re- Survey where respondents were had to answer the ques- sources of graphology and find a connection between hu- tions for particular human values giving each of the values man values and font attributes. We research the first level some priority (from -1 which means it is against my value of the basic human values. In the literature we studied to 7 which means I agree). [1, 2, 4, 14, 22, 23] we are able to find the proposed hu- man values in connection to font attributes, although we 6 The Improved Algorithm of Font need to be correct and use word handwriting instead of Attribute Estimation font, but we assume that user likes his own handwriting which projects ones preferences also to the font attributes. If we assume the mapping from table 2 we can propose an If our assumption is true then we can apply the knowledge algorithm for estimating the font face attributes following from graphology to our most attractive font face problem. way: Furthermore if these assumptions are correct we could ac- At the beginning we assume that fuzzy membership celerate the convergence of the evolutionary computation function µ pi of attribute i which has a domain in < giving it a smart starting generation mini , maxi > will be given by linear function f that We consider these basic font attributes: slant (S), pres- f (mini ) = 0 a f (maxi ) = 1. We initialize at the beginning sure (thickness T), spaces between characters (SPC), pro- a set of small feed forward neural networks which learn portional size of middle part of font (MS), proportional this linear fuzzy membership functions for every attribute size of upper part of font (BS), proportional size of lower (even the simplest neural network – perceptron can learn part of font (LS), character width (SP), the shape and this 2-D linear function). Our network in comparison to width of loops (TS). We try to connect these attributes with the perceptron should have three layers: input, hidden and our culture model and corresponding human values: self- output layer with topology e.g. 1–5–1 in order to learn direction (HSE), stimulation (HST), hedonism (HED), more complex functions. We also assume we obtain the achievement (HAC), power (HPO), security (HBE), con- basic human values j from the model for each user ac- formity (HCF), tradition (HTR), benevolence (HBN), uni- cording to his preferred weighted priority w j (e.g.: w j is versalism (HUN). recommened by [21] from -1 which means it is against my Each font in Metafont language has a different form values to 7 which means I agree). Then we begin with the of configuration (various equations), so does our chosen algorithm itself: font according to table 1. In order to use this connec- tion between human values and general font attributes we 1. For every font attribute i we select values j that need to make another mapping between these general at- influence the attribute and for every combination Improving the Estimation of Font Face Attributes 27 4. Optionally in interactive evolutionary computation in Table 2: Mapping of human values and font attributes each iteration we can introduce some form of learn- according resources from graphology and culture model. ing for each of the fuzzy membership functions µ pi Legend: L - left, P - right, R - straight, S - small, M to express them also as non-linear functions. Be- - middle, B - big; font attributes in first row: slant (S), tween the iterations in the application we can teach pressure(thickness T), spaces between characters (SPC), our neural network that has learned linear functions proportional size of middle part of font (MS), propor- µ pi . For the teaching we use those values of font at- tional size of upper part of font (BS), proportional size of tributes that has user evaluated as very good (they will lower part of font (LS), character width (SP), the shape have higher fuzzy membership function value). That and width of loops (TS). The culture model legend: self- way we could catch individual features of user that direction (HSE), stimulation (HST), hedonism (HED), can lead to accelerated candidate space search of the achievement (HAC), power (HPO), security (HBE), con- problem of the most attractive font face. formity (HCF), tradition (HTR), benevolence (HBN), uni- versalism (HUN). 7 Conclusion S T SPC MS BS LS SP TS HBE B We proposed a theoretical improved algorithm for font at- HBN S B B tributes estimation for our problem of the most attractive HED S B S font face. We used only the first level human values from HPO P B the Schwartz’s culture model, but every value can be fur- HCF S ther expanded to more sub-values. This way we could ob- HSE L B B S tain more complex model of the human user which could HST S S S lead to more precise estimation of font attributes so that HTR S the convergence of the evolutionary computation can be HUN R accelerated and user fatigue can be reduced. As an im- HAC S M B provement of the algorithm we introduced the neural net- work that can learn individual preferences between itera- tions that breaks the limit of expressing each fuzzy mem- bership function with a linear formula or any other pre- defined formula. The next step will be to implement the attribute–value we create a fuzzy membership func- algorithm and perform experiments on real data collection. tion µhk from the mapping in table 2, e.g. for attribute Afterwards we will be able to verify the method and deter- slant where we have terms left, right, straight, we mine the validity of the proposed method. select values from the table: HSE, HPO, HUN. For pairs left-HSE (µh1 ), right-HPO (µh2 ) a straight-HUN (µh3 ) we assign a fuzzy membership function µhk by Acknowledgement expressions e.g.: This work was partially supported by the grant – 1/0479/12 x+1 VEGA – Combinatorial structures and complexity of algo- µh1 = (2) rithms by the Slovak Research and Development Agency. 16 x+1 1 µh2 = + (3) 16 2 References 1 µh3 = (4) [1] Barrett, David V. aut. Grafológia. / 1. vyd. Bratislava: Ikar, 2 vydavatel’stvo a.s., 1997 Nestr. 2. We use aggregation operator (weighted average) to [2] Fischerová-Katzerová, Vlad’ka, 1964 . Grafologie / 2., dopl. calculate a value µ pi as an average from µhk , we use vyd. Praha: Grada, 2009. 227 s. the priority values as weights w j , but we need to nor- [3] Gajdoš M., Reduction of Human Fatigue in IEC with Neural malize them so that the sum will be: ∑w = 1. Networks for Graphic Banner Design, In: Master’s Thesis, Košice, Technical University of Košice, Faculty of Electri- 3. For every font attribute i we find an inverse image of cal Engineering and Informatics, Department of Cybernetics an image of fuzzy membership function µ pi and we and Artificial Intelligence, 2006. obtain value - an estimation of font attribute values [4] Jablonský, Eduard, 1946 aut. Príručka interpretácie grafo- of our modified font. These font attributes will deter- logických znakov / 1. vyd. Žilina: Žilinská univerzita, 2005 mine the look of the fonts in starting sample. 268 s. ; 28 M. Kuzma [5] Jakša R., Takagi H., Nakano S., Image Filter Design with [20] Schwartz S. H. (2005). Basic human values: Their content Interactive Evolutionary Computation, In: Proc. of the and structure across countries. In A. Tamayo J. B. Porto IEEE International Conference on Computational Cybernet- (Eds.), Valores e comportamento nas organizaçoes [Values ics (ICCC2003), ISBN 963 7154 175, Siofok, Hungary, Au- and behavior in organizations] pp. 21-55. Petrópolis, Brazil: gust 29-31, 2003. Vozes. [6] R. Jakša, H. Tagaki: Tuning of Image Parameters by Inter- [21] Schwartz S. H. (2006). Value orientations: Measurement, active Evolutionary Computation, In: Proc. of 2003 IEEE antecedents and consequences across nations. In Jowell, R., International Conference on Systems, Man Cybernetics Roberts, C., Fitzgerald, R. Eva, G. (Eds.) Measuring atti- (SMC2003), Washington D.C., (October 5-8, 2003) pp.492- tudes cross-nationally - lessons from the European Social 497 Survey. London: Sage. 3 [7] Kováč J., Image Database Search Using Self-Organizing [22] Stritz, František aut. Grafologické praktiká: Grafológia pre Maps and Multi-scale Representation, In: Master’s Thesis, každého. / 1. vyd. Nitra: Garmond, Nitra, 2000 184 s. Košice, Technical University of Košice, Faculty of Electri- [23] Stritz, František, 1937-2000. Grafológia pre každého: vyše cal Engineering and Informatics, Department of Cybernetics 200 ukážok rukopisov, podpisy slávnych osobností, 9 po- and Artificial Intelligence, 2007. drobných grafologických rozborov / 3. vyd. Nitra: Enigma, [8] Kuzma M., Interactive Evolution of Fonts, master thesis, 2010. 217 s. Technical University of Košice, 2008. [24] Takagi H. , Interactive Evolutionary Computation: System [9] Kuzma M., Jakša R., and Sinčák P., Computational Intelli- Optimization Based on Human Subjective Evaluation, IEEE gence in Font Design, Computational Intelligence and Infor- International Conference on Intelligent Engineering Systems matics: Proceedings of the 9th International Symposium of (INES’98), Vienna, Austria, pp.1-6 (Sept. 17-19, 1998) Hungarian Researchers, Budapest, November 2008, pp.193- [25] Takagi H. , Interactive Evolutionary Computation: Fusion 203. of the Capabilities of EC Optimization and Human Evalua- [10] Kuzma M., Andrejková G. , Interactive Evolutionary Com- tion, Proceedings of the IEEE, Vol.89, No.9, pp.1275-1296 putation in Optimization Problem Solving, Cognition and (2001) Artificial Life XII, Vol. XII, pp 120-125, Praha, 2012. [26] Takagi H. : Interactive Evolutionary Computing: Fusion of [11] Kuzma M., Estimating Font Face Attributes According to the Capacities of EC Optimization and Human Evaluation, User Preferences, Cognition and Artificial Life XIII, Vol. In: Proc. of 7th Workshop on Evaluation of Heart and Mind, XIII, pp 148-152, Stará Lesná, 2013. Kita Kyushu, Fukuoka, (November 8-9, 2002)(in Japanese) [12] Kvasnička V., Pospíchal J. a Tiňo P.: Evolučné algoritmy, pp.37-58 STU Bratislava, 6-7 (2000) [27] Wang S., Takagi H. , Improving the Performance of Pre- [13] Metafont Tutorial, dicting Users’ Subjective Evaluation Characteristics to Re- In: http://metafont.tutorial.free.fr/downloads/mftut.pdf, on- duce Their Fatigue in IEC, Journal of Physiological Anthro- line zdroj. (May 8, 2008) pology and Applied Human Science, Vol. 24, No.1, pp. 81- [14] Mistrík, Jozef, 1921-2000 aut. Grafológia: synkritická 85 (2005). analýza v modernej grafológii / 1. vyd. Bratislava: Obzor, 1982. 199 s. [15] Neupauer M., Analysis of Medical Data using Interac- tive Evolutionary Computation, In: Master’s Thesis, Košice, Technical University of Košice, Faculty of Electrical Engi- neering and Informatics, Department of Cybernetics and Ar- tificial Intelligence, 2006. [16] Pangrác L’., Interactive Evolutionary Computation for Satellite Image Processing, In: Master’s Thesis, Košice, Technical University of Košice, Faculty of Electrical Engi- neering and Informatics, Department of Cybernetics and Ar- tificial Intelligence, 2007. [17] Pei Y., Takagi H., A Survey on Accelerating Evolutionary Computation Approaches, 2nd International Conference of Soft Computing and Pattern Recognition (SoCPaR 2011), Dalian, China, pp.201-206 (Oct. 14-16, 2011). [18] Schwartz S. H. (1992). Universals in the content and struc- ture of values: Theory and empirical tests in 20 countries. In M. Zanna (Ed.), Advances in experimental social psychol- ogy (Vol. 25)(pp. 1-65). New York: Academic Press. [19] Schwartz S.H. (1996). Value priorities and behavior: Ap- plying a theory of integrated value systems. In C. Seligman, J.M. Olson, S.P. Zanna (Eds.), The psychology of values: The Ontario Symposium, Vol. 8 (pp.1-24). Hillsdale, NJ: Erlbaum.