Darwinbots Forum

Code center => Suggestions => Dead-End and Solved Suggestion Requests => Topic started by: Numsgil on April 04, 2005, 06:40:22 PM

Title: If--then--else
Post by: Numsgil 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.
Title: If--then--else
Post by: PurpleYouko 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.
Title: If--then--else
Post by: shvarz 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)
Title: If--then--else
Post by: Numsgil 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?
Title: If--then--else
Post by: shvarz 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.
Title: If--then--else
Post by: Numsgil 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.
Title: If--then--else
Post by: Zelos on April 06, 2005, 03:33:02 PM
I think the program is more important than the sites if you ask me
Title: If--then--else
Post by: Botsareus 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.
Title: If--then--else
Post by: Light 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?
Title: If--then--else
Post by: Numsgil 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.
Title: If--then--else
Post by: Light 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?
Title: If--then--else
Post by: Numsgil 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.
Title: If--then--else
Post by: Numsgil on October 06, 2005, 07:20:16 PM
This had, of course, been added to 2.4.

Another successfully accomplished upgrade!