Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

1 Introduction

In many situations in mathematics and theoretical computer science there is a need for special structures - algebras with elements, operations and axioms to be fulfilled. Even for finite structures it may be very hard task for a mathematician to design such operation definitions in order to satisfy complex properties.

The natural candidate for this purpose we can see in evolutionary techniques that are well-proved methods for tasks requiring enormous state-space searching [6, 7]. There is also a “fitness criterion” concerning fulfilment of several compulsory and optional axioms by any candidate structure. Therefore we tried to design, implement and test this approach which proved to be effective in contrast to standard state-space searching.

We have developed a software tool called EQCreator, which works on the principles of genetic algorithms and is able to produce EQ-algebras (truth value structures based on equality) in reasonable time. We also show results of preliminary experiments with various additional algebra operators and special axioms leading to promising EQ-algebras with interesting properties suitable for fuzzy logics.

The article outlines our experiments concerning properties of the evolutionary approach with the focus to the mutation rate and colourfulness of generated algebras.

2 Finite Algebras Automated Production

The problem we are solving can be formulated as follows. We would like to design and create finite algebras with specific properties:

  • n – number of algebra elements (finite)

  • Algebra operations declaration

  • Compulsory properties of operations (axioms)

  • Optional properties of operations (axioms)

  • Generate such algebra fulfilling requirements given by axioms

It is clear that even for very small algebras (low number of structure elements) the extent of state space is enormous and it forms unrealistic number of candidates. This superexponential complexity prevents us to use standard state-space searching algorithms and one of the natural possibilities focuses us into evolutionary techniques.

3 Genetic Algorithms

Genetic algorithms (GA) provide proved methods for automated design of optimal structures based on evolution inspired procedures [4, 5]. Despite its simple principle it is a challenge to find suitable settings of parameters and types of crossover and mutation. Among sporadic papers concerning particular application of GA for automated production of algebras there is an interesting paper [1]. Although it describes results and overall settings used for Genetic programming, it lacks details concerning used crossover and mutation algorithms. There is also very high level of mutation (in some cases above 50%!) that shows problems with convergence of the process. We followed another method which uses pure GA and we will also try to compare our results with [1]. But the reader should consider our approach and objective are different. Nevertheless some of our results conform to the cited ones.

Main characteristics of Genetic algorithms:

  • Population member (candidate solution), its fitness function (evaluates suitability)

  • Population – set of members, starting population (random)

  • New generation created from previous by selection, crossover and mutation

  • Generate new populations until stop condition is fulfilled (fix number of iterations – populations, predefined member fitness being optimal etc.)

Population and Population Member (GA)

  • Candidate solution p (Population Member/PM) represented by its properties (usually stored in “chromosomes” – bit array, integer array etc.)

  • Fitness function of candidate solution f, \(f(x) \in \langle 0, 1 \rangle \), x is PM – the keystone of time complexity of the task (possible parallelism)

  • Population – fix or variable number of PM: Population member (candidate solution), its fitness function (evaluates suitability), Population – sets of PMs, best PM, worst PM, median PM, Generation – sequence of populations called generations \(G_{0}, \dots , G_r\), where \(G_i = \{ p_{i,j} | i, j \in N \}\), i is generation index, j is PM index in population,

  • Starting Generation \(G_0\) is randomly (partially randomly) generated.

Genetic operators (GA)

  • Selection – simply into next generation or further processing: Elitist – usually best m PM from \(G_i\) is directly copied into \(G_{i+1}\), Selection for crossover (SC) – some PMs from \(G_i\) are selected for generation of new children for \(G_{i+1}\), SC should inhere probability of selection \(prob_{SC}(p)\) for PM p non-decreasing with respect to fitness function: \(f(p_1) \ge f(p_2) \Rightarrow prob_{SC}(p_1) \ge prob_{SC}(p_2) \).

  • Crossover – combination of several PMs to generate new PMs for next generation: Simple – two old PMs \(p_{old1}, p_{old2}\) generate two children, where first portion of chromosome is from \(p_{old1}\) and second from \(p_{old2}\) and contrary, Exponential – if we can distinguish several portions of chromosome we can generate more children than parents (every possible combination).

  • Mutation – randomly selected PMs from new generation are “altered”: Mutation rate – probability of selection PM for mutation, Point – single element of chromosome is altered, Interval – interval of chromosome elements are altered, Overall – whole chromosome is altered.

4 EQ-algebras

Our task was to generate specific algebras – EQ-algebras. EQ-algebras serve as truth value structure for EQ-logics [2], which form current studied fuzzy logics in the field of fuzzy logic research [3]. Instead of implication, their key operation is Fuzzy Equality. EQ-algebra has three basic operations in total: Infimum \(\wedge \), Multiplication \(\otimes \), Fuzzy Equality \(\sim \). There are also derived additional supporting (directly following) operations – Implication \(\rightarrow \), Negation \(\lnot \), and relational operator LessThanOrEqual \(\le \).

EQ-algebra \(\mathcal {E}\) is algebra of type (2, 2, 2, 0), i.e.

(1)
figure a

5 Specific Genetic Algorithms for EQ-algebras Design

In order to generate candidate EQ-algebras for further research we utilized GA under specific settings. Implementation is done by object oriented model of EQ-algebras as GA Population Members. GA Population (Generation) is implemented as list of PMs. Fitness function is based on relative fulfilment of mandatory and optional axioms. EQ-algebras fulfilling additional criteria are called Winners and they are stored during GA process. We have to note that very important issue is detection of previously generated (identical) candidates (removal). Random (starting) population is partially built to fulfil simple properties (e.g. infimum is commutative). Fitness evaluation has two phases:

  • Mandatory properties evaluation (e.g. boundedness axiom – \(a\otimes b\le a\sim b\))

  • Optional properties evaluation (e.g. goodness – )

In every generation we perform sorting of PMs in population through fitness. Termination condition is currently based on:

  • Fixed number of steps performed

  • Fixed number of EQ-algebras with required properties

  • Manual (user) termination

Algorithms are implemented in the form of PC application EQCreator – GUI based application for MS Windows 32-bit platform. Its main purpose is following:

  • Selection of various properties for candidate EQ-algebras

  • Evolution of algebras to attain EQ-algebras even with specific properties

  • Automated check of properties and generation

  • Saving of resulting optimal solutions in suitable form

Fig. 1.
figure 1

EQCreator and example EQ-algebra

It enables to set mainly – Algebra elements number – support size (2–28), Population limit – max. number of algebras in population, Generation steps – max. number of GA steps until one run stops (except stopped manually) (0 - unlimited) and Stopping after certain number of EQ-algebras found. The variability of GA is also assured by the possibility of setting basic GA properties:

  • Children ratio (0–100%) – crossover resulting new members relative count (how large portion of new population to be new children, others are old members copied from previous generation)

  • Cross ratio (0–100%) – portion of BEST members to have possibility to crossover (it is not crossover probability!)

  • Mutation ratio (0–100%) – probability for new population member to be mutated

  • Crossover probability is set arbitrary (fixed) – in descending ordered (by fitness) population of the size N we set probability of member i \(p_i = \frac{N-i}{\frac{N*(N+1)}{2}}\) for \(i = 0, \ldots , N - 1\), where \(f(i) \ge f(i+1)\) (fitness for members) e.g. for 5 members: \(p_0 = \frac{5}{15}, p_1 = \frac{4}{15}, ..., p_4 = \frac{1}{15}\)

  • weight of optional properties – relative weight of special EQ-algebras requirements (e.g. linear EQA, involutive EQA) – should be significantly less than for compulsory axioms (experimental best – 15%)

  • notion of colourfulness – required number of distinct elements in variable positions for operator function values (some combinations are determined e.g. \(a \wedge 0 = 0\) in every EQA)

  • colourfulness assures non-trivial EQ-algebras to be generated e.g. for fuzzy equality when 3 of 5 required - at least 3 different elements occur as functional values in non-determined cases

  • colourfulness experimentally needed for Multiplication (\(\otimes \)) and Fuzzy Equality (\(\sim \)) – higher means computationally harder! (Fig. 1)

6 Experimental Evaluation and Optimization

Even the above mentioned approach made the process of finite algebras generation possible, it is sensitive to proper settings of the genetic algorithm. The main problem discovered already in [1] is connected with the level of mutation ratio - probability (the probability of a new population member to be mutated). The high probability has been observed in the article and it is also our experience during preliminary experiments. As it is a keystone of the genetic algorithms together with suitable crossover implementations, we have been thoroughly experimenting with this parameter.

Fig. 2.
figure 2

Analysis of variance test on mean time - experiment 1

Fig. 3.
figure 3

Analysis of variance box plot - experiment 1

We have created special version of EQCreator software for experiments, in order to produce statistically appropriate samples to test the measurement results with statistical software NCSS.

6.1 Experiment No. 1

  • algebra elements \(n = 6\)

  • mutation rate from 10% to 45% step 5%

  • no special algebra constraints

  • colourfulness for multiplication (\(\otimes \)) at level 3 and for fuzzy equality (\(\sim \)) at level 3

  • Time (seconds) vs. mutation rate, 20 samples each 8 rates

Analysis of variance results

Analysis of variance for time vs. mutation rate shows no statistically significant differences (Fig. 2), but the plot of the means show interesting decrease in measured time with best results in 30–35% and then again worsening results with increase in mutation rate Figs. 3 and 4.

Fig. 4.
figure 4

Means of generations - experiment 1

Fig. 5.
figure 5

Fisher’s LSD multiple comparison test of generations - experiment 1

Fisher’s LSD Multiple-Comparison Test shows statistically significant (0,05) difference between level 35% and 25% (Fig. 5).

6.2 Experiment No. 2

  • algebra elements \(n = 6\)

  • colourfulness for fuzzy equality (\(\sim \)) from 2 to 5 step 1 (note that colourfulness for 6 elements has no meaning due algebra properties)

  • no special algebra constraints

  • mutation rate set at 30%

  • Time (seconds) vs. mutation rate, 20 samples each 4 rates

Fig. 6.
figure 6

Analysis of variance test on mean time - experiment 2

Fig. 7.
figure 7

Analysis of variance box plot - experiment 2

Analysis of variance results

Analysis of variance for time vs. colourfulness shows no statistically significant differences. There is natural increase in computed time due to increasing demands on colourfulness of fuzzy equality. Last value shows a slight decrease, but not statistically significant (Figs. 6, 7 and 8).

Fig. 8.
figure 8

Analysis of variance means plot - experiment 2

7 Conclusion

The experimental evaluation provided us with important results showing the importance of mutation rate and colourfulness. Although the mutation ratio has to be set unusually high in contrast to standard applications of genetic algorithms, it is significantly lower than in previous works of other authors [1]. There is statistically significant difference around 30% compared to other ratios computed. Furthermore we observed the differences between colourfulness levels are not statistically significant (despite its variable computational complexity). It enables us to produce more interesting and promising algebras without significantly affecting effectiveness of the evolutionary generation process.

We would like also work in future especially on constrained EQ-algebras since the evolution of these algebras is even more computationally hard task. There is also very interesting the usage of parallel computations, i.e. using of either multicore or multiprocessor computing or high performance vector EUs of graphic cards. The latter option nevertheless will require complex redefinitions and optimizations of algorithms.