Author Topic: 1G hardcoded operators  (Read 2647 times)

Offline MacadamiaNuts

  • Bot Destroyer
  • ***
  • Posts: 273
    • View Profile
1G hardcoded operators
« on: August 06, 2007, 11:58:22 PM »
Hi, long time.  

I think it would help a lot the 1G school coders if we got some 1G style procedures hardcoded into macro operators. We could list some of our favourite operations to be included in next releases. This wouldn't break old bots, neither should be too complex to code, and if included in mutations would add up for interesting results. I really think evobots would love those operators.

In the long run, maybe even the logical stack and all old-school conditional coding could be deprecated for 1G macro coding. In the end, structured code doesn't seem to fit at all with evobots, and reading code for two different stacks is confusing. I bet sims would run faster too.  

Then, so, if I write for example:

start 50 .nrg *.nrg 3000 above store stop

When DB reads it, it would replace "above" by "sub sgn 0 floor mult", which is the 1G way to write:

cond *.nrg 3000 > start 50 .nrg store stop

So, please? please? please?  
« Last Edit: August 07, 2007, 12:06:51 AM by MacadamiaNuts »
Sometimes you win, and sometimes you lose...

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
1G hardcoded operators
« Reply #1 on: August 07, 2007, 12:53:23 PM »
I'm working on a DNA system (you can read about it here).  Among other things I'm reworking how conditions are handled.  It's a different method, but it should give you what you're after.

For example, here's what a sample might look like:

Code: [Select]
*.eye5 0 >
*.refeye *.myeye != and
*.refvel .up store
*.refveldx .dx store

Basically it just takes the way things work now and destructures the gene.

For your example, it would look like this:
Code: [Select]
*.nrg 3000 > 50 .nrg store
« Last Edit: August 07, 2007, 12:56:18 PM by Numsgil »

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
1G hardcoded operators
« Reply #2 on: August 08, 2007, 01:16:10 AM »
It would not be that difficult to implement this as a pure pre-parse macro type of thing where a file of macros could be defined by the user and read in by the program at bot txt file load time.  Common macros could be posted and included in a base macro file included with or compiled into the program.

However, eventually, I would like to see something more significant implemented along these lines, a sort of higher-level DNA language which amoung other things, sequence mutation granulary would respect.  In this manner, a single atomic copy mutation could result in sequences which retained semantic meaning.  Perhaps macro expansion could in some way decorate the genome in a way that mutations woudl respect and act upon....  requires more thought after fewer beers...
Many beers....