iCog-Labs-Dev / metta-moses

Meta Optimization Semantic Evolutionary Search
3 stars 14 forks source link

Added the functions orSubTreeIterator and andSubTreeIterator #63

Closed Liya-F closed 2 months ago

Liya-F commented 2 months ago
Yagth commented 2 months ago

@EyobAshenaki Those functions are being implemented by other people, we can test them until they are done. What do you think is better? Should we merge the codes and test them later or should we wait until all of them are done and do the test then merge them?

EyobAshenaki commented 2 months ago

The latter case seems like the best choice. It would save us from a headache later on.

Yagth commented 2 months ago

@EyobAshenaki But we would still face the same problem letter on because of the interdependence between the functions. For instance, the orSubTreeElegance needs to call the reduceToElegance algorithm which can't be complete without the orSubTreeElegance itself. What if we could replace the function calls with the appropriate return type of the function stored on a variable, instead of calling the functions we put a mock data on a variable and test whether the function works or not?

EyobAshenaki commented 2 months ago

I think that's an acceptable compromise time wise.

Yagth commented 2 months ago

@EyobAshenaki But we would still face the same problem letter on because of the interdependence between the functions. For instance, the orSubTreeElegance needs to call the reduceToElegance algorithm which can't be complete without the orSubTreeElegance itself. What if we could replace the function calls with the appropriate return type of the function stored on a variable, instead of calling the functions we put a mock data on a variable and test whether the function works or not?

@Liya-F can you make sure to use a mock data instead of calling the functions that aren't implemented yet? Refactor the code this way, write few test cases and update your PR.

Liya-F commented 2 months ago
Liya-F commented 2 months ago

fix the type definition for the implemented functions

I have fixed the type definition for both functions.