singnet / asmoses

Port of MOSES (https://github.com/opencog/moses) for the AtomSpace (https://github.com/opencog/atomspace)
Other
6 stars 5 forks source link

Representation bugfix #125

Closed kasimebrahim closed 4 years ago

kasimebrahim commented 4 years ago

This bug raised from incorrect usage of an iterator while constructing representation. The fix will significantly increase the size of the representation. i:e

and($1 $2) 
#knobs in old rep = 19  #knobs in new rep = 22

or(and($1 $2) and($1 or($1 $2)) or($1 $2))                               
#knobs in old rep = 49  #knobs in new rep = 69

or(and(!$2 !$3 or($3 !$2) or(!$1 $3)) and($3 $2) and($3 $1) and($1 $2 or($3 $1)))
#knobs in old rep = 92  #knobs in new rep = 178

In order to work with the new rep[reach desired score in the specified number of evaluation] I had to change moses parameters on some UTests. In most cases --discard-dominated=1 seams to help a lot, for more complex problems increasing temperature[-v] is very helpful to avoid local optima. But @ngeiswei if you think these parameters compromise the validity of the unit tests I will be happy to fix them.

ngeiswei commented 4 years ago

Thanks @kasimebrahim that's quite an important fix!

Your parameters and the models look fine, from a cursory reading.

ngeiswei commented 4 years ago

Regarding diversityUTest, does it fail only on circleci? Or locally as well?

kasimebrahim commented 4 years ago

diversityUTest is failing locally as well, can you help me understand how the expected candidate programs are discovered? I mean like when we change the size of the representation or the value of any unrelated moses parameter we are going to get a different set of candidate programs in our metapopulation. So what are the criterias of this set of programs to pass the UTest?

ngeiswei commented 4 years ago

@kasimebrahim, I found the problem, I'm merging now and I'll create a subsequent PR with the fix and its explanation.

ngeiswei commented 4 years ago

The fix + explanation is here https://github.com/singnet/asmoses/pull/133