opencog / moses

MOSES Machine Learning: Meta-Optimizing Semantic Evolutionary Search. See also AS-MOSES https://github.com/opencog/asmoses but kept to guaranty backward compatibility.
https://wiki.opencog.org/w/Meta-Optimizing_Semantic_Evolutionary_Search
Other
128 stars 84 forks source link

Improve uniformity penalty formula #88

Open ngeiswei opened 5 years ago

ngeiswei commented 5 years ago

The uniformity penalty formula can probably be improved. This can be seen by looking at the log of resulting from running diversityUTest::test_diversity_5_parity_no_autoscale(). At the end of the first iteration, the best 2 candidates are true and false. However false already has a small uniformity penalty, which doesn't make much sense since its behavioral score is at maximum distance from the behavioral score of true, ideally it should be null.

chamorajg commented 5 years ago

Can I work on this issue ? I am new to the organisation. I would like to contribute to this code.

linas commented 5 years ago

Of course you can work on this issue! Moses is a relatively complex system, so as a newcomer, you will find it challenging to learn the system... moses is a genetic programming system, and like any kind of genetic system, it uses evolutionary algorithms to find good solutions to problems. The trick is how to speed up, improve convergence, and one very interesting possibility to artificially force as diverse a population as possible, so that the solution space is searched with less waste.

We do not yet have any good way of measuring "diversity", or even defining what it is. One key concept is of "ultrametrics" and an understanding that ecological niches resemble "spin glasses" (or rather, the ultrametricity of spin glasses).

ngeiswei commented 5 years ago

Thanks for your interest, @chandramoulirajagopalan, you will likely find the following document useful https://github.com/opencog/moses/blob/master/moses/moses/documentation/diversity_report_v0.3_disclosable.pdf

The issue here could be a bug or something deeper, to be investigated.

chamorajg commented 5 years ago

thanks @ngeiswei for your help. I will work on this and if I have any doubts I shall ask. I just went through the MOSES algorithm and it's usage. So I am just going through the source code to have a good idea how things are implemented. I need constant help from you guys to solve this. Thanks for your help though.

chamorajg commented 5 years ago

So we have to update the uniformity_penalty_formula in moses/moses/metapopulation/diversity.cc right ? The penalty score must be updated to a better higher score so the behavioral score is near to null (ideally should be null).

ngeiswei commented 5 years ago

Correct @chandramoulirajagopalan, so first of all you should try to explain the math that is going on in that instance diversityUTest::test_diversity_5_parity_no_autoscale(), then explain it to us here, so we'll be able to understand if it's a bug, something that can be improved, or something normal.

chamorajg commented 5 years ago

@ngeiswei When I execute diversityUTest::test_diversity_5_parity_no_autoscale() test the behavioural score is showing null value. There is no 0 or any integer shown against it whereas uniformity_penalty, score, complexity_score and complexity_score is shown.

chamorajg commented 5 years ago

Can I know the fitness cases for the 5 parity diversity no autoscale ? Is it odd or even parity test ? https://github.com/opencog/moses/blob/master/moses/moses/documentation/diversity_report_v0.3_disclosable.pdf If I can have more sources about the test I can start evaluating the scores mathematically and then verify them.

ngeiswei commented 5 years ago

@chandramoulirajagopalan, it is even parity, as described in moses --help (grep its output with parity).