Author Topic: mkvirus issues  (Read 4417 times)

Offline Borg

  • Bot Neophyte
  • *
  • Posts: 18
    • View Profile
mkvirus issues
« on: February 28, 2006, 04:03:29 AM »
Hello.

I made quite interesting viri for my BORG cell.
And I face one big problem, it is quite effective,
but doesnt spread quite good (as viris do usually).
mkvirus behaviour should be changed I guess,
because duplicating gene to viri take quite a lot time.
I think this process should be done only once
and then vtimer recharges much faster to shot viri at
much bigger rate ;)

Viri is made to beat tiebot.. Unfortunely.. its spreads
way too slow for that me.
Tank (aka Batterybot) is easy destroyed by my robot
for now :) thats becuuse Tankbot spreads very very slowly.

AFAIK, setting up cell to reproduce viri takes a time, but after that
viri is reproduced at quite nice rate.. and infects entire environment.

Offline Borg

  • Bot Neophyte
  • *
  • Posts: 18
    • View Profile
mkvirus issues
« Reply #1 on: February 28, 2006, 07:12:40 AM »
Okey, finaly.. Tiebot defeated! :)
Still... mkvirus issue is open.. its nice to have it spread much faster ;)

Anyway, im constantly have problems with my DarwinBots 2.37.6
It crashes with error code -6.
Any clues why it happens?

Here is code of my Borg V2 bot ;)

'$ tags are autogenerated by cgen perl script, if anyone
wants it.. just let me know.. its short.

'$ 5 <- a VIRI code :)

Code: [Select]
' Borg v2.0
'
' Simple bot with mission to populate area
' with food. Dont kill veggies.
' Uses some interesting defense techniques.

def mc1 951
def mc2 952
def mc3 953
def mc4 954
def mc5 955

def mid 51
def mvcnt 52
def ma 53
def mrnd 54
def mdaimdx 55

'$ 1
cond
  *.robage 0 =
start
  8888 .mid store
stop

'$ 2
cond
start
  1000 rnd .mrnd store
  0 .fixpos store
  *.body 1000 sub
  dup sgn dup add sgn mult
  1000 div 1 add .ma store
  *.numties sgn .mc1 store
  *.tiepres .tienum *.mc1 mult store
  .dn .tieloc *.mc1 mult store
  32000 .tieval *.mc1 mult store
stop

'$ 3
cond
  *.mdaimdx 0 >
start
  *.mdaimdx .aimdx store
  0 .mdaimdx store
stop

'$ 4
cond
  *.vtimer 0 =
start
  5 .mkvirus store
stop

'$ 5
cond
  *.mid 8888 !=
start
  *.numties sgn .mc1 store
  *.tiepres .tienum *.mc1 mult store
  .dn .tieloc *.mc1 mult store
  32000 .tieval *.mc1 mult store
  *.genes rnd 1 add dup
  *.thisgene sub sgn abs *.myshoot 1 sub sgn abs mult mult .delgene store
  *.vtimer sgn 1 sub abs .mc1 store
  *.thisgene .mkvirus *.mc1 mult store
  100 .mkslime 1000 *.slime sub sgn mult store
  100 .strvenom store
  100 .shootval store
  .mkslime .vloc store
  -32000 .venval store
  -3 .shoot store
  1256 rnd .aimsx *.mc1 mult store
  150 .vshoot *.vtimer 1 sub sgn abs 1 sub abs mult store
stop

'$ 6
cond
  *.eye3 *.eye7 >
start
  35 .aimsx store
  4 *.ma mult .up store
  2 *.ma mult .sx store
stop

'$ 7
cond
  *.eye7 *.eye3 >
start
  35 .aimdx store
  4 *.ma mult .up store
  2 *.ma mult .dx store
stop

'$ 8
cond
  *.eye5 10 >
  *.eye5 25 <
  *.refeye *.myeye != *.refshoot *.myshoot != or
start
  4 *.ma mult .up store
stop

'$ 9
cond
  *.nrg 30000 <
  *.eye5 30 >
  *.refshoot 0 =
  *.refmulti 0 =
  *.refnrg 3000 >
  *.refbody 300 <
start
  -8 .shootval store
  -1 .shoot store
  0 .up store
  .fixpos inc
stop

'$ 10
cond
  *.nrg 30000 <
  *.eye5 30 >
  *.refshoot 0 =
  *.refmulti 0 =
  *.refbody 300 >
start
  -8 .shootval store
  -6 .shoot store
  0 .up store
  .fixpos inc
stop

'$ 11
cond
  *.eye5 30 >
  *.refeye *.myeye != *.refshoot *.myshoot != or
  *.refmulti 0 =
  *.refshoot 0 >
  *.refaimsx 0 = *.refaimdx = 0 and
  or
start
  -16 .shootval store
  -6 .shoot store
  0 .up store
stop

'$ 12
cond
  *.venom 100 >
  *.eye5 30 >
  *.refeye *.myeye != *.refshoot *.myshoot != or
  *.refmulti 0 >
start
  100 .shootval store
  .mkslime .vloc store
  -32000 .venval store
  -3 .shoot store
  .mvcnt inc
stop

'$ 13
cond
  *.eye5 30 >
  *.refeye *.myeye != *.refshoot *.myshoot != or
  *.refmulti 0 >
  *.vtimer 1 =
  *.mvcnt 5 >
start
  50 .vshoot store
  0 .mvcnt store
stop

'$ 14
cond
  *.eye5 30 >
  *.refeye *.myeye = *.refshoot *.myshoot = and
start
  1256 rnd .aimsx store
  10 *.ma mult .up store
stop

'$ 15
cond
  *.eye3 10 < *.eye5 10 < *.eye7 10 < and and
  *.mrnd 0 > *.mrnd 11 < and
start
  314 rnd 157 sub .aimsx store
  5 *.ma mult .up store
stop

'$ 16
cond
  *.eye3 10 < *.eye5 10 < *.eye7 10 < and and
  *.mrnd 0 > *.mrnd 21 < and
  *.vel 3 < or
start
  1256 rnd .aimsx store
  20 *.ma mult .up store
stop

'$ 17
cond
  *.eye3 10 <
  *.eye5 10 <
  *.eye7 10 <
start
  5 *.ma mult .up store
stop

'$ 18
cond
  *.numties 0 >
start
  0 *.ma mult .up store
  0 .sx store
  0 .dx store
stop

'$ 19
cond
  *.nrg 10000 >
  *.mrnd 0 > *.mrnd 21 < and
start
  1256 rnd .mdaimdx store
  *.mdaimdx .aimsx store
  30 .repro store
stop

'$ 20
cond
  *.nrg 8000 >
  *.shell 500 <
start
  50 .mkshell store
stop

'$ 21
cond
  *.nrg 4000 >
  *.slime 1000 <
start
  50 .mkslime store
stop

'$ 22
cond
  *.nrg 2000 >
  *.venom 2000 <
start
  50 .strvenom store
stop

'$ 23
cond
  *.nrg 15000 > *.body 5000 < and
  *.nrg 10000 > *.body 1000 < and
  or
start
  *.nrg 100 div .strbody store
stop

'$ 24
cond
  *.body 200 >
  *.nrg 3000 <
start
  100 .fdbody store
stop

'$ 25
cond
  *.waste 50 >
start
  .backshoot inc
  -4 .shoot store
  50 .shootval store
stop

end
« Last Edit: February 28, 2006, 07:17:33 AM by Borg »

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
mkvirus issues
« Reply #2 on: February 28, 2006, 08:49:43 AM »
Quote
Anyway, im constantly have problems with my DarwinBots 2.37.6
It crashes with error code -6.
Any clues why it happens?
Oh crap!!!  :angry:

I thought I had fixed all the bugs in 2.37.6.

The only way to really find out what is going on is to run the program from the source code through Visual Basic.

Both of these are available as downloads on the DarwinBots.com downloads page.

Just run it till you get one of these crashes then hit "debug" and tell me exactly which line ofcode it breaks on and what all the variable values are at that point.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Griz

  • Bot Overlord
  • ****
  • Posts: 608
    • View Profile
mkvirus issues
« Reply #3 on: February 28, 2006, 09:51:36 AM »
Quote
Oh crap!!! angry.gif
I thought I had fixed all the bugs in 2.37.6.
;)
cetainly most of them.
on occasion, I will get a -6 error ... but it's rare.
usually something to do with the graphs ...
which you probably don't explore often PY. ;)
and of course, I am not usually in VB mode when it happens.

weren't we going to put in, or uncomment, the routine that
saved an error.sim upon a crash?
then one can fire up VB, load that error.sim in ...
and debug, yes?

I think Nums put that in one 2.37 version at one time
but it may not be in 2.37.6.
and it may be commented out in the compiled version.
 
will look into that error trapping thing Nums had ...
meant to do that before but ...
with old-timer's dis-ease and all ... well ... ;)
« Last Edit: February 28, 2006, 09:54:10 AM by Griz »
不知
~griz~
[/color]
   "The selection of Random Numbers is too important to be left to Chance"
The Mooj  a friend to all humanity
[/color]

Offline Griz

  • Bot Overlord
  • ****
  • Posts: 608
    • View Profile
mkvirus issues
« Reply #4 on: February 28, 2006, 10:18:50 AM »
in version 2.37.6
the error trapping is called up in Private Sub main,
commented out in the uncompiled version ...
don't know if it is or not in the compiled version.
I just recompiled it so it now is in effect in mine.

Code: [Select]
' main procedure. Oh yes!
Private Sub main()
  'On Error GoTo fine

and toward the end of the sub:

fine:
  MsgBox "error occurred"
  SaveSimulation MDIForm1.MainDir + "\saves\error.sim"
  End
End Sub

in version 2.4 ...
it's a bit different, called 'errorsave' rather than 'fine' I think.

so, if not commented out in the compiled version ...
it should save an error.sim, yes?
then reloading using the uncompiled VB, version ...
one should be able to debug, yes?

I no longer know as I haven't had an error in 2.37.6 in recent
enough times to recall. ;)
不知
~griz~
[/color]
   "The selection of Random Numbers is too important to be left to Chance"
The Mooj  a friend to all humanity
[/color]

Offline Borg

  • Bot Neophyte
  • *
  • Posts: 18
    • View Profile
mkvirus issues
« Reply #5 on: February 28, 2006, 11:23:44 AM »
Im total n00b if we are speaking about VB :)
If you have some time, then please try to reproduce it yourself.
It happens very often.. 1/2 sims in my case.
Grab borg robot sources, grab my settings
ftp://ftp.benet.uu3.net/upload/borg.set
Delete tank and add tiebot (Tie-Bot 12)
and start sim.

You can put this bots instead of tiebot:
Devincio_Dominator_Invincibalis
Devincio_Eversor - Tie Destroyerr

Offline Griz

  • Bot Overlord
  • ****
  • Posts: 608
    • View Profile
mkvirus issues
« Reply #6 on: February 28, 2006, 11:38:51 AM »
Quote
Delete tank and add tiebot (Tie-Bot 12)
??? from where?
Quote
You can put this bots instead of tiebot:
Devincio_Dominator_Invincibalis
Devincio_Eversor - Tie Destroyerr
so I assume, [always dangerous] ;) ...
that your runtime error happens regardless of whether
using tiebot 12 or the devincios, yes?

ok ... will see what happens.
rushed for time right now ...
damn real life imposing itself. ;)
but will get back asap.

version 2.37.6, yes?
不知
~griz~
[/color]
   "The selection of Random Numbers is too important to be left to Chance"
The Mooj  a friend to all humanity
[/color]

Offline Griz

  • Bot Overlord
  • ****
  • Posts: 608
    • View Profile
mkvirus issues
« Reply #7 on: February 28, 2006, 11:47:09 AM »
Quote
You can put this bots instead of tiebot:
Devincio_Dominator_Invincibalis
Devincio_Eversor - Tie Destroyerr
I don't know where you are getting these from.
I have Devincio_Dominator and Excalibur1.1
will go with them and see.
不知
~griz~
[/color]
   "The selection of Random Numbers is too important to be left to Chance"
The Mooj  a friend to all humanity
[/color]

Offline Griz

  • Bot Overlord
  • ****
  • Posts: 608
    • View Profile
mkvirus issues
« Reply #8 on: February 28, 2006, 12:26:12 PM »
ok Borg ...
got the runtime error 6 ...
using a compiled versio of 2.37.6 and it did NOT save the error.sim file.
so ... will have to ensure that routine is in there, not commented out ...
and recompile a new version, and/or run it thru VB when I get time.
takes a bit longer in VB to get the error coming up.

so ... you are not alone or imagining things, if that is any comfort. ;)

may be a couple of daze b4 I can get to it
stay tuned.
不知
~griz~
[/color]
   "The selection of Random Numbers is too important to be left to Chance"
The Mooj  a friend to all humanity
[/color]