Darwinbots Forum

Code center => Suggestions => Topic started by: PhiNotPi on February 16, 2014, 01:15:16 PM

Title: Poll: Refvar for viruses
Post by: PhiNotPi on February 16, 2014, 01:15:16 PM
I've been doing a lot of virus stuff lately, and I came up with this idea.  There should be a refvar to tell how many mkvirus commands are in an opponent's DNA.  It would work similar to how refvenom tells the number of strvenom commands in the DNA.

This would allow a robot to determine if another robot is infected with a virus.  For example, a robot might not normally attack conspecs, but could choose to attack infected conspecs to help prevent more infections. 

Also, for symmetry's sake, there could also be a myvar which does a similar thing.
Title: Re: Refvar for viruses
Post by: Botsareus on February 17, 2014, 10:35:27 AM
Isn't the point of a virus the fact that it is a silent killer and robots do not run and hide when they see another infected? I'll need more public opinion before I move on this.
Title: Re: Refvar for viruses
Post by: Botsareus on February 17, 2014, 10:42:57 AM
Added a Poll, this should be interesting.
Title: Re: Poll: Refvar for viruses
Post by: PhiNotPi on February 17, 2014, 12:28:56 PM
I've been thinking, and there really needs to be more of a compromise, something in between.  If we make it too easy to weed out the infected, then there is no way to spread the infection.  On the other hand, it should be possible to detect conspecs that are acting super-infected and erratic.

There is a pretty big difference between DB viruses and real-world viruses.  Regular viruses can disable or kill people, but DB viruses can often turn the bots into a Total Zombie Slave ArmyTM.

Do you think the following method could detect infections well enough?

Code: [Select]
start
.vtimer .memloc store
stop

cond
*.eye5 40 >
*.memloc .vtimer = and
*.memval 0 != and
start
'infection detection
-1 .shoot store
stop
Title: Re: Poll: Refvar for viruses
Post by: Botsareus on February 17, 2014, 12:43:53 PM
idk, have not touched the Virus code in years. Sorry.
Title: Re: Poll: Refvar for viruses
Post by: Botsareus on February 17, 2014, 12:47:41 PM
Added another option to the poll...
Title: Re: Poll: Refvar for viruses
Post by: Peter on February 17, 2014, 01:51:39 PM
Do you think the following method could detect infections well enough?
Yep
Title: Re: Poll: Refvar for viruses
Post by: Numsgil on February 17, 2014, 07:17:56 PM
I'll point out that a virus doesn't need to use .mkvirus directly.  All it has to do is store in to that location.  There's all sorts of ways that can happen that don't actually use the .mkvirus sysvar directly.
Title: Re: Poll: Refvar for viruses
Post by: Botsareus on February 18, 2014, 10:54:36 AM
Good point. I say n = 7?