> To be clear: given a formula with float-pt numbers in it, and float-pt
> functions, and booleans, and logical ops, how do add enums to the mix? what
> primitive would allow me to write formulas which mix enums with bools and
> floats? A case-statement? Some kind of inverse-of-a-case-statement? ...?
>
> New operators also mean new reduct rules, so this all increases code
> complexity in many different places. This is one reason why I'm so
> wishy-washy about it.
Indeed, specifically I see something like
1) equality between enum
enum_equal : enum * enum -> bool
2) enum conditional
enum_if : bool -> enum
would be enough (this is basically what you suggest, case-statement
and inverse-of-a-case-statement).
2 problems about the combo language as it is implemented
1) the type system doesn't have generic type, so we need to use
enum_if, instead of generic if, and enum_equal instead of generic
equal. Having a generic type would simplify the operator set (I don't
think it would have any impact, positive or negative, on learning, it
would just make stuff simpler).
2) The reduct engine operates on operators instead of algebraic
properties, if we had the latter then adding those operators would be
much less work.
> The other reason is that, as a learning task, its not
> obviously "easier to learn" or faster or more compact, than the
> simple-minded approach.
>
> In the end, its not clear that building in a enum primitive its any better
> than having a pre-processing step. Perhaps the correct design goal is to
> have a distinct pre-processing step?
If there are some overlap in computation between the classes, it seems
you would benefit from having a enum type (one learning instance)
rather than several learning instances, right?
Imagine your solution with enum is as followed:
f(x1, ..., xn) = if g(x1, ..., xn) then
enum1
else if h(x1, ..., xn)
then enum2
else enum3
I see 2 ways to translate that into the following 3 bool problems?
1)
is_enum1(x1, ..., xn) = g(x1, ..., xn)
is_enum2(x1, ..., xn) = h(x1, ..., xn) and not(g(x1, ..., x2))
is_enum3(x1, ..., xn) = not(h(x1, ..., xn)) and not(g(x1, ..., x2))
You see that's more expensive, you've got to relearn g and h multiple times.
2) Only 2 functions to learn
bit1(x1, ..., xn)
bit2(x1, ..., xn)
then you say that
enum1 = not(bit1) and not(bit2) // 00
enum2 = bit1 and not(bit2) // 01
enum3 = otherwise // 10 or 11
Then how must be bit1 and bit2?
Sorry I don't the time (or the brain power) to carry out that simple
boolean algebra, again I don't think you'd end up with something as
simple as the enum type solution.
Though you might ask, although the enum type solution is the shortest
one, now I've got boolean + enum vocabulary in the set of evolving
trees, is that extra vocabulary not gonna make learning harder to the
point that it's actually equivalent to learn different instances?
Again I think it's a matter of how much overlap there is in the
expression of the solutions without enum.
Nil
>
> --linas