Author Topic: Conditionless Bots  (Read 14363 times)

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Conditionless Bots
« on: January 22, 2006, 02:36:03 PM »
Here is Animal Minimalis

Code: [Select]
'Animal_Minimalis

'Contains everything necessary for it
'to survive and reproduce.

cond
*.eye5 0 >
*.refeye *.myeye !=
start
*.refveldx .dx store
*.refvelup 30 add .up store
stop

cond
*.eye5 50 >
*.refeye *.myeye !=
start
-1 .shoot store
*.refveldx .dx store
*.refvelup .up store
stop

cond
*.eye5 0 =
*.refeye *.myeye = or
start
314 rnd .aimdx store
stop

cond
*.nrg 20000 >
start
20 .repro store
stop
end

And here is my modified SG version

Code: [Select]
'Animal_Minimalis
'
'Contains everything necessary for it
'to survive and reproduce.
'
'Single gene

cond
start
*.refveldx .dx *.eye5 sgn mult *.refeye *.myeye sub dup mult sgn mult store
*.refvelup 30 add .up *.eye5 sgn mult *.refeye *.myeye sub dup mult sgn mult store

-1 .shoot *.eye5 50 sub sgn 1 add sgn mult *.refeye *.myeye sub dup mult sgn mult store
*.refveldx .dx *.eye5 50 sub sgn 1 add sgn mult *.refeye *.myeye sub dup mult sgn mult store
*.refvelup .up *.eye5 50 sub sgn 1 add sgn mult *.refeye *.myeye sub dup mult sgn mult store

314 rnd .aimdx *.eye5 sgn -1 mult 1 add *.refeye *.myeye sub dup mult sgn -1 mult 1 add add sgn mult store

20 .repro *.nrg 20000 sub 1 add sgn mult store
stop
end

Can you see how it works?

Sgn is a very useful command
« Last Edit: January 22, 2006, 02:36:28 PM by Elite »

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Conditionless Bots
« Reply #1 on: January 22, 2006, 04:36:51 PM »
Yeah, it and dup are probably the two most useful for more complex coding. You just have to be careful using sgn since it can return -1 also. Maybe a sgn abs or dup div would be better.

I think it's possible to used properties of 1, -1, and 0; to make some really advanced stuff way beyond boolean styled and/or stuff. Really tricky to use though.

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Conditionless Bots
« Reply #2 on: January 22, 2006, 04:45:42 PM »
I know sgn can return -1 too but if you multiply any sysvar by -1 then you get a nonsensical store anyway, and expend no energy.
If you store into a sysvar that doesnt exist then you don't expend energy.

I've been making a really complex SG bot but I want to make sure it's ready before I release it for the leagues.

It can beat The One, even when outnumbered by Hunter, Destinatus Praelator and The One all together in one league - not bad eh?

I'll give you what I've got now if you're interested

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Conditionless Bots
« Reply #3 on: January 22, 2006, 05:10:21 PM »
Shoot, post away. The One has currently been as top notch as they come, I'd love to see someone finally defeat it normally.

My best attempts have been speeded virus firing(bug) and using leach blind bots. Not exactly league quality bots. -_-

Quote
I know sgn can return -1 too but if you multiply any sysvar by -1 then you get a nonsensical store anyway, and expend no energy.
If you store into a sysvar that doesnt exist then you don't expend energy.

True, but with two in a row the sgn will reverse making a 1. I try to get to the most basic 1 or 0 myself before multiplying anything.

The above is what kind of what I was talking about being advanced stuff. For an even number of -1's the statement can be multiplied to form a (1)true, an odd number forms a false(-1).

Anyone know a better name for this, using math and algebra to form boolean type conditions?

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Conditionless Bots
« Reply #4 on: January 22, 2006, 05:16:28 PM »
Here's a good tie defence (on the subject of leaching)

Code: [Select]
cond
start
 *.tiepres .tienum *.numties sgn mult *.robage 1 sub sgn mult store
 .dn .tieloc *.numties sgn mult *.robage 1 sub sgn mult store
 32000 .tieval *.numties sgn mult *.robage 1 sub sgn mult store
stop

Instakill

Here's my bot ...

Code: [Select]
'Una
'
'Who needs conditions?

def IDcode 964

cond
start
.tie *.robage -1 mult 1 add mult inc
.deltie inc
.fixpos *.fixed mult dec
*.refveldx .dx *.eye5 sgn mult *.memval 42 sub dup mult sgn *.refeye *.myeye sub dup mult sgn add sgn mult store
*.refvelup 60 add .up *.eye5 -1 mult 45 add sgn mult *.memval 42 sub dup mult sgn *.refeye *.myeye sub dup mult sgn add sgn mult store
42 .IDcode *.robage -1 mult 1 add mult store
.IDcode .memloc *.robage -1 mult 1 add mult store
-6 .shoot *.eye5 0 sub sgn 1 add sgn mult *.eye5 40 sub sgn 1 add sgn -1 add -1 mult mult *.memval 42 sub dup mult sgn *.refeye *.myeye sub dup mult sgn add sgn mult *.eye5 sgn mult store
-8 .shootval *.eye5 0 sub sgn 1 add sgn mult *.eye5 40 sub sgn 1 add sgn -1 add -1 mult mult *.memval 42 sub dup mult sgn *.refeye *.myeye sub dup mult sgn add sgn mult *.eye5 sgn mult store
-6 .shoot *.refpoison sgn mult *.eye5 45 sub sgn 1 add sgn mult *.memval 42 sub dup mult sgn *.refeye *.myeye sub dup mult sgn add sgn mult *.eye5 sgn mult store
-1 .shoot *.refpoison sgn -1 mult 1 add mult *.refshell sgn mult *.eye5 45 sub sgn 1 add sgn mult *.memval 42 sub dup mult sgn *.refeye *.myeye sub dup mult sgn add sgn mult *.eye5 sgn mult store
-6 .shoot *.refpoison sgn -1 mult 1 add mult *.refshell sgn -1 mult 1 add mult *.eye5 45 sub sgn 1 add sgn mult *.memval 42 sub dup mult sgn *.refeye *.myeye sub dup mult sgn add sgn mult *.eye5 sgn mult store
16 .shootval *.eye5 45 sub sgn 1 add sgn mult *.memval 42 sub dup mult sgn *.refeye *.myeye sub dup mult sgn add sgn mult *.eye5 sgn mult store
*.refvelup .up *.eye5 45 sub sgn 1 add sgn mult *.memval 42 sub dup mult sgn *.refeye *.myeye sub dup mult sgn add sgn mult *.eye5 sgn mult store
*.refxpos *.refypos angle .setaim *.memval 42 sub dup mult sgn *.refeye *.myeye sub dup mult sgn add sgn mult *.robage sgn mult *.eye5 35 sub sgn mult store
314 rnd .aimdx *.memval 42 sub dup mult sgn -1 add -1 mult *.refeye *.myeye sub dup mult sgn -1 add -1 mult mult *.eye5 sgn -1 add -1 mult add sgn mult store
40 .repro *.body 100 *.robage add sub sgn mult *.nrg 1000 sub sgn 1 add sgn mult store
314 rnd .aimdx *.body 100 sub sgn mult *.nrg 1000 sub sgn 1 add sgn mult store
100 .strbody *.nrg 500 sub sgn mult store
100 .fdbody *.nrg -1 mult 100 add sgn mult store
*.tiepres .tienum *.numties sgn mult *.robage 1 sub sgn mult store
.dn .tieloc *.numties sgn mult *.robage 1 sub sgn mult store
32000 .tieval *.numties sgn mult *.robage 1 sub sgn mult store
*.waste .shootval *.waste 10 sub sgn mult store
-4 .shoot *.waste 10 sub sgn mult store
*.mkvirus .delgene *.mkvirus sgn mult store
.delgene inc .delgene inc
stop

end

Run it in a sim and watch what happens  :)

I don't know what to call it?
- Binary bots? Digital bots?

I just call it a conditionless bot  :)

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Conditionless Bots
« Reply #5 on: January 22, 2006, 05:55:40 PM »
Take a look at Din sometime. It uses:

-1000 .tieval store
*.tieval 1000 div .tieloc store

to allow it to instantly switch from tie feeding to making a bot move.

We've been calling them conditionless bots even though they're not really. The stuff we use is like algebra on steroids to make boolean logic gates within genes.
« Last Edit: January 22, 2006, 05:59:57 PM by Endy »

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Conditionless Bots
« Reply #6 on: January 22, 2006, 06:27:19 PM »
Oh great!  :blink:

Now I have two high tech programmers to contend with.  :rolleyes:

One Endy was bad enough.

(just kidding guys)

I have trouble keeping up with these complex SG bots at the best of times.
One of these days I might just get around to finishing my stack-tracker utility. That will make things easier to decipher and to program.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Conditionless Bots
« Reply #7 on: January 22, 2006, 06:59:02 PM »
I'm just finishing up my in-simulation bot debugger utilitiy for the C++ version.  It lets you track the contents of the stack and various memory locations while you step through a DNA program command by command.

Immensely useful.

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Conditionless Bots
« Reply #8 on: January 22, 2006, 10:38:14 PM »
That would be great. Most of the time I write little notes to keep the values straight.

Quote
I have trouble keeping up with these complex SG bots at the best of times.

They do become kind of esoteric after a while. :lol:

Quote
Oh great! 

Now I have two high tech programmers to contend with.

What's really funny is that I learned the basics from you. :D  That first one you made reproduce without using something like *.sun got me started. ^_^

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Conditionless Bots
« Reply #9 on: January 23, 2006, 12:58:54 AM »
Conditionless Bots

Horray let information be free :lol:

Made a wiki containing the major tricks into crafting conditionless genes. Haven't added everything I know, mainly just because I would be here forever :)  I'll see about adding more information on the other minor tricks, like storage location switching.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Conditionless Bots
« Reply #10 on: January 23, 2006, 09:12:54 AM »
Quote
That first one you made reproduce without using something like *.sun got me started. happy.gif

Oh! You mean my little Devincio Solo?

The first tie feeding SG bot?

He was pretty cool and revolutionary at the time but then you took my concept and exploited it mercilessly to the point where the DNA looks like some weird-ass foreign language math textbook on steroids. <_<

That always seems to be my problem in DarwinBots.
I am pretty good at finding whole new concepts (like tie feeding, leach genes and so on) then somebody else refines them and beats my bot.

Makes me sad  :(

Even worse is that I haven't had enough time to keep up with DB lately. This board is about all I can handle right now. I don't think I have even run a sim since Christmas.  :(
« Last Edit: January 23, 2006, 09:15:49 AM by PurpleYouko »
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Light

  • Bot Destroyer
  • ***
  • Posts: 245
    • View Profile
Conditionless Bots
« Reply #11 on: January 23, 2006, 09:54:03 AM »
I know how you feel, im snowed under, writing my dissertation.  :sad2:

Still good to see some new bots and ideas, things have been a bit dry recently

Ive allways been tempted to write a 1G bot, closest Ive got was a 6G bot, but maybe sometime in the future
« Last Edit: January 23, 2006, 09:56:57 AM by Light »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Conditionless Bots
« Reply #12 on: January 23, 2006, 10:15:01 AM »
I think things are dry because the versions are in a kind of limbo.  2.4 has issues but is also in many regards alot nicer than 2.37.

I'm hoping when I get the C++ port finished things will take off again.  It's slow but steady progress.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Conditionless Bots
« Reply #13 on: January 23, 2006, 10:20:20 AM »
Hopefully with the advent of the C++ version we can all get back to what is important. Running sims and making/evolving bots.

I plan to keep 2.37 alive to some degree so that I can try out some ideas on it now and then, but the faster operational speed of C++ should make the actual program much more accessable to everyone.

Lately DB has been too much about bugs in the code and not enough about the bots.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Conditionless Bots
« Reply #14 on: January 23, 2006, 11:21:16 AM »
'Conditionless bots' - yay I coined a term  :D

Has anyone with any time tested out my Una SG bot yet? Endy?
It just swarms over everything in its path like a horde of flesh-eating ants. If I entered it for the league now it could probably beat F1, F2, and SB, although hunter was a challenge to beat - I'll have to try your *.newmom style repro routine PY

It's nearing completion ...  :firedevil:

I definately agree that DB should be about bots and evo rather than bugs
« Last Edit: January 23, 2006, 11:22:49 AM by Elite »