Author Topic: Iwas cleaning my room and dug up something interesting I was working on way back  (Read 4387 times)

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
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?

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
(The idea was to get rid of the boolean stack completely and use  two value pairs instead of the boolean stack...)

Offline SlyStalker

  • Bot Destroyer
  • ***
  • Posts: 132
  • nomnomnomnom
    • View Profile
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
Knowledge is knowing that a tomato is a fruit; Wisdom is not putting it in a fruit salad.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
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.