Darwinbots Forum

Bots and Simulations => DNA - General => The Gene depository => Topic started by: Numsgil on February 23, 2005, 01:39:19 AM

Title: End All DNA defense
Post by: Numsgil on February 23, 2005, 01:39:19 AM
Hey guys, this is the start of an end-all virus protection gene.

Code: [Select]
'end-all protection
cond
*.repro 0 !=
*.mrepro 0 != or
*.sexrepro 0 != or
*.delgene 0 != or
*.shoot -2 =
start
0 .repro store
0 .mrepro 0 store
0 .sexrepro store
0 .delgene store
0 .shoot store
stop

Obviously your repro gene will need to come after this for it to work.  Add improvements yourself, post the new version.

In the end we should have a single gene to protect against the more devestating viral attacks.
Title: End All DNA defense
Post by: Anonomous Guest Person on February 23, 2005, 09:57:40 AM
Code: [Select]
'end-all protection
cond
  *.repro 0 !=
  *.mrepro 0 != or
  *.sexrepro 0 != or
  *.delgene 0 != or
  *.shoot -2 = or
start
  0 .repro store
  0 .mrepro 0 store
  0 .sexrepro store
  0 .delgene store
  0 .shoot store
stop

There. I fixed a condition. <_<
But it might be, and probably is, better to simply make seperate defense genes.
Such as:

Code: [Select]
cond
  *.shoot 2 =
start
  .shoot dup inc inc
stop
and
Code: [Select]
cond
  .delgene 0 !=
start
  0 .delgene store
stop
That way you don't spend so much energy when a single thing goes wrong.
Title: End All DNA defense
Post by: Numsgil on February 23, 2005, 10:03:25 AM
The only problem with adding seperate genes is that it increases the chances that a virus will be inserted before the virus blocking gene, rendering it useless.

And their are so many things to guard against in the end you could have 20+ genes.

But if you can think of some fancy stack manipulations to stop from storing things that don't need to be stored, then so much the better!  It certainly doesn't need to be readable.

Here's my next revision:

Code: [Select]
cond
 *.repro 0 !=
 *.mrepro 0 != or
 *.sexrepro 0 != or
 *.delgene 0 != or
 *.shoot -2 = or
 *.fixed 1 = or 'this one can be deleted if you need to
start
 0 .repro store
 0 .mrepro 0 store
 0 .sexrepro store
 0 .delgene store
 0 .shoot store
 0 .fixpos store
stop
Title: End All DNA defense
Post by: Endy on February 23, 2005, 04:09:04 PM
Still won't work against everything, it would be simple to attack the conditions themselves. Storing a value of 32000 in nrg, 0 in eye5, or 0 in robage would wreck the bot just as quickly.

Unfortunately there is no easy way for the bots to tell if the variable is correct or if another gene changed it. :(

Endy ;)
Title: End All DNA defense
Post by: Numsgil on February 23, 2005, 04:16:35 PM
Okay, okay, problems aside, I'm willing to give it a go.  Point is to make a gene that's easy to copy and paste and protect against the more devestating attacks.
Title: End All DNA defense
Post by: Endy on February 25, 2005, 01:36:36 AM
Sorry Nums, found an ultimate virus attack. Probably its too good to keep in DB, unless new defense methods are developed.

' Structural Destroyer Virus
' Got the idea from talks on Virus defense and Exploding Babies
' Use in SG plant/animal
cond
start
*.genes rnd .mkvirus store
250 .vshoot store
cond
stop
end

When this gene is sent it's very existance causes the other bot to reproduce babies that normally explode instantly, some 1 out of 25 suprisingly survive but the odds are against it. The virus also sometimes strangely only makes the:
   cond
   stop
peice allowing several shots at once. In a match between Din and this virus(plant bot), Din actually lost to the plant. :o

Endy ;)
Title: End All DNA defense
Post by: Numsgil on February 25, 2005, 01:48:11 AM
I don't understand.  You did just that gene in a bot then made it autotroph?  Cause I don't see the point.

You just end up with alot of viruses firing some of their different genes at each other.  Mildly destructive but hardly an uber weapon.

There will be no super weapons in 3.0.  I'm balancing the combat and defense systems.  Got rid of the shell and slime limits.  Allowed bots to power up their shots.  Should make for an interesting get together.
Title: End All DNA defense
Post by: Endy on February 25, 2005, 02:09:24 AM
Nums check the second "cond" inside the gene, deliberately written. This causes the babies to explode(see PY's comment in your thread about badly written dna). Coupled with some defense for the original bot(tricky but not impossible) and this eliminates an enemy's ability to reproduce, since the gene will affect reproduction irregardless of position in the genome.

One group @refeye 77 != could delete the gene and be the reproducers. The others could retain it and remain few in numbers but serve to defend the reproducers.

Endy ;)
Title: End All DNA defense
Post by: Numsgil on February 25, 2005, 02:15:09 AM
I think you highlighted the bug I fixed with exploding babies.

Nothing a bot can do in-game should corrupt DNA files (should being the operative word).

Probably why it wasn't working when I tried it.
Title: End All DNA defense
Post by: Endy on February 25, 2005, 02:27:08 AM
Oops. Oh well, would have been one heck of a weapon. :(

How to say this politely...in the future could you keep "production" dates more of a secret? It seems all bot design is halted right now as we all [you]eagerly[/you] wait for the next version.

Endy ;)
Title: End All DNA defense
Post by: Numsgil on February 25, 2005, 02:40:46 AM
This is really the first version that has so many major changes that it could drastically alter bot design.

If anyone wants a highly buggy version of whats to come so they can start designing bots that will work in the new version, just PM me an email address and I'll send you the most recent version.
Title: End All DNA defense
Post by: Numsgil on March 02, 2005, 12:02:59 AM
Okay, this is the version I'm working on now.  Note that in 3.0 trying to store to an invalide memory location will be a free action.  (Debate the point if you want.)

Code: [Select]
cond
start
0 *.delgene 1 ceil .delgene mult store
0 *.mrepro 1 ceil .mrepro mult store
0 *.sexrepro 1 ceil .sexrepro mult store
0 *.fixed .fixpos mult store
stop

Left out the repro and -2 = shoot stuff since it's more complicated.
Title: End All DNA defense
Post by: Endy on March 02, 2005, 04:50:15 PM
I normally use "dup div" instead of the "1 ceil" but it probably makes no difference. I like the fact that it only costs to store to valid memlocs. Means immune genes like this are not going to cost a massive amount of nrg.

Got a chance to play with Beta 3.6, thanks Nums! I think my most favorite part so far is the customizable bkground option. It's great to see the bots fighting; with scenes of sunsets, mountains, and actual ponds behind them. Almost gave them a bug on a windshield look :) . Liked the "flicker mode" built in, reached amazing speeds with some 200 bots, it somehow makes the scene look more life-like by having everything in motion.

Ties are behaving...strange, to say the least. There were ties across the screens on ocassions and even a few ties to nothing. Hmm, bots discovering quantum tunneling with ties? Or just a really odd bug? :D

Hopefully have some time tonight to dig into new gene commands.

New vers is surprising less size than previous versions. How many commercial games can make that claim?

Endy :blueblob:
Title: End All DNA defense
Post by: PurpleYouko on March 02, 2005, 05:47:32 PM
Still working on that background picture stuff. It is amazingly hard to make the bloody thing come up in the middle of the screen. It always ends up in the top left corner.

Soon to be working on a system that will hopefully speed up graphics even further as well as allowing dynamic e-grid displays and smaller background pitures as tiles.

 :clap:  PY  :clap:
Title: End All DNA defense
Post by: Numsgil on March 02, 2005, 07:00:45 PM
Quote
Ties are behaving...strange, to say the least. There were ties across the screens on ocassions and even a few ties to nothing. Hmm, bots discovering quantum tunneling with ties? Or just a really odd bug? :D

Hopefully have some time tonight to dig into new gene commands.

New vers is surprising less size than previous versions. How many commercial games can make that claim?

Endy :blueblob:
Quantum tunneling.  Definately.  Wouldn't surprise me in the least.

The new version is shorter because I changed the opening splash scren from bmp to jpg.    :pengysmiley:
Title: End All DNA defense
Post by: Endy on March 03, 2005, 02:32:40 AM
Quote
Quantum tunneling. Definately. Wouldn't surprise me in the least.
Nums, the One who has finally surpassed the God in posts.

Cool. Db goes sci-fi, with new quantum-tunneling laser. :)

Alright, I'm going off topic here. I'll try and be a good boy, now.

Endy :blueblob:
Title: End All DNA defense
Post by: Endy on March 07, 2005, 01:49:21 AM
Added a couple things for viral defense I've been working on. Also working on idea for deliberatly making a virus at the start but then holding off from firing it. It looks like it would be best to have both a start gene to mess with viruses somewhat and then an end viral defense gene to attempt to block them outhright. Best spot for (reproducing type)viruses is past the end gene where they can do the most damage.

cond
start
0 *.delgene 1 ceil .delgene mult store
0 *.mrepro 1 ceil .mrepro mult store
0 *.sexrepro 1 ceil .sexrepro mult store
*.fixed .fixpos mult dec

' Hopefully deletes viral genes entering after thisgene
*.genes .delgene
*.thisgene *.genes sub dup div mult *.robage sgn mult store

' Use next with caution could del one of your own genes
' Assumes that virus is storing *.thisgene into mkvirus

*.mkvirus .degene *.mkvirus dup div mult store

0 .vshoot *.vshoot 1 ceil mult store
.genes inc
stop

Endy B)
Title: End All DNA defense
Post by: Numsgil on March 07, 2005, 02:12:21 AM
Good bit of work.  Can't wait to see it in action in 3.0
Title: End All DNA defense
Post by: Endy on March 07, 2005, 10:54:50 PM
I think your idea of viral protection genes needs to be expanded to the first gene also. Even with the new *.thisgene gene self-identication is still difficult to accomplish. Only at the 1st and last gene are you absolutely sure that the gene before or after is a viral gene and not one of your own. A similar delgene technique can be used to delete any gene before the first gene.

' First gene to compliment last for viral defense
cond
start
1 .delgene
*.thisgene 1 sub dup div mult store
50 .vtimer
*.vtimer dup div mult store
stop

Endy B)
Title: End All DNA defense
Post by: Endy on March 08, 2005, 09:37:18 PM
I think it might be possible to set up a whole genome defense by use of the OR.

For example:

Gene A
Viral Gene
Gene B

Gene A senses that genes have changed but *.thisgene remains the same.
Gene A sends a message to the other genes by inc 50.
Gene B activates due to condition OR *50 0 > at end, it sense that *.thisgene has changed and deletes the virus. If the viral gene is after Gene B than the message continues activating every gene until the viral gene has been deleted.

Would take a bit of work to set up and would require deactivating code within genes when the gene activates based on *50 alone, but should allow immediate identification and deletion of a viral gene.

Endy B)
Title: End All DNA defense
Post by: Endy on March 12, 2005, 11:45:58 PM
Sorry Nums :( , finished a working whole genome viral defense method for Din. When I finish the inactivation portion I'll post it. It basically works like I mentioned above, the gene deleting the gene before it if it "senses" that it is in the wrong place. Took forever to get the whole thing to work right, enough to drive me :wacko:

I feel kind of bad that what was originally your idea is going to be used against your own bot :pengysmiley: .

Endy B)
Title: End All DNA defense
Post by: Numsgil on March 13, 2005, 12:27:04 AM
I'm impressed, becasue I was thinking your system sounded hard to set up.  Like, maybe impossible or atleast impractical!  I can't really think of a counter offensive.  Since delgene is activated after the virus you can't do 0 .delgene store.

Post it, I have to crack it!