Darwinbots Forum
Code center => Bugs and fixes => Bug reports => Topic started by: Testlund on August 24, 2012, 11:51:13 AM
-
The crash I had earlier I think is related to bots that may be to old for version 2.45.02. It appears to be one or more of these bots that cause it:
'*******************************/
' Robottus Fisannis
'
'* C. Fisanne, 24 january 2003 */
'
' Modified by Testlund december 2009 /
'
'*******************************/
'******************/
'* REPRODUCTION */
'******************/
cond
*.nrg
10000
>
start
100 .strbody store
stop
cond
*.body 4000 >
start
50
.repro
store
stop
'******************************/
'* NO TARGET => CIRCLE SHAPE */
'******************************/
cond
*.eye1
0
=
*.eye2
0
=
*.eye3
0
=
*.eye4
0
=
*.eye5
0
=
*.eye6
0
=
*.eye7
0
=
*.eye8
0
=
*.eye9
0
=
*.nrg 1000 >
start
8 .aimsx rnd store
8 .up rnd store
stop
'*************************************/
'* TARGET = different robot and far */
'* => firing & coming nearer */
'*************************************/
cond
*.eye5
0
>
*.eye5
41
<
*.refeye
60
<
*.refeye
0
!=
start
-1
.shoot
store
10
.up
store
stop
'*********************************************/
'* TARGET = different firing robot and near */
'* => to kill asap */
'*********************************************/
cond
*.eye5
0
>
*.eye5
40
>
*.refeye
60
<
*.refeye
0
!=
start
.dn
.shoot
store
10000
.shootval
store
stop
'**************************************/
'* TARGET = far VEG with enough nrg */
'* => firing & coming nearer */
'**************************************/
cond
*.eye5
0
>
*.eye5
41
<
*.refeye
0
=
*.refnrg
200
>
start
-1
.shoot
store
7
.up
store
stop
'**************************************/
'* TARGET = near VEG with enough nrg */
'* => only firing */
'**************************************/
cond
*.eye5
0
>
*.eye5
40
>
*.refeye
0
=
*.refnrg
200
>
start
-1
.shoot
store
stop
'****************************************/
'* TARGET = VEG with poor nrg and robot */
'* enough nrg to reproduct => go away ! */
'****************************************/
cond
*.eye5
0
>
*.refeye
0
=
*.refnrg
201
<
*.nrg
5500
>
start
100
.aimdx
store
stop
'*******************************/
'* TARGET = wall => go away ! */
'*******************************/
cond
*.eye5
0
>
*.refeye
0
=
*.refnrg
10000
=
start
600
.aimdx
store
stop
'************************/
'* TARGET = same robot */
'* => go away ! */
'************************/
cond
*.eye5
0
>
*.refeye
59
>
start
300
.aimsx
store
stop
'**********************************/
'* research of the best heading */
'**********************************/
'******* eye6 *********/
cond
*.eye6
0
>
*.eye5
0
=
start
22
.aimdx
store
stop
'******* eye4 *********/
cond
*.eye5
0
=
*.eye4
*.eye6
>
start
22
.aimsx
store
stop
'******* eye7 *********/
cond
*.eye5
0
=
*.eye7
*.eye6
>
*.eye7
*.eye4
>
start
45
.aimdx
store
stop
'******* eye3 *********/
cond
*.eye5
0
=
*.eye3
*.eye6
>
*.eye3
*.eye7
>
*.eye3
*.eye4
>
start
45
.aimsx
store
stop
'******* eye8 *********/
cond
*.eye5
0
=
*.eye8
*.eye6
>
*.eye8
*.eye4
>
*.eye8
*.eye7
>
*.eye8
*.eye3
>
start
75
.aimdx
store
stop
'******* eye2 *********/
cond
*.eye5
0
=
*.eye2
*.eye1
>
*.eye2
*.eye6
>
*.eye2
*.eye4
>
*.eye2
*.eye7
>
*.eye2
*.eye3
>
*.eye2
*.eye8
>
start
75
.aimsx
store
stop
'******* eye9 *********/
cond
*.eye5
0
=
*.eye9
*.eye6
>
*.eye9
*.eye4
>
*.eye9
*.eye7
>
*.eye9
*.eye3
>
*.eye9
*.eye8
>
*.eye9
*.eye2
>
start
95
.aimdx
store
stop
'******* eye1 *********/
cond
*.eye5
0
=
*.eye1
*.eye6
>
*.eye1
*.eye4
>
*.eye1
*.eye7
>
*.eye1
*.eye3
>
*.eye1
*.eye8
>
*.eye1
*.eye2
>
*.eye1
*.eye9
>
start
95
.aimsx
store
stop
'**********************************************/
'* IF the robot is shot and no robotic target */
'* => to aim the shooting robot */
'**********************************************/
cond
*.shdn
0
!=
start
630
.aimdx
store
stop
cond
*.shdx
0
!=
start
315
.aimdx
store
stop
cond
*.shsx
0
!=
start
315
.aimsx
store
stop
end
'Modified 2009 to store to body before repro.'
cond
*.edge 0 =
start
40 40 angle .setaim store
30 *.vel sub .up store
stop
cond
start
.delgene *.edge mult inc
stop
cond
start
.fixpos *.fixed mult dec
9 inc
stop
cond
*.robage 0 =
start
50 1 rnd mult inc
stop
cond
*.nrg 300 >
*50 0 =
start
50 inc
stop
cond
*.eye5 50 >
*.refeye *.myeye !=
start
-1 *.refage *.refage div mult .shoot store
stop
cond
*.refeye 0 =
start
.tie inc
stop
cond
*.numties 4 =
start
.fixpos inc
stop
cond
*50 0 !=
*.vel 20 <
*.numties 0 =
*.eye5 50 <
start
20 *.vel sub 2 div rnd .up store
stop
cond
*.eye2 *.eye8 !=
start
*.eye2 *.eye8 sub 2 div .aimsx store
stop
cond
*.eye4 *.eye6 !=
start
*.eye4 *.eye6 sub .aimsx store
stop
cond
*.refeye *.myeye =
start
314 rnd .aimsx store
stop
cond
*.nrg 10666 >
start
32 .strbody store
stop
cond
*.body 10666 >
start
300 inc
stop
end
'Modified 2009 to store to body before repro.'
start
.fixpos *.fixed mult dec
9 inc
*.eye5 dup sub dec
stop
cond
*.robage 0 =
start
50 1 rnd mult inc
.tie inc
stop
cond
*.nrg 300 >
*50 0 =
start
50 inc
stop
cond
*.eye5 50 >
*.refeye *.myeye !=
*.refnrg 1024 <
*.nrg 1024 < or
start
-6 .shoot store
stop
cond
*.body 20 >
*.nrg 1000 <
start
50 .fdbody store
stop
cond
*.body 1000 <
*.nrg 1100 >
*.robage 2 >
start
100 .strbody store
stop
cond
*50 0 !=
*.vel 20 <
*.numties 0 =
*.eye5 50 <
start
20 *.vel sub 2 div rnd .up store
stop
cond
*.eye2 *.eye8 !=
start
*.eye2 *.eye8 sub 2 div .aimsx store
stop
cond
*.eye4 *.eye6 !=
start
*.eye4 *.eye6 sub .aimsx store
stop
cond
*.numties 0 >
*.tiepres 0 !=
start
*.tiepres .deltie store
stop
cond
*.refeye *.myeye =
start
314 rnd .aimsx store
stop
cond
*.nrg 10666 >
start
32 .strbody store
stop
cond
*.body 10666 >
start
300 inc
stop
end
start
*.body 200 <
*.nrg 200 > and
20 .dn store
.backshot inc
618 .eye5dir .focuseye add store
-1 .shoot store
50 .strbody store
*.eyef 0 > and
*.in1 *.out2 = and
-6 .shoot store
20 .up store
*.refvelup .dx store
*.body 200 >=
*.nrg 20000 > and
.repro inc
swapbool
*.numties 0 = and
*.eye5 70 > and
.tie inc
swapbool
not
10 .up store
or
*.refxpos *.refypos angle *.aim sub 35 *.focuseye mult add .eye5dir *.focuseye add store
-1 .shoot store
*.nrg 1500 >
*.body 100 < and
10 .mrepro store
600 .aimdx store
.mkshell inc
Maybe you code experts can tell what dna commands in these bots that are not compatible with version 2.45.02. I'm a bit intoxicated this friday evening to do an in depth analyzis. :D
-
I just got another crash. I suspect it may have something to do with connecting to internet mode. I noticed the following files had been altered after that:
DarwinbotsIM.exe and insett.ini
The date for those two files changed to todays date. I think when I connected to internet mode an automatic update was tried that failed because of incompatibility with the version I was running. I'll try a re-install later to see if it changes anything.
-
Internet mode is currently broken, I am planning a transition to p2p. For now, do not use IM. Your robots should work fine if IM is off.
-
I just keep crashing. Try this sim with these bots. It should crash shortly after you load it.
-
Eh, the good old subscript out of range error, I have seen this before.
note: enabling the advanced checks on compile to native produces incorrect crash reports, I have to look into a better way to collect crash information.
-
G dam it, I f up on my "tie to parent on vision disabled" code
ElseIf .lastopp = 0 And Not SimOpts.DisableTies And (.age < 2) Then 'Botsareus 6/12/2012 Added code so blind robots can tie to parent
maketie n, rob(n).parent, rob(n).radius + rob(rob(n).lastopp).radius + RobSize * 2, -20, rob(n).mem(mtie)
End If
It is saying parent out of range
-
el fixo:
ElseIf .lastopp = 0 And Not SimOpts.DisableTies And (.age < 2) And rob(n).parent <= UBound(rob) Then 'Botsareus 6/12/2012 Added code so blind robots can tie to parent Botsareus 8/25/2012 a bug fix not to search for parent if out of range
If rob(rob(n).parent).exist Then 'Botsareus 8/25/2012 make sure parent exsists
maketie n, rob(n).parent, rob(n).radius + rob(rob(n).lastopp).radius + RobSize * 2, -20, rob(n).mem(mtie)
End If
attached is the fix for the error, see how it works for you.
edit: I will probably have to redo the code again to calculate tie distance because apparently mother is can die in one cycle
-
Alright, I'll try this one on both my Win 7 and XP machine. It may take anything from 5 minutes to several ours before a crash occurs. I'll upload a new save if it happens.