Darwinbots Forum
General => Off Topic => Topic started by: Botsareus on July 10, 2012, 07:25:40 PM
-
The idea was to have only one conditional operator greater then">" and a bunch of special operators modding the two input values to emulate other conditional operators "<" "=<" ">=" "=" and "!=". The special operators where as follows:
Given that the two values are "a" and "b"
Operator "not"
flips a <---> b a = b and b = a
Operator "=++"
If a is equal to b Then add one to a
Operator "falsify"
If a is greater then b then flips a <---> b a = b and b = a
To emulate less then "<" will be:
a b not
To emulate greater then or equals ">=" will be:
a b =++
To emulate less then or equals "=<" will be:
a b not =++
To emulate "=" will be:
a b falsify =++
And to emulate "!=" will be:
a b falsify =++ not
comments?
-
(The idea was to get rid of the boolean stack completely and use two value pairs instead of the boolean stack...)
-
interesting, but i think people would find it easier to pick up and understand DB programming if we still used the standard boolean/logic operators
-
I am not saying I want to implement this in DB. I am just saying it may be (although less readable) more efficient. Next time I write my own genetic programming algo., there is a good chance that I am using this one because my last attempt to merge action in Neural Networks with genetic programming failed miserably.