Bots and Simulations > Bot Tavern

Bot Transition- 2.37.6 to 2.43

(1/7) > >>

strangers:
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: ---'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
--- End code ---

Endy:
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.

Jez:
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.

strangers:
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.

Jez:
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)

Navigation

[0] Message Index

[#] Next page

Go to full version