Author Topic: If--then--else  (Read 3535 times)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7716
    • View Profile
If--then--else
« on: April 04, 2005, 06:40:22 PM »
Currently genes follow the pattern:

if (cond)
then (start)
endif (stop)

If you want to follow an if-then-else structure, then you need two genes.  Not a problem for bot writers, but difficult for mutating bots to achieve.

So I propose:

cond

start

else

stop

Where everything after else is executed if the cond fails.  If no else is detected then it follows the current system.  Should make for more powerful mutations.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2554
    • View Profile
    • http://kuro-tejina.com
If--then--else
« Reply #1 on: April 04, 2005, 07:21:00 PM »
I like that from a programmers point of view but how would it compare to real genes?

I would like to get some input from the biologists before making any decisions about this.

Shvarz will be back in a couple of days. Let's see what he thinks.
There are 10 kinds of people in the world

Those who understand binary.

and those who don't

:D PY :D

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
If--then--else
« Reply #2 on: April 05, 2005, 11:26:12 PM »
From my point of view this should not matter at all.  This part of DB has almost no relation to real biology anyway.

I just have one comment: it should be done in a way that still allows junk DNA.  The way I see it, the system should work like this:

we have a "gene execution" flag that can be set to 0, +1, or -1

true condition sets the flag to +1
false condition sets the flag to -1

- when flag is set to +1, program scans for first available "start" and executes the gene, flag is set to 0

- when flag is set to -1, program scans for first available "else" and executes commands after it, then sets flag to 0

- when flag is set to 0, program does not execute neither "start" nor "else", just scans for the next "condition"

This way we can have "cond", "start" and "else" parts in any order we want.  The whole deal with "bursting babies when stop is missing" should be removed by the way (or addressed in some way)
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7716
    • View Profile
If--then--else
« Reply #3 on: April 05, 2005, 11:58:11 PM »
In 2.36 babies shouldn't burst anymore.  I messed with the code that does it and...

well, I think there are some weird ways to crash it now to be honest.

I think Junk DNA, chromosomes, etc. should be the next major update over enzymes.  What do you think?

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
If--then--else
« Reply #4 on: April 06, 2005, 02:10:50 AM »
You mean before enzymes?  Sure, why not.  What do you mean by chromosomes?


I'd put priorities like this:

1. All bugs need to be ironed out.
2. Interface simplified (I have some ideas, will type them in later)
3. Wiki and website (I hope I'll have time to work on these in the next week or two)
4. Add new stuff

For enzymes we can start with a separate system to test these things out.  Do you think the code for enzymes and metabolism can be done in a way so that we can have a separate program to play with just that?  Would be very useful for us and for future demonstrations on how things work.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7716
    • View Profile
If--then--else
« Reply #5 on: April 06, 2005, 02:56:26 AM »
A seperate program to run some tests on the enzymes would probably be a good idea.  It shouldn't be too hard to run some basic evolution sims in a new program to figure out what works and what doesn't (like do we need to have incentive to selectively feed or not).

The chromosome idea I had was to have 'strands' of DNA that execute simoltaneously and can be 'stuck' together in pairs.  Then things like crossing over and sexual reproduction become trivial. (to implement I mean).

Most bugs seem to be gone.  Well, besides the save/loading problems and snapshot.

When you mean interface, do you mean the options menu?  Because I spent alot of time on that, and I'd like to think I made it much simpler.

The wiki I toy with from time to time, but never as much as I'd like.  Still, it's comming along.  Would someone go through and do the sysvars for ties?  To be honest I haven't really messed much with ties yet.  Of course, that's like most of the sysvars.
« Last Edit: April 06, 2005, 04:51:03 PM by Numsgil »

Offline Zelos

  • Bot Overlord
  • ****
  • Posts: 707
    • View Profile
If--then--else
« Reply #6 on: April 06, 2005, 03:33:02 PM »
I think the program is more important than the sites if you ask me
When I have the eclipse cannon under my control there is nothing that can stop me from ruling the world. And I wont stop there. I will never stop conquering worlds through the universe. All the worlds in the universe will belong to me. All the species in on them will be my slaves. THE ENIRE UNIVERSE WILL BELONG TO ME AND EVERYTHING IN IT :evil: AND THERE IS NOTHING ANYONE OF you CAN DO TO STOP ME. HAHAHAHAHAHAHAHA

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
If--then--else
« Reply #7 on: April 06, 2005, 03:45:27 PM »
If you ask me , I think its better to realise darwinbots with matabolism, call somthing like:  DB3.0BetaA , DB3.0BetaB , DB3.0BetaC... Then when we figure it out we clean the ftp from the virsions we dont need.

Offline Light

  • Bot Destroyer
  • ***
  • Posts: 245
    • View Profile
If--then--else
« Reply #8 on: April 06, 2005, 06:39:34 PM »
What happened to the changes that you were doing to the combat?

As far as I can tell the limit on slime and shell is still set at 200, is it going to be removed, with the arrival of powered shots?

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7716
    • View Profile
If--then--else
« Reply #9 on: April 06, 2005, 07:45:50 PM »
There shouldn't be any limit at all on slime and shell.  And powered shots should be working.

Try storing -200 in shootval when you fire a -1 shot.  The shot should last a long time.

Sometimes I make a change to something and it doesn't save.

Offline Light

  • Bot Destroyer
  • ***
  • Posts: 245
    • View Profile
If--then--else
« Reply #10 on: April 06, 2005, 07:58:55 PM »
when I was playing last night I couldn't get a bot to make over 200 shell or slime so I assume the limits are still there

how much energy do powershots use? is storing -100 using a 100 points of energy a shot and how much stronger is say -100 than a normal shot? 100 times?
« Last Edit: April 06, 2005, 08:01:11 PM by Light »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7716
    • View Profile
If--then--else
« Reply #11 on: April 06, 2005, 08:09:38 PM »
storing 100 or -100 uses 100 energy.  negative shots increase range, positive shots increase power.

the actual increase is roughly log base 2 (energy used).

So if you use 8 energy you get a triple increase.  Use 16 and get a quadruple increase.  You get the idea.
I'll look into slime and shell.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7716
    • View Profile
If--then--else
« Reply #12 on: October 06, 2005, 07:20:16 PM »
This had, of course, been added to 2.4.

Another successfully accomplished upgrade!