Bots and Simulations > DNA Tools

Sanger

<< < (7/7)

goffrie:
Three things:
First, I can't run it (the script exits with the error 'Can't call method "s" on unblessed reference at sanger.pl line 56.') I'm running Gentoo Linux, perl version 5.8.8-r4 with ithreads enabled. I run the online interpreter instead.

Second, could you modify it so that it uses the new "dropbool" command instead of "true or and"? "dropbool" is much simpler

Third, nested if's don't work:

--- Code: ---always {
  if ( 1 == 0 ) {
    if ( 1 == 1 ) {
      .aimdx = 100;
    }
    .aimdx = -100;
  }
}
--- End code ---
results in (formatting added)

--- Code: ---start
1 0 =
1 1 =
100 .aimdx store
true or and
-100 .aimdx store
true or and
stop
--- End code ---
when it should result in

--- Code: ---start
1 0 =
1 1 = and
100 .aimdx store
dropbool
1 0 =
-100 .aimdx store
dropbool
stop
--- End code ---

Numsgil:
I think it was made before dropbool was added, so that's why.  Gobo's AWOL, so if you know how to make changes to what he has, please do!

Trafalgar:
He's AWOL? Oh well. Wait, so am I! I'll just refer to him as 'you' anyways in this post.


--- Quote from: Gobo ---Yes, surely it's collapsable. You can do arbitrary deep nested ifs. I just wanted to save the whole logic of Animal Minimalis to have a better analogy.
--- End quote ---

I'm curious how you got that to work (or if bugfixes or changes to DarwinBots fixed what was preventing mine from working). I actually had nested if/elseif/elseif/else etc supported in PyBot (which is what I called my bot compiler thing), but the generated code didn't work because of a DarwinBots bug. This might have been it: http://www.darwinbots.com/Forum/index.php?showtopic=2132

I just tried looking at the code I had written for the if/elif/etc and branching stuff, but I couldn't read the DarwinBots code it outputs anymore (I've forgotten what all the symbols do).

Perhaps when I get more time I'll see about posting it, and look at yours, but at the moment I'm a bit too busy.

(The main reasons I didn't post it before going AWOL, IIRC, were:
1. I hadn't written any documentation about how to use it, or any documentation for it at all really.
2. I thought that releasing it might be a bad idea, since it might lead to many more super-long-DNA but super-energy-efficient bots, slowing league matches way down.
3. I wanted branching conditionals to be supported by it, but was waiting for a version which fixed the bug that was making them not work.
)

You're right that it didn't have passable parameters for functions and such, of course.

IIRC I went AWOL after:
1. I evolved (from a zerobot) a bot with an actual conditional (It looked extremely unlikely to me to be possible to evolve anything more advanced from it), and
2. I made a bot which beat the entire F1 league, and was encouraged to have it be in the F2 league too even though it used a tactic that I thought should be nerfed, but the league tables never got updated (at least not before I went AWOL).

So I kinda felt like I had reached the top of the mountain, and went off to find something else to do.

Numsgil:

--- Quote from: Trafalgar ---So I kinda felt like I had reached the top of the mountain, and went off to find something else to do.
--- End quote ---

The mountain's been growing pretty quickly recently

Gobo:

--- Quote from: Numsgil ---I think it was made before dropbool was added, so that's why.  Gobo's AWOL, so if you know how to make changes to what he has, please do!
--- End quote ---
Hi, I think I know what should be done. After Eric had introduced more operations on boolean stack, conditionals became much easier. Though I'll need some time to remember the code :-)

Navigation

[0] Message Index

[*] Previous page

Go to full version