Friday, 10 February 2023

About chatGPT

These days the talk of the town is ChatGPT and its potential uses. It really is a great tool and it impressed me, and everybody else, with the way it responds to simple language questions.
Of course it has some flaws. There is some criticism about its math capabilities or the accuracy of some information it provides, like historical dates and paper citations. But this doesn't really bother me; if I wanted math calculations I would use a calculator and for dates and historical events I would prefer Wikipedia. There are more fundamental concerns about the use of chatGPT, especially about its potential use in research as many people claim (or fear) that generative AI could replace original research. Well, not yet.
The current model of chatGPT doesn't have critical "thinking" and has troubles on reasoning and induction. I asked it some questions about how certain AI methods could be combined on an innovative way, like genetic algorithms and unsupervised learning. As there are no references of such combinations, chatGPT discouraged this idea. I would expect an answer that would reason for or against this idea based on the features of these two methods.
Then I thought of asking a stupid and easy question, but it still failed. The question was why my favourite football team cannot win Champions League. The obvious question is that it is a weak team and cannot face the competition. But the model responded that it's just a language model and cannot answer. I had to guide it through some more questions to make it answer correctly.
The cause for these weaknesses must be the architecture of the model. Probably more interconnections among the layers of the model will improve its ability to reason and combine previous knowledge. But this is more of future goal, currently it cannot replace original research and we should probably cross check its quite interesting answers.

Tuesday, 1 November 2022

Java programming is environmental friendly

I recently came across this paper, which provides experimental evidence that show that programming with different languages has different environmental footprint. It is reasonable to say that this is true, although I really believe that no one has every consider this while programming. 
The good news is that I don't have to give up my Java habits, as Java has a good environmental footprint. Also I can find in this study one more excuse to avoid Python, it has a bad environmental footprint.
Of course Python is great but old habits die hard.

Friday, 26 August 2022

On the order of executing genetic procedures

The classical approach on genetic algorithm design is to generate an initial population and then in every generation to execute Selection, Crossover and then Mutation; in that particular order. I often place Selection last, after Crossover and Mutation. There are pretty good reasons for following any of the two approaches and the answer to the question of which forms the best strategy is as usually case dependant.

By placing Selection first in order, you actually make a cleaning of the population from weak solutions and then go on with the rest of the procedures. If the population contains lots of invalid or bad solutions without any hope that they will generate a good solution via Crossover or Mutation then this strategy is profitable. But in case the initial population covers a small part of the solution space then starting with Selection limits the possibilities of reaching a goal solution.

Placing Selection last enables the search of a larger part of the solution space and finally choose the best of them. Especially on NP-hard problems where the solution space is large, this strategy enables first the exploration of a wide part of the space and then the cleanup which is a more fruitful strategy.






Tuesday, 21 December 2021

Edge Vector representation

Edge Vector representation is a novel method of representing graphs. It was introduced recently in the paper that I presented in ISCC ’21; also available here. The advantage of this representation is the requirement in memory usage which is minimum, in comparison to competition. Also, encoding a graph in Edge Vector or decoding the graph elements from the representation is efficient with polynomial complexity.

The open source code of the implementation of the method used in the paper may be found in my GtiHUB repository

https://rodispantelis.github.io/EdgeVector/

I believe you will find it useful.

Sunday, 3 October 2021

Designing Genetic Algorithms

Recently I presented a conference paper in ISCC 2021, it is on the Service Function Chain Embedding problem; find it in IEEEexplore or here. The problem is handled efficiently using a genetic algorithm. Here are a few empirical remarks about how to design efficient and effective GAs which I gained from working on this paper.
The issue with designing GAs is that their operation is not sufficiently explained and the efficiency of any GA design is case dependent. Any innovation applied on a GA implementation may work well on a problem and fail on many others.


At first there is the population generation. The objective of a GA is to approximate the goal solution of a problem among all the possible solutions in the solution space of the problem. So, from the members of the population we have to be able to generate the goal solution by applying the genetic procedures on the population. Then the initial population will have to be directed to the part of the solution space that contains the goal and for this reason we have examine whether it is more efficient to generate the population heuristically instead of a randomized generation which is the common practice.


Preserving original chromosomes and best solutions. The procedures of crossover and mutation were originally designed so as to affect the members of the initial population. During crossover, the parent chromosomes generate offspring that may replace them in the population. Also during mutation the genotype of a chromosome is affected and this results the replacement of the original solution that the chromosome represents by a new solution that the mutated chromosome represents. Moreover, the randomized operations of the GA may reject or replace a good solution.
Having these in mind, my proposition is to preserve the best solution generated during a generation regardless of how the new population will be formed. Also the generation of new offspring and new mutated chromosomes should not replace the previous ones. Add the new chromosomes in the population along with the older ones and let the selection procedure decide which will survive in the next generation.


Premature convergence.
There are many reasons for the premature convergence of the population in an undesirable solution. One technique of limiting this phenomenon and achieving a more stable behavior for the algorithm is the multiple execution of the algorithm and the further procedure of all the outputs.  The outputted solutions from all the executions maybe combined so as to generate a probably better solution (this was my approach) or you may just pick the best one for the final output.


Parameter tuning. GAs are multiparametric algorithms and the values of these parameters determine their performance; the parameters are the number of generations, population size, crossover and mutation probabilities. There are two ways to determine the best valuations for these parameters. Either by extensive experimentation or by using an optimization procedure like the one described in my earlier post.