Author Topic: Bot Transition- 2.37.6 to 2.43  (Read 10952 times)

Offline strangers

  • Bot Neophyte
  • *
  • Posts: 37
    • View Profile
Bot Transition- 2.37.6 to 2.43
« on: February 11, 2007, 01:53:58 AM »
I don't know if anyone remembers me but here goes, I am still working on this bot which started here with a thread about tie feeding, now when I started I was working with 2.37.6 and I recently switched to 2.43. Now my bot acts kind of like a retard and I think I need some help. Any tips/info would be appreciated. Then again, I might be overreacting/setting my standards to high, and this might be a good bot.

Edit: Here's the new, new, new code.

Code: [Select]
'Test 1.1
'Tie Feeder/Hunter Prototype
'Strangers

def counter 51


'Initialize
'*************
cond
*.robage 0 =
start
100 rnd 55 store
.eye5 .ploc store
.tie inc
stop

cond
*.robage 1 =
start
.deltie inc
stop

'Wide search 1
'*******************
cond
*.eye1 *.eye5 >
start
mult -140
stop

'Wide search 2
'*******************
cond
*.eye9 *.eye5 >
start
mult 140
stop

' Simple search pattern
'***************************
cond
*.eye3 *.eye5 >
start
mult -70
stop

'Simple search pattern part 2
'**********************************
cond
*.eye7 *.eye5 >
start
mult 70
stop

' Moving
'**********
cond
*.vel 40 <
*.refeye *.myeye !=
start
40 *.vel sub 2 div .up store
stop

cond
*.vel 40 <
*.refeye *.myeye !=
*.eye5 0 =
start
50 *.vel sub 2 div .up store
stop

' Obtaining Food
'*******************
cond
*.eye5 40 >=
*.refeye 0 =
start
-1 .shoot store
16 .shootval store
40 *.vel sub 2 div .up store
stop

cond
*.eye5 40 >
*.refeye *.myeye !=
*.refeye 0 !=
*.refpoison 0 >
start
*.refxpos *.refypos angle .setaim store
-6 .shoot store
16 .shootval store
*.refvelup .up store
stop

cond
*.eye5 40 >
*.refeye *.myeye !=
*.refeye 0 !=
*.refpoison 0 =
start
*.refxpos *.refypos angle .setaim store
-1 .shoot store
16 .shootval store
*.refvelup .up store
stop

cond
*.shflav 0 !=
*.shflav -2 !=
start
*.shang .aimshoot store
32 .shootval store
-6 .shoot store
0 .shflav store
stop

'Avoid conspecifics
'**********************
cond
*.eye5 0 >
*.refeye *.myeye =
*.refvel *.vel >
start
mult 180
*.refvel *.vel sub 2 div .up store
stop

cond
*.eye5 0 >
*.refeye *.myeye =
*.refvel *.vel <=
start
mult 180
*.vel *.refvel sub 2 div .up store
stop

‘Rotate back and continue feeding
'****************************************
cond
*50 0 >
start
mult 628
50 dec
stop

'Reproduction
'****************
cond
*.nrg 1000 >
*.body 500 >
start
50 inc
30 .repro store
mult 628
stop

‘Perform the rotation
'************************
cond
start
.aimdx store
stop

'Tie Feeding
'****************
cond
*.eye5 30 >
*.eye4 *.eye6 =
*.refeye *.myeye !=
*.numties 0 >=
*.numties 5 <
start
*55 .tie store
stop

cond
*.numties 0 >
*.counter 19 <
start
-1 .tieloc store
-1000 .tieval store
*55 .tienum store
.counter inc
stop

cond
*.numties 0 >
*.counter 19 =
start
*55 .deltie store
stop

cond
*.numties 0 =
*.counter 0 !=
start
0 .counter store
stop

cond
*.counter 19 >
*.counter 0 < or
start
0 .counter store
stop

Cond
*.trefeye *.myeye =
start
*55 .deltie store
stop

cond
*.tiepres *55 !=
*.tiepres 0 >
start
*.tiepres .deltie store
stop

'Body Management
'***********************
cond
*.nrg 1000 >
*.body 5000 <
start
100 .strbody store
stop

cond
*.nrg 100 <
start
100 .fdbody store
stop

'Slime Management
'************************
cond
*.slime 300 <
*.nrg 3000 >
start
100 .mkslime store
stop

'Poison
'********
cond
 *.poison 500 <
*.nrg 3000 >
start
 50 .strpoison store
stop

'Waste Management
'*************************
cond
*.waste 100 >
start
1 .backshot store
-4 .shoot store
*.waste .shootval store
stop

'Anti Virus
'**************
cond
*.mkvirus 0 >
start
0 .mkvirus store
stop

cond
*.vtimer 0 >
start
0 .vshoot store
stop

end
« Last Edit: February 15, 2007, 05:47:47 PM by strangers »

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Bot Transition- 2.37.6 to 2.43
« Reply #1 on: February 11, 2007, 04:01:17 PM »
I think there's an actual .counter now so that may be messing things up.

What's up with this dna?

*.refnrg 5 div -1 mult .tieval store

It's way more reliable to use trefnrg.

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Bot Transition- 2.37.6 to 2.43
« Reply #2 on: February 11, 2007, 04:58:44 PM »
I'm waiting for my OS to be reinstalled and not downloaded 2.43 yet so I can't check but...

The last gene in 'obtaining food:

cond
*.eye5 40 >
*.refeye *.myeye !=
*.refeye 0 !=
*.refpoison 0 =
start
-1 .shoot store
16 .shootval   <--- missing store instruction
*.refvelup .up store
stop

May be messing up your turning via mult by dropping another number on the top of the stack.
If you try and take a cat apart to see how it works, the first thing you have in your hands is a non-working cat.
Douglas Adams

Offline strangers

  • Bot Neophyte
  • *
  • Posts: 37
    • View Profile
Bot Transition- 2.37.6 to 2.43
« Reply #3 on: February 12, 2007, 10:19:40 PM »
I added to the anti-virus and the moving genes, I've been running the league and it seems to only be able to to claim up to the 23rd spot and then gets slaughtered by Pfidiosos.

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Bot Transition- 2.37.6 to 2.43
« Reply #4 on: February 13, 2007, 10:31:27 AM »
If you open the bots dna in game, (select bot/rc /show robot info/ DNA ->) you should be able to quickly spot a couple of spelling mistakes (two *refeyes instead of *.refeye and backshoot instead of backshot) plus the program doesn't seem to recognise .counter so you will need to define that (ie def counter 999 at start of dna). (unless this is due to my sysvars being out of date...)

Also your avoid conspecifics gene, using *.eye5 40 >, means the bot will freeze if it spots a friend and eye 5 40 <=. I suggest changing it to *.eye5 0 > or adding another gene.

The in game dna did look a bit strange, it has joined the genes that finish without a store instruction and dropped a few random 0's in to add to the confusion!    No idea why but it didn't seem to change how the dna worked.

Will have another look at it later.

(I am using 2.43 now)
« Last Edit: February 13, 2007, 10:32:13 AM by Jez »
If you try and take a cat apart to see how it works, the first thing you have in your hands is a non-working cat.
Douglas Adams

Offline strangers

  • Bot Neophyte
  • *
  • Posts: 37
    • View Profile
Bot Transition- 2.37.6 to 2.43
« Reply #5 on: February 13, 2007, 08:51:21 PM »
2.43 seems to not like me that much my code always looks weird when I check it, and it seems to retard my bots. But I just re-ran the F1 league with my new code and it claimed the 15th spot, then DIN2 slaughtered it. I might enter it.

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Bot Transition- 2.37.6 to 2.43
« Reply #6 on: February 14, 2007, 02:42:52 AM »
Cool! (I'll give it an unofficial run now to see how it does and see if I can spot any other problems with the code).  

EDIT:
Hmm, that didn't take as long as I had hoped, it reached position 28 losing to D Eraticatorus, (tested twice), are you sure that the code posted here is the same as the code you are using?

Now, remembering that I am a F2 aficionado; not so good with ties and virtually useless with viruses, here are some other (possible) problems I have spotted;

' Obtaining Food 'what if it see's enemy but *.eye5 40 <?
'Tie Feeding
*.numties 0 >= 'don't really need this line
*57 .readtie store' shouldn't be *? or is same as 0 (or should be *55 maybe) read that f2 bit above for why I am not sure about this

I am also not sure about the 'Anti Virus;
cond
*.mkvirus 0 >
bit but am hoping some virus lover will jump in to help us out here, the wiki wasn't that helpful

I am not sure that the in game dna is causing problems, but will query why we are getting the strange display in the bugs part of forum just to make certain...
« Last Edit: February 14, 2007, 03:41:40 AM by Jez »
If you try and take a cat apart to see how it works, the first thing you have in your hands is a non-working cat.
Douglas Adams

Offline strangers

  • Bot Neophyte
  • *
  • Posts: 37
    • View Profile
Bot Transition- 2.37.6 to 2.43
« Reply #7 on: February 14, 2007, 01:42:39 PM »
Quote from: Jez
Hmm, that didn't take as long as I had hoped, it reached position 28 losing to D Eraticatorus, (tested twice), are you sure that the code posted here is the same as the code you are using?
I reposted the code it should work, as I'm running the leagues now and its at DIN2 and losing.
Once more, I think 2.43 just doesn't like me.

Quote from: Jez
' Obtaining Food 'what if it see's enemy but *.eye5 40 <?
'Tie Feeding
*.numties 0 >= 'don't really need this line
*57 .readtie store' shouldn't be *? or is same as 0 (or should be *55 maybe) read that f2 bit above for why I am not sure about this
I'll have a look at the food gene, and the part about the tie feedind, I don't think I need it anymore.

Quote from: Jez
I am also not sure about the 'Anti Virus;
cond
*.mkvirus 0 >
For the anti virus:
*.mkvirus 0 >
start
*.mkvirus .delgene store
stop
Most self replicating viruses store the viral gene in .mkvirus, so storing *.mkvirus in .delgene would delete the viral gene.

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Bot Transition- 2.37.6 to 2.43
« Reply #8 on: February 14, 2007, 10:03:30 PM »
Umm...

cond
*.mkvirus 0 >
start
.mkvirus .delgene store
stop

You're missing the * in front of mkvirus. There's also a problem if a random gene or one of your bot's own is chosen.

ie.

*.thisgene 1 sub .mkvirus store

This could trick your bot into deliberatly deleting it's own dna...

the best defenses I've seen are the SG trick and slime. You could also code the bot to delete all of it's own dna, but that may give the enemy the advantage they were looking for.

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Bot Transition- 2.37.6 to 2.43
« Reply #9 on: February 15, 2007, 10:52:14 AM »
Quote
I reposted the code it should work, as I'm running the leagues now and its at DIN2 and losing.
Once more, I think 2.43 just doesn't like me.

  Effort has been put into making the leagues run the same for everyone, I doubt it's down to 2.43, shouldn't be random difference, I'm betting you are using the latest league download and all the settings should be defaulted.
I hate it when this happens!  

Considering the failing health of my OS, that still hasn't been reinstalled, I'll bet it's a problem at my end. We'll see if the ranking difference remains after that is fixed.
If you try and take a cat apart to see how it works, the first thing you have in your hands is a non-working cat.
Douglas Adams

Offline strangers

  • Bot Neophyte
  • *
  • Posts: 37
    • View Profile
Bot Transition- 2.37.6 to 2.43
« Reply #10 on: February 15, 2007, 05:44:36 PM »
Quote from: Endy
Umm...

cond
*.mkvirus 0 >
start
.mkvirus .delgene store
stop

You're missing the * in front of mkvirus. There's also a problem if a random gene or one of your bot's own is chosen.

ie.

*.thisgene 1 sub .mkvirus store

This could trick your bot into deliberatly deleting it's own dna...

the best defenses I've seen are the SG trick and slime. You could also code the bot to delete all of it's own dna, but that may give the enemy the advantage they were looking for.
Well, I'll see what I can do about that.

Quote from: Jez
Effort has been put into making the leagues run the same for everyone, I doubt it's down to 2.43, shouldn't be random difference, I'm betting you are using the latest league download and all the settings should be defaulted.
I hate it when this happens!  
Seriously, when I run the league in 2.37.6 it beats up to DIN2 and then gets slaughtered, but when I run it in 2.43 it can only beat up to D. Eraticatorus, all default settings and current league folder. If anyone can think of whats making this happen, other than bad coding, feel free to add your input.
Edit:And now every time I run the league in 2.37.6 and my bot beats D. Eraticatorus, DarwinBots Crashes.
Edit:Reinstalled 2.37.6, Problem solved.
« Last Edit: February 15, 2007, 06:12:33 PM by strangers »

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Bot Transition- 2.37.6 to 2.43
« Reply #11 on: February 16, 2007, 10:36:42 AM »
Quote from: strangers
Well, I'll see what I can do about that.
Seriously, when I run the league in 2.37.6 it beats up to DIN2 and then gets slaughtered, but when I run it in 2.43 it can only beat up to D. Eraticatorus.
Ah, OK, we are getting the same results then. That's a relief! I will have another look at some of the latest changes to the program and see if I can figure why this is happening. It might be D. Eraticatorus getting better due to a change in the program rather than your bot getting worse though.

EDIT
2.37 to 2.43 is a big step, you are looking at loads of changes. I do seem to remember your bot doing better when I first tried it in 2.43 though. That suggests that something that was fixed (in the bot code) is in reality handicapping your bot! Do you have a copy of the original bot and updates you posted still? It is probably down to one change or something stupid, an instruction that was originally ignored that is now causing this problem.

I'm too hungry to look now but hopefully will get a chance to see if I can spot the problem later.
« Last Edit: February 16, 2007, 10:50:20 AM by Jez »
If you try and take a cat apart to see how it works, the first thing you have in your hands is a non-working cat.
Douglas Adams

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Bot Transition- 2.37.6 to 2.43
« Reply #12 on: February 17, 2007, 02:33:13 AM »
Variable radii and tie physics are the two major differences.  Try running the league with fixed bot radii and see if that makes a difference.  If not, more likely than not the tie physics are impacting specific aspects of the way the bots tie feed.
Many beers....

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Bot Transition- 2.37.6 to 2.43
« Reply #13 on: February 17, 2007, 05:51:52 AM »
An example of what I suggested: (Using the bot you posted after I made the refeye and counter suggestion and DB2.43).

Remove ‘Def counter’;
Test 1
Beats D Eraticatorus over 70 rounds but lost to Din2
Test 2
Beats D Eraticatorus over ~15 rounds but lost to Din2  

The logical conclusion from this is that the counter system you are using handicaps your bot. (Your latest bot edit gives (1 test) much the same result with that change btw).

I’ll have another look at the code and see if I can figure out why counter is causing this problem.
If you try and take a cat apart to see how it works, the first thing you have in your hands is a non-working cat.
Douglas Adams

Offline strangers

  • Bot Neophyte
  • *
  • Posts: 37
    • View Profile
Bot Transition- 2.37.6 to 2.43
« Reply #14 on: February 17, 2007, 07:14:03 PM »
I ran it in 2.43 with the counter, and all references to it removed, it still lost. Than I ran it 2.37.6, and it worked just the same, so me thinks it may be superfluous, tried it in 2.43, counter removed and fixed bot radii, no difference. So it's probably just a coding problem.
EDIT: It's not any problem on my end at all, it's just D. Eraticatorus' virus, I examined it's genome and the utilized it's command for not being infected by it's own virus. And wouldn't you know, boom, beats it in nearly 10 seconds a round. I just need a better virus defense.
P.S.
It'd be cheating to use that "technique" in the leagues wouldn't it?
« Last Edit: February 17, 2007, 07:34:16 PM by strangers »