Author Topic: dupbool  (Read 7775 times)

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
dupbool
« Reply #15 on: December 05, 2007, 04:49:25 PM »
You can do it for the integer stack this way I think.

swapint dupint 55 store swapint *55

This works because we have temporary places to store integers.  So if we use a mem location to store boolean values:


swapbool dupbool
1 55 store
dropbool
swapbool
*55 1 =

Then I think this works in gene bodies at least...
« Last Edit: December 05, 2007, 04:50:15 PM by EricL »
Many beers....

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
dupbool
« Reply #16 on: December 05, 2007, 04:56:40 PM »
swapbool
1 55 store
swapbool
*55 1 =

even shorter...
Many beers....

Offline Gobo

  • Bot Builder
  • **
  • Posts: 67
    • View Profile
dupbool
« Reply #17 on: December 05, 2007, 05:28:03 PM »
Sure, you can do that with memory allocation. You can even do swapint with memory. But that takes energy.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
dupbool
« Reply #18 on: December 05, 2007, 05:35:11 PM »
I'm really on the fence on this.  On the one hand, it's a nice operator in that it operates on just the top two values on the stack-- meaning it's a binary operator.  It easily fits in with other commands like swap, etc.

On the other hand, it provides some really weird possibilities for nonsensical DNA.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
dupbool
« Reply #19 on: December 05, 2007, 05:41:19 PM »
I vote for it.  A user is requesting it.  It's rational.  It's easy to implement.  Sanger can use it.  Hand coded bots too.  It provides a one step way to evolve a potentially useful operation that otherwise takes at least 8 base pairs.  And we are well beyond the point IMHO of worrying departing from a RISC approach to DNA oeprators....  

So, unless there are strong objections...
Many beers....

Offline Gobo

  • Bot Builder
  • **
  • Posts: 67
    • View Profile
dupbool
« Reply #20 on: December 05, 2007, 05:41:30 PM »
Quote from: Numsgil
On the other hand, it provides some really weird possibilities for nonsensical DNA.
Examples?
P. S. Methinks nonsensical DNA is already provided with not less really weird possibilities
« Last Edit: December 05, 2007, 05:46:59 PM by Gobo »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
dupbool
« Reply #21 on: December 05, 2007, 05:50:35 PM »
I don't have any good examples.  Ignore the crazy old neophobic man   It's easily rationalized if you extend the thinking of the stack as an "on board" value with one "at bat".  Or in other words, it's just an extension of dup.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
dupbool
« Reply #22 on: December 05, 2007, 07:04:05 PM »
overint
overbool

added in 2.43v.
Many beers....

Offline Sprotiel

  • Bot Destroyer
  • ***
  • Posts: 135
    • View Profile
dupbool
« Reply #23 on: December 05, 2007, 07:19:21 PM »
I'd really prefer all XXint commands to be named simply XX. It seems to me that by default commands operate on the integer stack, there's no need to overspecify.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
dupbool
« Reply #24 on: December 05, 2007, 07:29:49 PM »
Quote from: Sprotiel
I'd really prefer all XXint commands to be named simply XX. It seems to me that by default commands operate on the integer stack, there's no need to overspecify.
Fine.  I added synonyms for all of them.  over and overint et. al. are now equivalent in DNA files.  Retokinized DNA (like that displayed in the bot properties dialog) uses the short version.
Many beers....