Hello,
I am in the need of creating "random primitives" (random functional), that is, functions that behaves randomly, such as
def add_random(x, y):
return x + y + some_value
but, some_value, would be something like an ephemeral constant: randomly generated every time the function is used when building a tree.
I thought about using classes with __call__ method defined, but they don't seem to work.
Of course, a kind-of possible solution would be to use STGP and pass some_value with a different type, so that only ephemeral constants of that type could be used, but I am just interested in knowing if is possible to do by creating custom operators, for example using classes or by wrapping functions in some way.
Thanks!
~Ale