Author Topic: Sanger  (Read 23944 times)

Offline goffrie

  • Bot Builder
  • **
  • Posts: 65
    • View Profile
Sanger
« Reply #30 on: March 06, 2008, 05:13:20 PM »
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: [Select]
always {
  if ( 1 == 0 ) {
    if ( 1 == 1 ) {
      .aimdx = 100;
    }
    .aimdx = -100;
  }
}
results in (formatting added)
Code: [Select]
start
1 0 =
1 1 =
100 .aimdx store
true or and
-100 .aimdx store
true or and
stop
when it should result in
Code: [Select]
start
1 0 =
1 1 = and
100 .aimdx store
dropbool
1 0 =
-100 .aimdx store
dropbool
stop
« Last Edit: March 06, 2008, 05:14:48 PM by goffrie »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Sanger
« Reply #31 on: March 06, 2008, 06:08:31 PM »
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!

Offline Trafalgar

  • Bot Destroyer
  • ***
  • Posts: 122
    • View Profile
Sanger
« Reply #32 on: May 05, 2008, 04:10:56 PM »
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.

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.
« Last Edit: May 05, 2008, 04:11:58 PM by Trafalgar »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Sanger
« Reply #33 on: May 05, 2008, 06:25:24 PM »
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.

The mountain's been growing pretty quickly recently

Offline Gobo

  • Bot Builder
  • **
  • Posts: 67
    • View Profile
Sanger
« Reply #34 on: May 06, 2008, 02:36:56 AM »
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!
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 :-)