Author Topic: Hello  (Read 4104 times)

Offline MetalPaladin

  • Bot Neophyte
  • *
  • Posts: 5
    • View Profile
Hello
« on: March 08, 2010, 12:13:05 AM »
I've been holding my breath for the emails to start going out again so I could validate my account, thanks for fixing that Nums.

Hi guys, new to the forum and Darwinbots, I've always wanted to use a program like this, just never thought to google "evolution simulator" lol. I'm still learning my way around the programs and around the DNA. In particular I was having a lot of trouble getting my veggies to grow. If anyone could help with that it'd be much appreciated. Shouldn't this work:
Code: [Select]
' Defining Variables
def cellage 150
.cellage 500 store
 ' Gene 2 - Growing
cond
   *.robage *.cellage =
start
   .strbody 10 store
   .cellage 500 add
stop

Kind of sad to see so little developers working on the program though. I'd like to help, but only took a class of computer programming in softmore year of high school and don't remember much, we learned java and C++ anyway, not C#. If there's anything I can do though, let me know!

Offline Shasta

  • Administrator
  • Bot Destroyer
  • *****
  • Posts: 231
    • View Profile
Hello
« Reply #1 on: March 08, 2010, 01:36:43 AM »
Welcome to the forums!

 One reason reason why your veggie is not working is that the ".cellage 500 store" is actually never being executed. All commands must take place within a gene (def is the exception to this, but its not really a command). The other is that it you are mixing up the order of operations in the body of your code.  What you would need is something like:
Code: [Select]
cond
  *.robage 0 =
start
  500 .cellage store
stop

cond
   *.robage *.cellage =
start
   10 .strbody store
   500 *.cellage add .cellage store 'You also were never actually storing the new value to .cellage
stop

If you want to do an action on a certain interval a better way to do this is using the modulus (mod) operator. What the modulus operator does is return the remainder of a division, like you used to do in grade school. That lets us do this:
Code: [Select]
cond
  *.robage 500 mod 0 =
start
    10 .strbody store
stop
quite a bit simpler, and functionally equivalent

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Hello
« Reply #2 on: March 08, 2010, 01:49:48 AM »
Thanks for not giving up

The current program you have in your hands is done in Visual Basic 6, actually.  If you have a desire, some spare time, and a stubbornness not to give up at the first sign of problems, you might try fixing various bugs that have been reported.  VB6 is very easy to learn, and the code, while a bit messy, is pretty easy to hack on.  If you want to give it a go I can step you through the process.

Anyway, welcome.

Offline Houshalter

  • Bot Destroyer
  • ***
  • Posts: 312
    • View Profile
Hello
« Reply #3 on: March 08, 2010, 06:39:26 AM »
Under the "General" tab, theres a slider called "Veg Body/NRG Distribution". If your bots are to small than you can increase this to make the veggies get more body automatically by the simulator.

Offline MetalPaladin

  • Bot Neophyte
  • *
  • Posts: 5
    • View Profile
Hello
« Reply #4 on: March 08, 2010, 05:36:21 PM »
Thanks guys! Shasta, that bit of code works great, thanks. And Numsgil I think I might be up for that, I'll give you a pm.

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Hello
« Reply #5 on: March 08, 2010, 10:51:11 PM »
As an afterthought, C# is virtually identical to Java...
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan