Darwinbots Forum

Code center => Suggestions => Topic started by: Old Henk on April 09, 2005, 03:03:30 AM

Title: DNA Scripts
Post by: Old Henk on April 09, 2005, 03:03:30 AM
Hi,

At current, we have DNA scripts, which really come in handy during evolution sims.

I don't know how far you've progressed with this PY, but I've come up with some more 'script handlings'

"ifs""Thens"Hope some will be implemented...

Henk :)
Title: DNA Scripts
Post by: Numsgil on April 09, 2005, 03:05:24 AM
Eventually I'd like to see the scripts turned into a massive thing that can control the entire simulation while you're away.

So good work Henk, keep them comming.
Title: DNA Scripts
Post by: Zelos on April 09, 2005, 11:28:43 AM
the last one whit kill all the others can be useful. I think you also shall be able to make it evolutio like. like when we add the astronomy stuff. then we can have meteor impacts and valcanic eruptions than increase the albedo/absorbation of the atmosphere which cause the plants to get less energy and then it gets a food shortage. and then mmost bots die out.
Title: DNA Scripts
Post by: Botsareus on April 09, 2005, 05:19:15 PM
I like this one too....
Title: DNA Scripts
Post by: Shen on April 11, 2005, 06:15:25 PM
A couple more trigger ideas.

IF

More/Less than X Bots/Veggies


THEN
Increase/Decrease Veggie Feedrate/Repop
Title: DNA Scripts
Post by: PurpleYouko on April 11, 2005, 08:43:34 PM
That is pretty much what the old system used to do anyway.
Title: DNA Scripts
Post by: Old Henk on April 12, 2005, 11:33:51 AM
Quote
That is pretty much what the old system used to do anyway.
It did? How?  :huh:
Title: DNA Scripts
Post by: PurpleYouko on April 12, 2005, 12:44:58 PM
The program kept track of the total energy contained in all the veggies then determined the feed rate depending on this value.

Loads of big veggies = low or zero food (even saw negative sometimes)

very low small veggies = huge food.

Up until V2.36 that was how it worked. The new feed rate setting that Num added was the first time we ever really had a ny control.
Title: DNA Scripts
Post by: Greven on April 17, 2006, 03:33:54 PM
Actully we could integrate python or something similar into DB, although I dont know how, a little research might be worthwhile... I dont, that is how civilization 4 is made (or their scripts)
Title: DNA Scripts
Post by: Numsgil on April 17, 2006, 04:12:10 PM
The problem is that I don't know the first thing about Python

Seriously though a professional scripting language might either be perfect or way overkill.  I just don't know enough to guess.
Title: DNA Scripts
Post by: Numsgil on April 18, 2006, 12:58:16 AM
I'm looking at Lua (http://www.lua.org) at the moment.  It seems to look very similar to VB, which is a plus I think.

I'm trying to think of when the best time to run script events would be.  Can anyone think of some sort of event they might like to run that would be difficult or impossible to accomplish if the scripts all executed at the start of every cycle?
Title: DNA Scripts
Post by: Greven on April 18, 2006, 03:24:00 AM
I looked a little at Lua, seems nice. About the time of execution, a script that does something for the bots that die in a round etc. Can come up with numerous things....
Title: DNA Scripts
Post by: Henk on April 18, 2006, 04:35:00 AM
Quote from: Numsgil
I'm trying to think of when the best time to run script events would be.  Can anyone think of some sort of event they might like to run that would be difficult or impossible to accomplish if the scripts all executed at the start of every cycle?

Wouldn't that be very processor-intensive? How about having this interval user-definable? ie "check this script every N cycles"

Henk
Title: DNA Scripts
Post by: Numsgil on April 18, 2006, 08:28:44 AM
Here's what my basic problem is:

I can either move the entire Engine update into a script, and allow users to modify it that way to set up their sims, or set up a bunch of in-cycle script checks.

If I move the engine update into a script, that's potentially alot of code.  It depends exactly how much or how little I can get away with and still satisfy the needs of people.  It could easily turn into a grand old mess given my inexperience.

If I just set up a bunch of in-cycle script checks, it creates alot of code mess, which I'd like to avoid if at all possible.
Title: DNA Scripts
Post by: Elite on May 02, 2006, 04:08:28 PM
I would really appreciate some of Henk's original script suggestions.

I was trying to rapidly evolve a self-replicator, but the DNA kept getting obliterated by the point mutations when one did evolve. I had to do it by hand.

Pausing the sim if a bot reproduces would be a very useful feature for me
Title: DNA Scripts
Post by: Numsgil on May 02, 2006, 07:20:08 PM
It's definately on the list for 3.0.  Once I finish the half version, it's probably one of the first things I'll work on because it might make a bunch of other things easier to do.