Author Topic: Hello, I'am new and I've got a virus question.  (Read 10366 times)

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Hello, I'am new and I've got a virus question.
« on: June 24, 2007, 04:09:41 PM »
 Hello everybody, I'm new and I've got some questions.  

I don't speak english everyday, so my grammar isn't that well, I hope you can understand it.  

How can you use a virus to hurt an enemy, but how can you let the virus know when it's inside your own bot, and than to deactivate itself if it is.

This steals slowly the energy of a bot. I only want it to steal energy from the enemy's.

Now there's a second question if you stop the motherbot from firing the virus in this way, can you use another gen to create a virus with it.

Quote
'Small but with increasing numbers inside a cell will steal more and more nrg.
cond
start
.vshoot inc
*.thisgene .mkvirus store
stop

I've got this virus out of the wiki, if you were asking. I just want to now how to properly use it.
Oh my god, who the hell cares.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Hello, I'am new and I've got a virus question.
« Reply #1 on: June 24, 2007, 07:45:04 PM »
The idea is to use conditionless programming to multiply the destination of the store to make it 0 when you don't want it to activate.  See this page on the wiki.

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Hello, I'am new and I've got a virus question.
« Reply #2 on: June 25, 2007, 04:15:34 AM »
Quote from: Numsgil
The idea is to use conditionless programming to multiply the destination of the store to make it 0 when you don't want it to activate.  See this page on the wiki.

Well, thanks I don't get completly how this can help me, but I found at the virus wiki something (very simple) to put into the bot. Simple and works.

Quote
cond
*.robage 0 =
start
7 989 store
stop
bot

Quote
cond
7 *989 !=
virus


Well, to say the truth, I don't get much from the conditionless bots section.

Quote
20 .up *.hit mult store
.hit *.hit mult dec

All I see is a number some stars(or how do you call these(*) and some words. Store it is storing, hit it is hit, mult to multiply, up to go up I gues. Dec ?? no idea. Why would this, so says the explanation go up when it's hit. When up is in front, it looks to me kinda strange if he is only going up when hit is true, becouse up is in front of the code.
« Last Edit: June 25, 2007, 04:16:51 AM by Peter »
Oh my god, who the hell cares.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Hello, I'am new and I've got a virus question.
« Reply #3 on: June 25, 2007, 11:18:22 AM »
If the asterisks (* aka stars ), dec, and other DNA bits throw you for a loop, it might be a good idea to read through the documentation of the DNA before starting with something like viruses.  Walk before you run   Check out this wiki page and look up any commands that you don't understand.

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Hello, I'am new and I've got a virus question.
« Reply #4 on: June 25, 2007, 03:25:38 PM »
20 .up *.hit mult store
.hit *.hit mult dec

Conditionless bots use maths to do stuff rather than conditions. It's up to you which method you choose in the end.

Asterisks (*) reads you the value of a location so *.hit gives you the value of the .hit location (sysvar 201) (sysvar = system variable)

The value of .hit, will be either 1 or 0 so the first line (20 .up *.hit mult store) will only move if *.hit returns the value of 1 (otherwise .up (sysvar 1) will be multiplied by 0 and return sysvar 0 which doesn't exist)
The second line uses dec (decrease) to subtract 1 from .hit but only if *.hit = 1, (otherwise multiply sysvar by 0 again)

As a maths equation it would read (20 (.up *.hit mult) store) and ((.hit *.hit mult) dec)

The maths is all done in Polish Reverse Notation by the way so instead of;
1 + 2
it's;
1 2 +
Bit strange to start with but you'll soon get used to it!

Neither dec (decrease) or inc (increase) need a store to change a sysvar unlike most other operations.

Hope that helps a bit.  

sysvars can be found here
« Last Edit: June 25, 2007, 03:33:09 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 Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Hello, I'am new and I've got a virus question.
« Reply #5 on: June 26, 2007, 03:52:25 AM »
Well, thanks for the help, Numsgil an Jez. You're right first learn to walk, before you can run. Maybe I'am trying something too fast.

If have got some another question's

First one, in the first gene I have in the robot I've got mkslime and mkshell, the strange thing is the shell is fastly going  down and the mkslime is stable. Is'nt it supposed to be reversed(mkslime going down).

Code: [Select]
cond
 *.robage 0 =
start
 7 989 store
200 .mkslime store
200 .mkshell store
stop

My code in the first gene.

There is another question. I have created a shortbot, first based on animal minimalis from Numsgil, later I created a new one myself. The question is, my robot is beating up the whole shortbot-league, I'am just starting thus it would be strange to have a good bot already,is there any rule I overlooked. In the rules of the shortbots stands there aren't any rules exept having no more then 6 genes. Maybe there are some other rules somewhere .

Edit:
I was speaking to fast, I was simulating a sim(logic) with mine and the league bots and every time I won, I just set up a shortbot league, I was beaten by furiae(I knew I missed one). My virus wasn't working well on it. The only bot jet.

Third question.

I've got this code to keep shell at 200. Why isn't it working well. There's nothing happening
   
1 .mkshell 200 *.shell sub mult store
« Last Edit: June 26, 2007, 03:25:29 PM by Peter »
Oh my god, who the hell cares.

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Hello, I'am new and I've got a virus question.
« Reply #6 on: June 26, 2007, 06:19:33 PM »
If that gene you posted only sets mkslime and mkshell when robage = 0 then I'd imagine that you are using F2 or shotbots not tiebots. Slime reacts to being hit by ties and shell reacts to being hit by shots so I'm guessing it's (shell) getting eroded from stray shots. (Ties tend to be more accurate than shots as well).

Henk set the rules for the shortbot league and that's the long and short of it! If you have a bot that you think might do well in the league please feel free to post it in The Starting Gate so it can be given an official ranking.
You should be able to download the official league easily enough but if you have problems please say so.
It wouldn't be the first 'first' bot to go straight to the top of it's relevant league btw, there are lots of members here who have pulled the same trick...

I think your code would only work if *.shell = 199 otherwise it would be changing the sysvar .mkshell to a different sysvar
(1 (.mkshell (200 *.shell sub) mult) store)

200 *.shell sub .mkshell store ---- (200 *.shell sub) .mkshell store

Might work better but it's getting a bit late so I'll check that tomorrow!  
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 Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Hello, I'am new and I've got a virus question.
« Reply #7 on: June 27, 2007, 10:21:04 AM »
Shell is becoming smaller without it being atacked by others, slime is staying stable. In the wiki these are reversed, slime is supposed to become smaller and shell is stable. If I ad slime, shell is being added and so the other way.

I've entered my bot, I'am not sure if it's doing very good in the league there where some compititors missing, in the league I downloaded



About the code, Well thanks it works, it's beginning to make sense. At least I'am again thinking I get it.  


And to keep you busy (or someone else)

Right now I'am running a zerobot-simulation, the robots can already reproduce. Now they can reproduce I've put them in another sim, becouse the mutation rates in the first are way too high for a gene to stay stable.
What are the maximum mutation rates for the evolution of a bot, to speed up the sim and keeping the original reproduce genes more or less intact.
For point
delta
copy
insertion
reversal
minor deletion
major deletion

I'am having trouble with it are low values(high mutation) is overmutating the population. At high values (low mutating) I'am thinking, there's nothing happening and there is'nt happening really much.  

Furthermore, for the creation of reproduction genes I have used the smallest room with 100 zerobots. Is it for the further evolution better to have a larger room with more (developed) zerobots or does'nt it care. If so what's the best, I'am at least not using the maximum room, I want to see the kind of stupidity of the zerobots.  

Well, anybody to anwer this (stupid)question, Thanks, oh and thanks to Jez for answering the last question.
Oh my god, who the hell cares.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Hello, I'am new and I've got a virus question.
« Reply #8 on: June 27, 2007, 01:10:38 PM »
Mutation rates are something of an art form.  1 in 5000 is a reasonable starting point.  In general it's better to have mutation rates too low than too high.  Too low just means it'll take longer.  Too high means that everything will fall apart as the genome won't be stable enough.

When you're first starting out, most of the settings won't matter because the bots can't do much more than reproduce.  Costs and feeding rate are about the only two things that make a difference.  So feel free to set up pretty much whatever environment you want, and see if you can get your bots to evolev inside it.

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Hello, I'am new and I've got a virus question.
« Reply #9 on: June 27, 2007, 02:36:47 PM »
The bots missing in the shortbot league download should just be the ones I couldn't find. When I get round to entering your bot in the shortbot league, and there are a couple of bots in the starting gate already that will get entered in the league first, I'll be using the same file.

When I do that I'll also check the shell and slime thing and adjust the wiki entry, there have been a couple of minor changes in the past to shell and slime so it's quite possible the wiki entry never got updated. Well spotted!
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 Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Hello, I'am new and I've got a virus question.
« Reply #10 on: June 28, 2007, 03:19:13 AM »
I think I'am not patient enough for the zerobot-evolution, All that happens is a bot is suddenly moving(jay it's moving) it takes the oppertunity to reproduce and reproduce till it is forbidden by the program to reproduce, then it's killed by the dynamic costs I inplented. Sometimes one of the larger sipplings(probably couldn't reproduce due to space)survives and the same thing is going on, till they're all gone. Then another one is moving doing exact desame thing. I know there will come a time they will be smarter but that's probably costing much time. Even the "virus"-bots in the 1000 hour simulation from EricL aren't very smart and doing random stuff. And that's 1000 HOURS.

My question for a simulation I want to start with instead of one I want to let two specie's survive. With the use of an double alga. It isn't working I can't figure out what's wrong.  

 So what's wrong. If someone want's to tell me. I just don't get it.  

' Alga shell/poison protection
'
' Vegetable
'
' This robot has three genes,
' necessary for it to reproduce,
' make a choice to take poison/shell,
' And create poison/shell protection.
' Energy is given to it by the program,
' by checking the "autotroph" box.


cond
*.robage 0 =
start
1 rnd 49 store
end

cond
1 *49 =
start
1000 *.shell sub .mkshell store
else
1000 *.poison sub .strpoison store
end

cond
  *.nrg
  6000
  >
start
  50
  .repro
  store
  15
  .aimdx
  store
stop
end
Oh my god, who the hell cares.

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Hello, I'am new and I've got a virus question.
« Reply #11 on: June 28, 2007, 10:50:33 AM »
Stop not End, the program only sees the first gene!

End is only used once at the end of all the genes.

Pause your sim, select one of the bots on screen then right click on it and choose 'show robot info' now click 'dna' and you can see the genes the bot is using.
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 Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Hello, I'am new and I've got a virus question.
« Reply #12 on: June 28, 2007, 11:53:18 AM »
Thanks  

Oh  , now I feel stupid I've got to use stop instead of end.

And there's even another question.
cond
*.numties 1 =
start
1 .tienum store
314 2 *42 mult 1 add mult .fixang store   'allebei dezelfde kant op!!
50 .sharenrg store
stop

I was trying to create a multibot and I can't get them to go to the same side
*42 supposed to be either 1 or 0. One of the two has 1 the other 0.

This is what I'am trying to do.
O--O

O_O
| . |

When I try they are doing this

O_O---
|

The anwser will probably be simple but I just don't get to the solution.
« Last Edit: June 28, 2007, 11:57:47 AM by Peter »
Oh my god, who the hell cares.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Hello, I'am new and I've got a virus question.
« Reply #13 on: June 28, 2007, 02:14:20 PM »
Quote from: Peter
314 2 *42 mult 1 add mult .fixang store   'allebei dezelfde kant op!!

Looks like it's working to me.  One turns a quarter circle and the other turns half a circle.  But I think you probably wanted something more like this instead:

314 -1 *42 mult 1 add mult .fixang store   'allebei dezelfde kant op!!

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Hello, I'am new and I've got a virus question.
« Reply #14 on: June 28, 2007, 03:44:17 PM »
It is not working with me. And what am I exactly seeing wrong in the code


314 ((2 *42 mult) 1 add) mult

314*((2*1)+1)=942
314*((2*0)+1)=314

This is what I am seeing in my code.




314 ((-1 *42 mult) 1 add) mult

314*((-1*1)+1)=0
314*((-1*0)+1)=314

This is what I am seeing in your posted code.

What am I seeing wrong.

Practical they're doing desame in the simulation. How does this work.  

In fact I posted this twice, the first time it got stuck, is this happening more often.
Oh my god, who the hell cares.