Author Topic: Very nice!  (Read 6924 times)

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Very nice!
« on: July 26, 2006, 11:01:36 AM »
Hi all

Good job all round.  

It's been fun playing with some of the new additions you have added to the sim, could have done with a bit more info about the new operators? though, those bit thingies like ~ for instance I failed to find any info on.
I've probably worked out how to use And/Or now but think there was another one as well. Oh! Oh! And ceiling/floor? I saw in someones code? And a couple of operators I've seen some of you mathmagicians use that I still haven't found.  

I'm a bit worried my pc has tortured the installation of DB, wouldn't be the first time, so will enter a F2 bot into the lists just to check I'm getting the right results.  

DB V2.4+ just leaves all the bots motionless (for me) so I'm messing with V2.37.6 atm. Looks good though...
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 Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Very nice!
« Reply #1 on: July 26, 2006, 11:20:18 AM »
Ok, didn't want to let me post in leagues or bestiary so I'll post it here and let someone move it!

You can see I've started to add things to combat Excalibur V1.1, couple of nice ideas in Excalibur that I'm going to use. Zebedee is undergoing a redesign atm to cope with Excalibur so I hope you'll forgive the messy code.  

Main reason I have for jumping the gun and releasing a 'beta bot' is that I get Excalibur beating Hunter V2.3 easily. Either Hunter is designed for DB V2.4+ or I'm getting the wrong results and it's not worth a major rehaul of Zebedee till I know.  

Anyway; of the top twenty bots in the F2 league that I could find code for my results give Zebedee as losing to/tieing with Excalibur only. Excalibur is by far the better bot and Zebedee only seems to win rounds through luck.

(Statistical anlysis of the results FTW! Except when I have to reset max rounds.)

'(C. Algificus) Zebedee V1.0
'F2 bot for V2.37.6
'Worst enemy Excalibur V1.1?
'Test bot
'Designed by Jez

'ID gene - Endy
cond
*.robage 0 =
start
.thisgene .memloc store
stop

'search for food
cond
*.eye5 0 =
'*.eye5 0 =
'*.aimsx 0 =
start
140 .aimsx store
stop

'move toward food/rival
cond
*.eye5 0 >
*.eye5 45 <
*.memval *.genes !=
start
*.refxpos *.refypos angle .setaim store
100 *.eye5 sub abs 10 div *.refvel abs add 2 add .up store
'*.mydx .sx store
stop

'shoot food/rival
cond
*.eye5 45 >=
*.eye5 80 <
*.memval *.genes !=
start
-1 .shoot store
20 .shootval store
*.refxpos *.refypos angle .setaim store
100 *.eye5 sub abs 10 div *.refvel abs add 1 add .up store
stop

'shoot rival with venom
cond
*.refshell 5 <
*.eye5 45 >=
*.venom 5 >
*.eye5 80 <
*.memval *.genes !=
*.refeye 0 >
start
-3 .shoot store
.shoot .vloc store
-2 .venval store
*.refxpos *.refypos angle .setaim store
100 *.eye5 sub abs 10 div *.refvel abs add 1 add .up store
stop

'shoot rival with shell
cond
*.refshell 5 >
*.eye5 45 >=
*.venom 5 >
*.eye5 80 <
*.memval *.genes !=
*.refeye 0 >
start
-3 .shoot store
.shoot .vloc store
-2 .venval store
*.refxpos *.refypos angle .setaim store
100 *.eye5 sub abs 10 div *.refvel abs add 1 add .up store
stop

'shoot food/rival
cond
*.shell 5 <
*.eye5 80 >=
*.memval *.genes !=
start
-6 .shoot store
20 .shootval store
*.refxpos *.refypos angle .setaim store
100 *.eye5 sub abs 10 div *.refvel abs add .up store
stop

'shoot food/rival with shell
cond
*.shell 5 >
*.eye5 80 >=
*.memval *.genes !=
start
-1 .shoot store
20 .shootval store
*.refxpos *.refypos angle .setaim store
100 *.eye5 sub abs 10 div *.refvel abs add .up store
stop

'avoid friend
cond
*.memval *.genes =
*.refage 1 >
*.eye5 0 >
start
280 .aimsx store
stop

'reproduce baby behind
cond
*.nrg 2900 >
start
50 .repro store
628 .aimsx store
.shoot dec
stop

'parent rotates back
cond
*.memval *.genes =
*.refage 1 =
start
628 .aimsx store
stop

'cut ties/ lengthen ties
cond
*.numties 0 !=
start
*.tiepres .deltie store
32000 .tielen1 store 'Endy's from Elite's post (not working in v 2.4?
stop

'energy to body
cond
*.nrg 1111 >
start
100 .strbody store
stop

'body to energy
cond
*.nrg 999 <
*.body 201 >
start
100 .fdbody store
stop

'poison/venom + attack avoidance
cond
*.poison 200 <
*.nrg 1000 >
start
10 .strpoison store
.shoot .ploc store
stop

'venom
cond
*.venom 200 <
*.nrg 1000 >
start
10 .strvenom store
stop

'counter attack (ty Elite)
cond
*.eye5 0 =
*.memval *.genes = or
*.refshoot 0 = or
*.shflav 0 !=
*.shflav -2 !=
start
*.shang .aimshoot store
32 .shootval store
-6 .shoot store
0 .shflav store
stop

'anti leach gene
cond
*.tiepres 0 >
start
.tieval .tieloc store
1000 .tieval store
stop

'ID gene - Endy
cond
start
' little constant viral defense gene doubles as ID gene
*.genes .delgene
 .fixpos *.fixed mult dec 'anti fixpos by Elite
*.thisgene *.genes sub dup div
mult *.robage sgn mult store
.genes inc
stop
end
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 Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Very nice!
« Reply #2 on: July 26, 2006, 01:54:18 PM »
Hey Jez, been a long time.  Were you still around when I first joined?

You can find information on the bitwise commands here.  They're going to require DB 2.4+  Other commands can be found here.

Not all of the wiki entries for it are finished, if there's a need I could probably write them up real fast.

If you have a sim you think is acting wierd in 2.4+, post a save in the bugs and fixes forum for Eric to take a look at.

The Beastiary won't let you post replies, but I think you should be able to post new topics.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Very nice!
« Reply #3 on: July 26, 2006, 02:22:25 PM »
Yes, I would be very interested in a sim that demonstrates something not working correctly in 2.4X...
Many beers....

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Very nice!
« Reply #4 on: July 26, 2006, 02:40:26 PM »
Was just testing the waters to see if it did work properly, was hoping someone would test it quickly V Hunter V2.3 and Excalibur V1.1 to check it got same result.

I would be happy to reinstall DB V2.4+ and post a save of the bots not moving but seeing as they are standard bots and if no-one else gets same problem I imagine it would be my install not the game.

Thanks for the links!

Anyway, I decided to poke Zebedees eye's out just to see if I could get rid of all of them. Nearly worked, not quite sure why I need to ref an eye to stop eye's reading 150 though.


'(C. Algificus) Zebedee V1.1
'Won't work without eye ref

def distance 990
'ID gene - Endy
cond
*.robage 0 =
start
.thisgene .memloc store
'************************************************
'*****Why does bot need to ref this eye?*****
'************************************************
*.eye5
'*****Eye will stick at 150 otherwise**********
stop


'search for food
cond
*.refnrg 0 =
*.memval *.genes = or
start
*.aim 280 add .setaim store
0 .distance store
stop

cond
*.refnrg 0 !=
*.memval *.genes !=
start
*.refxpos *.refypos dist .distance store
stop

'move toward food/rival
cond
*.distance 0 !=
*.distance 55 <
*.refnrg 0 !=
*.memval *.genes !=
start
*.refxpos *.refypos angle .setaim store
*.refxpos *.refypos dist 10 div *.refvel abs add .up store
stop

'shoot food/rival
cond
*.distance 55 >=
*.distance 20 <
*.memval *.genes !=
start
-1 .shoot store
20 .shootval store
*.refxpos *.refypos angle .setaim store
*.refxpos *.refypos dist 10 div *.refvel abs add .up store
stop

'shoot rival with venom
cond
*.refshell 5 <
*.distance 55 >=
*.venom 5 >
*.distance 20 <
*.memval *.genes !=
*.refeye 0 >
start
-3 .shoot store
.shoot .vloc store
-2 .venval store
*.refxpos *.refypos angle .setaim store
*.refxpos *.refypos dist 10 div *.refvel abs add .up store
stop

'shoot rival with shell
cond
*.refshell 5 >
*.distance 55 >=
*.venom 5 >
*.distance 20 <
*.memval *.genes !=
start
-3 .shoot store
.shoot .vloc store
-2 .venval store
*.refxpos *.refypos angle .setaim store
*.refxpos *.refypos dist 10 div *.refvel abs add .up store
stop

'shoot food/rival
cond
*.shell 5 <
*.distance 20 >=
*.memval *.genes !=
start
-6 .shoot store
20 .shootval store
*.refxpos *.refypos angle .setaim store
*.refxpos *.refypos dist 10 div *.refvel abs add .up store
stop

'shoot food/rival with shell
cond
*.shell 5 >
*.distance 20 >=
*.memval *.genes !=
start
-1 .shoot store
20 .shootval store
*.refxpos *.refypos angle .setaim store
*.refxpos *.refypos dist 10 div *.refvel abs add .up store
stop

'avoid friend
cond
*.memval *.genes =
*.refage 1 >
*.distance 0 >
start
280 .aimsx store
stop

'reproduce baby behind
cond
*.nrg 2900 >
start
50 .repro store
628 .aimsx store
.shoot dec
stop

'parent rotates back
cond
*.memval *.genes =
*.refage 1 =
start
628 .aimsx store
stop

'cut ties/ lengthen ties
cond
*.numties 0 !=
start
*.tiepres .deltie store
32000 .tielen1 store 'Endy's from Elite's post
stop



'energy to body
cond
*.nrg 1111 >
start
100 .strbody store
stop

'body to energy
cond
*.nrg 999 <
*.body 201 >
start
100 .fdbody store
stop

'poison/venom + attack avoidance
cond
*.poison 200 <
*.nrg 1000 >
start
10 .strpoison store
.shoot .ploc store
stop

'venom
cond
*.venom 200 <
*.nrg 1000 >
start
10 .strvenom store
stop

'counter attack (ty Elite)
cond
*.distance 0 =
*.memval *.genes = or
*.refshoot 0 = or
*.shflav 0 !=
*.shflav -2 !=
start
*.shang .aimshoot store
32 .shootval store
-6 .shoot store
0 .shflav store
stop

'ID gene - Endy
cond
start
' little constant viral defense gene doubles as ID gene
*.genes .delgene
 .fixpos *.fixed mult dec 'anti fixpos by Elite
*.thisgene *.genes sub dup div
mult *.robage sgn mult store
.genes inc
stop
end
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
Very nice!
« Reply #5 on: July 26, 2006, 03:29:12 PM »
Quote from: Jez
I would be happy to reinstall DB V2.4+ and post a save of the bots not moving but seeing as they are standard bots and if no-one else gets same problem I imagine it would be my install not the game.

That it is your install is very unlikely.  There is little that can go wrong in an install.  What can go wrong generally results in the program not working at all or in some extremely obvious issue such as not locating the sysvars file.  An install that runs without explicit problems but exhibits some subtle abaraent bot behaviour is essentailly unheard of.

What is more likely is that the program is working correctly, but that you configured or failed to configure some setting appropriatly for the sim or bots for behaviour you expect e.g. specifying that your bots are fixed.  

The least likely but still quite possible option is an actual program bug.

I cannot investigate or rule out that last option without a sim so I would appreciate it if you could post a sim which demonstrates the issue.  Thanks.
Many beers....

Offline Henk

  • Bot Destroyer
  • ***
  • Posts: 110
    • View Profile
Very nice!
« Reply #6 on: July 27, 2006, 07:26:40 AM »
Found it.

When the program is newly installed it doesn't have it's settings set yet.

This particular issue is caused by the 'default' maximum speed (in the physics tab) being zero.
« Last Edit: July 27, 2006, 07:27:25 AM by Henk »
cond
*.DBbugs 0 =
start
.rejoice inc
stop

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Very nice!
« Reply #7 on: July 27, 2006, 08:35:08 AM »
You need to reference at least one eye to enable the ref's to readback values(refxpos refypos for distance).

Was originally done to save processing power on bots that didn't have any "eyes". Not sure exactly when the check is done, so it might be possible to delete the gene with the eye dna and still receive ref's for awhile.

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Very nice!
« Reply #8 on: July 27, 2006, 08:39:26 AM »
Cheers Henk! Had read about that problem before though and it didn't help.  

Have posted sim.

Superb job Numsgil! I presume I can thank you for the extended operators list etc on Wiki.  

The Bestiary won't let me start a new topic.

You are probably all thinking I'm a bit paranoid about DB not working properly, which I am! When PY first started improving DB I used to get silly results, wasn't until I had replaced one of the HD's and a stick of ram that the problem was solved.
Has left me with the life long conviction that just because a bot wins on my PC doesn't mean it'll do squat on anyone elses!  

Sorry if I'm causing you any inconvenience...

{EDIT} Thanks Endy. Might be able to figure a workaround then.
« Last Edit: July 27, 2006, 08:41:19 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 PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Very nice!
« Reply #9 on: July 27, 2006, 09:11:58 AM »
Jez!! Me old buddy  

Good to see you back.
How have you been?

I'm not sure what your issues are with posting in the beastiary. You should be able to  post in the "Starting Gate". That is what it was designed for. Beyond that, though, posting access is restricted to mods only.

In the case of Hunter vs excalibur, I have just rerun a test to see what happens. The situation is that if Hunter reaches the food first, it multiplies like crazy and wipes the floor with Excalibur but if it fails to do so then Excalibur is the stronger fighter one on one.
It isn't an easy contest but Hunter wins out every time I test it, usually by shear weight of numbers.

note that these are default settings in 2.37.6. I still haven't programmed anything specifically for any of the 2.4 versions. There are still too many things I am waiting for Eric to get fixed in there. It's starting to look very promising now though.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Very nice!
« Reply #10 on: July 27, 2006, 11:38:04 AM »
Hiya PY!!  

Great to be back!

Oops! Starting gate it is then!  

The biggest reason I had for starting this post and worrying about the install was that Excalibur kept wiping the floor with Hunter. I'm using DB V2.37.6 with F1 contest conditions ticked and (copied not downloaded) the code from the bestiary for the bots.
I imagine this means the default settings should be OK so I suppose I might have the wrong code for one of the bots if it isn't upto date in the bestiary.

Did I say wiping? I should have said 'smearing Hunter slowly across the floor,' the sim I just ran ended 37-0 to Excalibur. Something is different somewhere...

{edit} checked variables for sim with F1 conditions ticked.
Friction was at 1 not 3
Veg nrg per cycle was set to 40 not 30

Don’t know proper value for:
The costs.
+
Swimming factor is set at 1.1
Movement factor at 0.8

Hasn’t made a difference though 
« Last Edit: July 27, 2006, 12:01:29 PM 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 PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Very nice!
« Reply #11 on: July 27, 2006, 05:02:40 PM »
That seem rather strange to say the least.

I ran the sim at default (I thought all defaults were the same but maybe not) values this morning to confirm the results.
Hunter won the contest by 30 to 20. That seems to be about the average win-loss ratio I always get with these two
The physics settings are set automatically when you check the F1 box.
The costs are as follows

Execute condition 0.02
store 0.2
Chemical emision 2
Acceleration 0.5

Smallest size. 40 energy to the veggie

That's about it.

If you still get different results with these settings then something a bit weird is going on.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Light

  • Bot Destroyer
  • ***
  • Posts: 245
    • View Profile
Very nice!
« Reply #12 on: July 27, 2006, 06:36:29 PM »
Sounds to me that PY is using Excalibur and Jez is using Excalibur 1.1 would explain different results, either that or PY's machine is rigged to give his bots an advantage  
« Last Edit: July 27, 2006, 06:59:13 PM by Light »

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Very nice!
« Reply #13 on: July 28, 2006, 07:17:10 AM »
Bingo!

Give the man a biscuit!!

Congrats to Light for his logical inference and a superb little bot!!!  

I shall consider Excalibur 1.1 the top F2 bot now and get back to the drawing board.  
« Last Edit: July 28, 2006, 07:19:55 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 PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Very nice!
« Reply #14 on: July 28, 2006, 08:39:31 AM »
Quote
Sounds to me that PY is using Excalibur and Jez is using Excalibur 1.1 would explain different results, either that or PY's machine is rigged to give his bots an advantage
I must be losing it. I don't appear to even have Excalibur 1.1 on my computer.

I did think about adding a bit of code that would give all my bots free food  
I figure somebody would have found it by now though.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D